Add continuously updated Norwegian laws and regulations (Lovverk)

#28
by bartoszkobylinski1 - opened

Hi! First, thank you for maintaining this dataset.

The current lovdata subset comes from the Norwegian Colossal Corpus, based on Lovdata CDs/DVDs last published in 2005. So it is historical material.

I maintain Lovverk — an open, Git-versioned corpus of current Norwegian law. It is rebuilt every day from Lovdata's official public-data API. Right now it contains about 5,880 documents: 759 laws (lover) and 5,121 central regulations (sentrale forskrifter). The license is NLOD 2.0 with attribution to Lovdata. The pipeline is deterministic and open source.

I would like to contribute it as a new subset, and keep the existing historical lovdata subset unchanged.

Before I write any code, I want to ask two questions:

  1. Naming. Should this be a new subset named lovverk? Or would you prefer something like lovdata-current?
  2. Deduplication. Some laws from 2005 still exist today, so there is overlap with the historical lovdata subset. How do you want this handled? I can run exact and fuzzy overlap detection first and report the numbers before adding anything.

My plan for the contribution: a create.py that downloads a pinned Lovverk revision (Git commit SHA), selects current documents from the manifest, and maps them to the Dynaword schema (id, text, source, added, created, token_count). Because the revision is pinned, every Dynaword release stays reproducible. Daily updates upstream mean the subset can be refreshed in later releases.

This should complement #25 (court case law) — Lovverk covers statutes and regulations, not court decisions.

Happy to adjust anything to fit your process.

Danish Foundation Models org

Wonderful to hear @bartoszkobylinski1 . I would probably:

  1. replace the existing lovdata (I don't believe we want an old version of the law) even though it is more data (I could be wrong). This also handles the duplication issue.
  2. keep the name lovdata (avoid breaking existing scripts of people that use the dataset).

The implementation seems very reasonable to me. We might, in the future, add CI for automatic updates, but that should work fine with the suggested script.

Thanks! I have opened the PR: #29

As you suggested, it replaces the lovdata subset and keeps the name. It now contains all current Norwegian laws and central regulations (5,879 documents, 41.2M Llama-3 tokens), built by create.py from a pinned Lovverk revision. All tests pass and statistics are updated.

Danish Foundation Models org

Seems to be completed

V4ldeLund changed discussion status to closed

Sign up or log in to comment