joelniklaus's picture
Trying switch to parquet files
bee9742 verified
|
raw
history blame
8.05 kB
metadata
configs:
  - config_name: law_level
    data_files:
      - split: train
        path: law_level/train.parquet
      - split: validation
        path: law_level/val.parquet
      - split: test
        path: law_level/test.parquet
  - config_name: article_level
    data_files:
      - split: train
        path: article_level/train.parquet
      - split: validation
        path: article_level/val.parquet
      - split: test
        path: article_level/test.parquet
  - config_name: paragraph_level
    data_files:
      - split: train
        path: paragraph_level/train.parquet
      - split: validation
        path: paragraph_level/val.parquet
      - split: test
        path: paragraph_level/test.parquet
task_categories:
  - translation
language:
  - de
  - fr
  - it
  - rm
  - en
tags:
  - legal
pretty_name: Swiss Law Translations
size_categories:
  - 10K<n<100K

Dataset Card for Swiss Law Translations

This dataset card describes a collection of Swiss legal translations extracted from the Swiss federal law platform, Fedlex. It is a parallel dataset that offers translations at three different levels: the law level, the article level, and the paragraph level. The dataset includes five languages: German (de), French (fr), Italian (it), Rumantsch (rm), and English (en).

Dataset Details

Dataset Description

This dataset consists of Swiss federal law and its translations into multiple languages. The data is available at three distinct levels:

  • law_level: Entire legal text at the law level.
  • article_level: Text at the individual article level.
  • paragraph_level: Text at the paragraph level within each article.

The dataset supports multilingual tasks and can be used for machine translation, text alignment, or legal document processing and analysis.

  • Curated by: Joel Niklaus
  • Funded by [optional]: Swiss Federal Supreme Court
  • Source: Swiss Federal Law (Fedlex)
  • Language(s) (NLP): German (de), French (fr), Italian (it), Rumantsch (rm), English (en)
  • License: [More Information Needed]

Dataset Sources

Uses

Direct Use

This dataset can be used for:

  • Multilingual text alignment and translation tasks across five languages.
  • Legal text analysis at different levels of granularity (law, article, paragraph).
  • Language model training or fine-tuning in the legal domain.

Out-of-Scope Use

The dataset may not be suitable for tasks outside the legal domain, or those that do not take the multilingual legal context into account.

Dataset Structure

The dataset is divided into three levels:

  1. law_level: Contains entire laws in all five languages.

    • Fields:
      • abbreviation: The abbreviation of the law.
      • url: URL linking to the legal text on Fedlex.
      • dateApplicability: Date of applicability of the law.
      • rsNr: Swiss federal register number.
      • de_lawTitle: Law title in German.
      • fr_lawTitle: Law title in French.
      • it_lawTitle: Law title in Italian.
      • rm_lawTitle: Law title in Rumantsch.
      • en_lawTitle: Law title in English.
      • de_lawText: Full legal text in German.
      • fr_lawText: Full legal text in French.
      • it_lawText: Full legal text in Italian.
      • rm_lawText: Full legal text in Rumantsch.
      • en_lawText: Full legal text in English.
      • de_lawHtml: Legal text in HTML format in German.
      • fr_lawHtml: Legal text in HTML format in French.
      • it_lawHtml: Legal text in HTML format in Italian.
      • rm_lawHtml: Legal text in HTML format in Rumantsch.
      • en_lawHtml: Legal text in HTML format in English.
  2. article_level: Contains individual articles of laws.

    • Fields:
      • abbreviation: Law abbreviation.
      • artNr: Article number.
      • lawTitle: Law title in the relevant language.
      • de_artTitle: Article title in German.
      • fr_artTitle: Article title in French.
      • it_artTitle: Article title in Italian.
      • rm_artTitle: Article title in Rumantsch.
      • en_artTitle: Article title in English.
      • de_artText: Article text in German.
      • fr_artText: Article text in French.
      • it_artText: Article text in Italian.
      • rm_artText: Article text in Rumantsch.
      • en_artText: Article text in English.
      • de_artHtml: Article HTML in German.
      • fr_artHtml: Article HTML in French.
      • it_artHtml: Article HTML in Italian.
      • rm_artHtml: Article HTML in Rumantsch.
      • en_artHtml: Article HTML in English.
  3. paragraph_level: Contains individual paragraphs within articles.

    • Fields:
      • abbreviation: Law abbreviation.
      • artNr: Article number.
      • parNr: Paragraph number.
      • lawTitle: Law title in the relevant language.
      • de_parText: Paragraph text in German.
      • fr_parText: Paragraph text in French.
      • it_parText: Paragraph text in Italian.
      • rm_parText: Paragraph text in Rumantsch.
      • en_parText: Paragraph text in English.
      • de_parHtml: Paragraph HTML in German.
      • fr_parHtml: Paragraph HTML in French.
      • it_parHtml: Paragraph HTML in Italian.
      • rm_parHtml: Paragraph HTML in Rumantsch.
      • en_parHtml: Paragraph HTML in English.

Example Code

from datasets import load_dataset

# Load the datasets for each level
law_dataset = load_dataset('fedlex/SwissLawTranslations', name='law_level', trust_remote_code=True)
article_dataset = load_dataset('fedlex/SwissLawTranslations', name='article_level', trust_remote_code=True)
paragraph_dataset = load_dataset('fedlex/SwissLawTranslations', name='paragraph_level', trust_remote_code=True)

# Print datasets for inspection
print(law_dataset, article_dataset, paragraph_dataset)

Dataset Creation

Curation Rationale

The dataset was created to support multilingual legal research and legal text processing. The structured nature of the dataset enables use cases ranging from full law analysis to paragraph-level translation tasks.

Source Data

The dataset is derived from public Swiss federal legal texts on the Fedlex platform, which provides multilingual legal content.

Data Collection and Processing

The legal texts were extracted, normalized, and structured into law, article, and paragraph levels. The dataset includes HTML versions for advanced formatting analysis.

Who are the source data producers?

The source data is produced and maintained by the Swiss federal government, published on Fedlex.

Annotations [optional]

No additional annotations have been added beyond the official translations provided by Swiss authorities.

Personal and Sensitive Information

The dataset does not contain any personal, sensitive, or private information. It consists solely of publicly available legal texts.

Bias, Risks, and Limitations

The dataset may reflect the specific legal framework of Swiss federal law and does not represent legal systems outside Switzerland. Users should consider the limitations when applying it to international legal tasks.

Recommendations

This dataset is best used for tasks within the legal domain, particularly focusing on multilingual legal text processing, translation, and analysis.

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

  • RS: The Swiss official register number for federal laws.
  • Fedlex: The official Swiss federal law platform.

More Information [optional]

[More Information Needed]

Dataset Card Authors

Joel Niklaus

Dataset Card Contact

Joel Niklaus