You need to agree to share your contact information to access this dataset

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this dataset content.

Raw data from EUR-lex

Source

Scraped from energy-related EUR-lex documents on 2023-10-25

Recommended Usage

1. Clone the repository into the root folder of ELQM

HTTPS

# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install
git clone https://huggingface.co/datasets/ELQM/elqm-raw

# if you want to clone without large files – just their pointers
# prepend your git clone with the following env var:
GIT_LFS_SKIP_SMUDGE=1

SSH

# Make sure you have git-lfs installed (https://git-lfs.com)
git lfs install
git clone git@hf.co:datasets/ELQM/elqm-raw

# if you want to clone without large files – just their pointers
# prepend your git clone with the following env var:
GIT_LFS_SKIP_SMUDGE=1

2. Load the dataset with the python json module

For best compatibility, we recommend moving the contents of this dataset repository in the ELQM /data directory.

import os
import json

data_directory = 'data/eur_lex_data'
data = []
for json_file in os.listdir(data_directory):
    with open(os.path.join(data_directory, json_file), 'r') as f:
        data.append(json.load(f))

3. Preprocess the data

The data contains raw html thay may be further processed with beautifulsoup or similar libraries.

Example

{
    "Dates": {
        "Date of document": "22/07/2009",
        "Date of effect": "12/08/2009",
        "Deadline": "01/01/2022",
        "Date of end of validity": "No end date"
    },
    "Misc": {
        "Author": "European Commission",
        "Form": "Regulation",
        "Additional information": "EEA relevance"
    },
    "Classification": {
        "EUROVOC descriptor": [
            "energy consumption",
            "energy production",
            "environmental protection",
            "waste recycling",
            "environmental impact",
            "electric machinery",
            "heating",
            "energy saving"
        ],
        "Subject matter": [
            "Technical barriers",
            "Approximation of laws",
            "Energy"
        ],
        "Directory code": {
            "code": "12.10.20.00",
            "level 1": "Energy",
            "level 2": "General principles and programmes",
            "level 3": "Rational utilisation and conservation of energy",
            "level 4": "Industrial policy and internal market",
            "level 5": "Internal market: approximation of laws",
            "level 6": "Other sectors for approximation of laws"
        }
    },
    "html": <raw html for further processing>
}
Downloads last month
0
Edit dataset card