Tonic commited on
Commit
96e8f56
·
0 Parent(s):

adds documentation for datasets

Browse files
.gitignore ADDED
@@ -0,0 +1,303 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be added to the global gitignore or merged into this project gitignore. For a PyCharm
158
+ # project, it is recommended to include the following files:
159
+ # .idea/
160
+ # *.iml
161
+ # *.ipr
162
+ # *.iws
163
+ .idea/
164
+ *.iml
165
+ *.ipr
166
+ *.iws
167
+
168
+ # VS Code
169
+ .vscode/
170
+
171
+ # Cursor
172
+ .cursor/
173
+ docs/
174
+ tests/
175
+
176
+ # Data Science / Machine Learning specific
177
+ # Datasets (often large and should be tracked separately)
178
+ datasets/*.csv
179
+ datasets/*.json
180
+ datasets/*.parquet
181
+ datasets/*.h5
182
+ datasets/*.hdf5
183
+ datasets/*.pkl
184
+ datasets/*.pickle
185
+ datasets/*.npy
186
+ datasets/*.npz
187
+ datasets/*.zip
188
+ datasets/*.tar.gz
189
+ datasets/*.tar
190
+ datasets/*.rar
191
+ datasets/*.7z
192
+
193
+ # Model files
194
+ *.pkl
195
+ *.pickle
196
+ *.joblib
197
+ *.h5
198
+ *.hdf5
199
+ *.onnx
200
+ *.pb
201
+ *.tflite
202
+ *.pt
203
+ *.pth
204
+ *.ckpt
205
+ *.safetensors
206
+
207
+ # Results and outputs
208
+ # results/
209
+ # outputs/
210
+ logs/
211
+ checkpoints/
212
+ runs/
213
+ wandb/
214
+ mlruns/
215
+
216
+ # Jupyter notebook outputs
217
+ *.ipynb
218
+
219
+ # Large files
220
+ *.csv
221
+ *.json
222
+ *.parquet
223
+ *.h5
224
+ *.hdf5
225
+ *.zip
226
+ *.tar.gz
227
+ *.tar
228
+ *.rar
229
+ *.7z
230
+
231
+ # OS generated files
232
+ .DS_Store
233
+ .DS_Store?
234
+ ._*
235
+ .Spotlight-V100
236
+ .Trashes
237
+ ehthumbs.db
238
+ Thumbs.db
239
+
240
+ # Windows
241
+ *.lnk
242
+
243
+ # Temporary files
244
+ *.tmp
245
+ *.temp
246
+ *.swp
247
+ *.swo
248
+ *~
249
+
250
+ # Backup files
251
+ *.bak
252
+ *.backup
253
+ *.old
254
+
255
+ # Configuration files with sensitive data
256
+ config.ini
257
+ secrets.json
258
+ .env.local
259
+ .env.production
260
+ .env.staging
261
+
262
+ # API keys and tokens
263
+ *.key
264
+ *.pem
265
+ *.crt
266
+ *.p12
267
+
268
+ # Database files
269
+ *.db
270
+ *.sqlite
271
+ *.sqlite3
272
+
273
+ # Log files
274
+ *.log
275
+ logs/
276
+
277
+ # Documentation builds
278
+ docs/_build/
279
+ docs/build/
280
+
281
+ # Node.js (if using any frontend tools)
282
+ node_modules/
283
+ npm-debug.log*
284
+ yarn-debug.log*
285
+ yarn-error.log*
286
+
287
+ # Docker
288
+ .dockerignore
289
+ Dockerfile
290
+ docker-compose.yml
291
+ docker-compose.yaml
292
+
293
+ # Terraform
294
+ *.tfstate
295
+ *.tfstate.*
296
+ .terraform/
297
+
298
+ # Kubernetes
299
+ *.kubeconfig
300
+
301
+ # Local development
302
+ .local/
303
+ local/
README.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Legal ML Audit Affaire Enhanced Dataset
2
+
3
+ This project enhances the [les-audits-affaires](https://huggingface.co/datasets/legmlai/les-audits-affaires) dataset by adding reference citations and web search results to create a comprehensive legal dataset for French law analysis.
4
+
5
+ ## Overview
6
+
7
+ The project processes the base dataset from `huggingface.co/datasets/legmlai/les-audits-affaires` and enriches it with:
8
+
9
+ - **Reference Citations**: Parsed from legal framework datasets based on the `legal_framework` field
10
+ - **Web Search Results**: Generated by querying each question through the websearch API
11
+
12
+ ## Dataset Schema
13
+
14
+ The enhanced dataset contains the following columns:
15
+
16
+ | Column | Type | Description |
17
+ |--------|------|-------------|
18
+ | `id` | string | Unique identifier for each entry |
19
+ | `question` | string | Legal question or query |
20
+ | `legal_framework` | string | French legal framework reference |
21
+ | `reference_article_content` | string | Content of the referenced legal article |
22
+ | `reference_article_title` | string | Title of the referenced legal article |
23
+ | `reference_citations` | dict | Dictionary of unique legal references parsed from the content |
24
+ | `websearch_result` | string | Web search results for the question |
25
+
26
+ ## Legal Framework Mapping
27
+
28
+ The project maps legal frameworks to specific datasets for citation parsing:
29
+
30
+ | Legal Framework | Dataset |
31
+ |----------------|---------|
32
+ | Cadre légal: Code de commerce français | `louisbrulenaudet/code-commerce` |
33
+ | Cadre légal: Code du travail français | `louisbrulenaudet/code-travail` |
34
+ | Cadre légal: Code monétaire et financier | `louisbrulenaudet/code-monetaire-financier` |
35
+ | Cadre légal: Droit fiscal français | ```python `None` ``` |
36
+ | Cadre légal: Code général des impôts | `louisbrulenaudet/cgi` |
37
+ | Cadre légal: Code de la propriété intellectuelle | `louisbrulenaudet/code-propriete-intellectuelle` |
38
+ | Cadre légal: Code des assurances | `louisbrulenaudet/code-assurances` |
39
+ | Cadre légal: Code de la consommation | `louisbrulenaudet/code-consommation` |
40
+ | Cadre légal: Code de la commande publique | `louisbrulenaudet/code-commande-publique` |
41
+
42
+ ## Project Structure
43
+
44
+ ```
45
+ legml_audit_affaire_enhanced_dataset/
46
+ ├── datasets/ # Downloaded datasets storage
47
+ ├── docs/ # Documentation
48
+ ├── results/ # Output results
49
+ ├── scripts/ # Utility scripts
50
+ ├── templates/ # README templates for final dataset
51
+ ├── tests/ # Test files
52
+ ├── utils/ # Core processing modules
53
+ │ ├── dataops/ # Dataset operations
54
+ │ ├── web/ # Web search functionality
55
+ │ │ └── websearch.py # Web search implementation
56
+ │ └── {dataset_name}/ # Parser modules for each legal framework
57
+ │ └── parser.py # Content parsing logic
58
+ ├── main.py # Main execution script
59
+ ├── requirements.txt # Python dependencies
60
+ └── README.md # This file
61
+ ```
62
+
63
+ ## Dependencies
64
+
65
+ - `huggingface_datasets` - Dataset loading and manipulation
66
+ - `gradio_client` - Web search API integration
67
+ - `huggingface_hub` - Hugging Face Hub operations
68
+
69
+ ## Installation
70
+
71
+ 1. Clone the repository:
72
+ ```bash
73
+ git clone <repository-url>
74
+ cd legml_audit_affaire_enhanced_dataset
75
+ ```
76
+
77
+ 2. Install dependencies:
78
+ ```bash
79
+ pip install -r requirements.txt
80
+ ```
81
+
82
+ ## Usage
83
+
84
+ ### Running the Main Script
85
+
86
+ ```bash
87
+ python main.py
88
+ ```
89
+
90
+ This will:
91
+ 1. Download the base dataset from `legmlai/les-audits-affaires`
92
+ 2. Download legal framework datasets based on the mapping (None for Legal Framework "Droit Fiscal Francais")
93
+ 3. Parse reference citations from legal content
94
+ 4. Generate web search results for each question
95
+ 5. Create the enhanced dataset with all additional columns
96
+
97
+ ### Processing Pipeline
98
+
99
+ 1. **Dataset Loading**: Downloads the base dataset and legal framework datasets
100
+ 2. **Citation Parsing**: For each entry, parses the `reference_article_content` to extract citations based on the `legal_framework`
101
+ 3. **Web Search**: Queries the websearch API for each question using the Gradio client
102
+ 4. **Dataset Enhancement**: Combines all data into the final enhanced dataset
103
+
104
+ ## Output
105
+
106
+ The enhanced dataset will be saved in the `results/` directory with the final dataset :
107
+
108
+ - Enhanced dataset with all original columns plus `reference_citations` and `websearch_result`
109
+
110
+ ## Contributing
111
+
112
+ 1. Fork the repository
113
+ 2. Create a feature branch
114
+ 3. Make your changes
115
+ 4. Add tests if applicable
116
+ 5. Submit a pull request
117
+
118
+ ## License
119
+
120
+ [Add your license information here]
121
+
122
+ ## Citation
123
+
124
+ If you use this dataset in your research, please cite:
125
+
126
+ ```bibtex
127
+ @dataset{legml_audit_affaire_enhanced,
128
+ title={Legal ML Audit Affaire Enhanced Dataset},
129
+ author={[Your Name/Organization]},
130
+ year={2024},
131
+ url={[Dataset URL]}
132
+ }
133
+ ```
134
+
135
+ ## Acknowledgments
136
+
137
+ - Original dataset: [les-audits-affaires](https://huggingface.co/datasets/legmlai/les-audits-affaires)
138
+ - Legal framework datasets: [louisbrulenaudet](https://huggingface.co/louisbrulenaudet)
139
+ - Web search API: [victor/websearch](https://huggingface.co/spaces/victor/websearch)
140
+
remote.md ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ remote command to access devbox
2
+
3
+ `ssh -i ~/.ssh/id_ed25519 tonic-devbox@ssh.hf.space`
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ gradio_client
utils/cgi/cgi.py ADDED
File without changes
utils/cgi/readme.md ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CGI Dataset - Code Général des Impôts
2
+
3
+ ## Overview
4
+
5
+ The **CGI (Code Général des Impôts)** dataset is a specialized French legal dataset focused on tax law and practice. This dataset contains the French General Tax Code as of December 11, 2023, and is designed for fine-tuning pre-trained language models to create efficient and accurate models for tax practice.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Dataset ID:** `louisbrulenaudet/cgi`
10
+ - **Author:** louisbrulenaudet
11
+ - **Downloads:** 517+
12
+ - **Last Updated:** December 11, 2023
13
+ - **License:** Apache 2.0
14
+ - **Language:** French (fr)
15
+ - **Size Category:** 1K-10K samples
16
+
17
+ ## Purpose and Applications
18
+
19
+ This dataset is specifically designed for:
20
+
21
+ - **Fine-tuning Language Models:** Adapting pre-trained models for tax law domain expertise
22
+ - **Text Generation:** Generating tax-related legal text and responses
23
+ - **Table Question Answering:** Answering questions about tax codes and regulations
24
+ - **Summarization:** Creating concise summaries of complex tax documents
25
+ - **Conversational AI:** Building tax law chatbots and assistants
26
+
27
+ ## Key Features
28
+
29
+ - **Domain-Specific:** Focused on French tax law and the Code Général des Impôts
30
+ - **Legal Expertise:** Contains comprehensive tax code information
31
+ - **Multilingual Support:** Primarily French language content
32
+ - **Structured Format:** JSON format for easy processing
33
+ - **Research-Ready:** Includes DOI and proper metadata for academic use
34
+
35
+ ## Technical Specifications
36
+
37
+ - **Format:** JSON
38
+ - **Modality:** Text
39
+ - **Task Categories:**
40
+ - Text Generation
41
+ - Table Question Answering
42
+ - Summarization
43
+ - Conversational AI
44
+ - **Libraries Supported:** datasets, pandas, mlcroissant, polars
45
+
46
+ ## Use Cases
47
+
48
+ 1. **Legal AI Development:** Building AI assistants for tax professionals
49
+ 2. **Document Analysis:** Processing and understanding tax-related documents
50
+ 3. **Question Answering:** Creating systems that can answer tax law questions
51
+ 4. **Legal Research:** Supporting tax law research and analysis
52
+ 5. **Compliance Tools:** Developing tools for tax compliance and regulation
53
+
54
+ ## Dataset Link
55
+
56
+ **Hugging Face Hub:** [https://hf.co/datasets/louisbrulenaudet/cgi](https://hf.co/datasets/louisbrulenaudet/cgi)
57
+
58
+ ## Citation
59
+
60
+ If you use this dataset in your research, please cite:
61
+ ```
62
+ DOI: 10.57967/hf/1438
63
+ ```
64
+
65
+ ## Dataset Structure
66
+
67
+ The dataset contains structured legal text with the following typical row format:
68
+
69
+ ### Example Row
70
+
71
+ ```json
72
+ {
73
+ "output": "Ne constituent pas un revenu imposable du bailleur les éléments de revenus relevant du présent I ayant fait l'objet, par le bailleur, d'un abandon ou d'une renonciation au profit de l'entreprise locataire entre le 15 avril 2020 et le 31 décembre 2021 dans les conditions et limites mentionnées au 9° du 1 de l'article 39. L'application du présent article ne fait pas obstacle à la déduction des charges correspondant aux éléments de revenus ayant fait l'objet d'un abandon ou d'une renonciation. Lorsque l'entreprise locataire est exploitée par un ascendant, un descendant ou un membre du foyer fiscal du bailleur, le bénéfice des dispositions du présent article est subordonné à la condition que le bailleur puisse justifier par tous moyens des difficultés de trésorerie de l'entreprise.",
74
+ "input": "Code général des impôts, art. 14 B",
75
+ "instruction": "Rédigez la totalité du texte de l'article en entier."
76
+ }
77
+ ```
78
+
79
+ ### Field Descriptions
80
+
81
+ - **output**: The complete legal text of the article (average length: ~584 characters)
82
+ - **input**: The legal reference (e.g., "Code général des impôts, art. 14 B")
83
+ - **instruction**: The task instruction for generating the complete article text
84
+
85
+ ## Tags
86
+
87
+ - `legal` - Legal domain dataset
88
+ - `tax` - Tax law focus
89
+ - `fiscal` - Fiscal regulations
90
+ - `cgi` - Code Général des Impôts
91
+ - `finetuning` - Designed for model fine-tuning
92
+ - `llm` - Large Language Model applications
93
+ - `french` - French language content
94
+ - `legal-ai` - Legal artificial intelligence applications
utils/code_assurance/code_assurance.py ADDED
File without changes
utils/code_assurance/readme.md ADDED
@@ -0,0 +1,168 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code des Assurances Dataset
2
+
3
+ ## Overview
4
+
5
+ The **Code des Assurances** dataset is a comprehensive French legal text collection that provides researchers, professionals, and law students with simplified, up-to-date access to French insurance law texts. This dataset is part of a larger project aimed at facilitating the integration of French legal texts into Community and European projects.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Dataset ID:** `louisbrulenaudet/code-assurances`
10
+ - **Author:** louisbrulenaudet
11
+ - **Downloads:** 2.6K+
12
+ - **Last Updated:** July 31, 2025
13
+ - **License:** Apache 2.0
14
+ - **DOI:** 10.57967/hf/1455
15
+
16
+ ## Description
17
+
18
+ The objective of this project is to provide researchers, professionals and law students with simplified, up-to-date access to all French legal texts, enriched with a wealth of data to facilitate their integration into Community and European projects.
19
+
20
+ The dataset contains the French Insurance Code (Code des Assurances) in a structured format, with data refreshed daily on all legal codes. It aims to simplify the production of training sets and labeling pipelines for the development of free, open-source language models.
21
+
22
+ ## Technical Specifications
23
+
24
+ ### Format
25
+ - **Primary Format:** Parquet
26
+ - **Modality:** Tabular and Text
27
+ - **Language:** French (Monolingual)
28
+
29
+ ### Size Category
30
+ - **Size Range:** 1K < n < 10K entries
31
+
32
+ ### Supported Libraries
33
+ - datasets
34
+ - pandas
35
+ - mlcroissant
36
+ - polars
37
+
38
+ ### Dataset Structure
39
+
40
+ The dataset contains structured legal articles with the following key fields:
41
+
42
+ #### Core Fields
43
+ - **`ref`** (string): Article reference (e.g., "Code des assurances, art. L100-1")
44
+ - **`title_main`** (string): Main title (e.g., "Code des assurances")
45
+ - **`texte`** (string): Full legal text content (average ~598 characters)
46
+ - **`num`** (string): Article number (e.g., "L100-1")
47
+ - **`id`** (string): Unique article identifier (e.g., "LEGIARTI000030437933")
48
+ - **`cid`** (string): Content identifier (e.g., "LEGIARTI000006791829")
49
+
50
+ #### Metadata Fields
51
+ - **`type`** (string): Article type (e.g., "AUTONOME")
52
+ - **`etat`** (string): Legal status (e.g., "VIGUEUR" - in force)
53
+ - **`nature`** (string): Content nature (e.g., "Article")
54
+ - **`origine`** (string): Source origin (e.g., "LEGI")
55
+ - **`dateDebut`** (int64): Start date timestamp
56
+ - **`dateFin`** (int64): End date timestamp
57
+
58
+ #### HTML and Formatting
59
+ - **`texteHtml`** (string): HTML-formatted legal text with links
60
+ - **`nota`** (string): Additional notes (83.6% coverage)
61
+ - **`notaHtml`** (string): HTML-formatted notes
62
+
63
+ #### Structural Information
64
+ - **`sectionParentId`** (string): Parent section identifier
65
+ - **`sectionParentTitre`** (string): Parent section title (e.g., "Livre Ier : Le contrat")
66
+ - **`fullSectionsTitre`** (string): Full section hierarchy path
67
+ - **`ordre`** (int64): Display order within section
68
+
69
+ #### Cross-References
70
+ - **`lienCitations`** (list): Citations to other legal texts
71
+ - **`lienAutres`** (list): Other legal references
72
+ - **`versionPrecedente`** (string): Previous version reference
73
+ - **`refInjection`** (string): Injection reference
74
+
75
+ ### Typical Entry Example
76
+
77
+ ```json
78
+ {
79
+ "ref": "Code des assurances, art. L100-1",
80
+ "title_main": "Code des assurances",
81
+ "texte": "Pour l'application du présent livre, les mots : \" la France \", les mots : \" en France \", et les mots : \" territoire de la République française \" désignent la France métropolitaine et les collectivités territoriales régies par l'article 73 de la Constitution ainsi que Saint-Barthélemy et Saint-Martin. Sauf pour les dispositions qui concernent la libre prestation de services et la liberté d'établissement, ces mots désignent également Saint-Pierre-et-Miquelon.",
82
+ "num": "L100-1",
83
+ "id": "LEGIARTI000030437933",
84
+ "cid": "LEGIARTI000006791829",
85
+ "type": "AUTONOME",
86
+ "etat": "VIGUEUR",
87
+ "nature": "Article",
88
+ "origine": "LEGI",
89
+ "dateDebut": 1451606400000,
90
+ "dateFin": 32472144000000,
91
+ "texteHtml": "<p>Pour l'application du présent livre, les mots : \" la France \", les mots : \" en France \", et les mots : \" territoire de la République française \" désignent la France métropolitaine et les collectivités territoriales régies par <a href=\"/affichTexteArticle.do?cidTexte=JORFTEXT000000571356&idArticle=LEGIARTI000006527580&dateTexte=&categorieLien=cid\" title=\"Constitution du 4 octobre 1958 - art. 73 (V)\">l'article 73</a> de la Constitution ainsi que Saint-Barthélemy et Saint-Martin. Sauf pour les dispositions qui concernent la libre prestation de services et la liberté d'établissement, ces mots désignent également Saint-Pierre-et-Miquelon.</p>",
92
+ "sectionParentTitre": "Livre Ier : Le contrat",
93
+ "fullSectionsTitre": "Partie législative > Livre Ier : Le contrat",
94
+ "lienCitations": [
95
+ {
96
+ "articleId": "LEGIARTI000006527580",
97
+ "articleNum": "73",
98
+ "natureText": "CONSTITUTION",
99
+ "textTitle": "Constitution du 4 octobre 1958 - art. 73 (V)"
100
+ }
101
+ ],
102
+ "lienAutres": []
103
+ }
104
+ ```
105
+
106
+ ## Task Categories
107
+
108
+ This dataset is suitable for various natural language processing tasks:
109
+
110
+ - **Text Generation:** Generate legal text based on prompts
111
+ - **Table Question Answering:** Answer questions about legal provisions
112
+ - **Summarization:** Summarize legal texts and articles
113
+ - **Text Retrieval:** Find relevant legal provisions
114
+ - **Question Answering:** Answer legal questions
115
+ - **Text Classification:** Categorize legal texts
116
+
117
+ ## Tags and Categories
118
+
119
+ ### Primary Tags
120
+ - `legal` - Legal domain content
121
+ - `french law` - French legal system
122
+ - `droit français` - French law
123
+ - `Code des assurances` - Insurance code
124
+
125
+ ### Technical Tags
126
+ - `task_categories:text-generation`
127
+ - `task_categories:table-question-answering`
128
+ - `task_categories:summarization`
129
+ - `task_categories:text-retrieval`
130
+ - `task_categories:question-answering`
131
+ - `task_categories:text-classification`
132
+ - `multilinguality:monolingual`
133
+ - `source_datasets:original`
134
+ - `language:fr`
135
+ - `license:apache-2-0`
136
+ - `size_categories:1K<n<10K`
137
+ - `format:parquet`
138
+ - `modality:tabular`
139
+ - `modality:text`
140
+ - `finetuning`
141
+
142
+ ## Usage
143
+
144
+ This dataset is particularly useful for:
145
+
146
+ 1. **Legal AI Development:** Training language models for legal text understanding
147
+ 2. **Legal Research:** Providing structured access to French insurance law
148
+ 3. **Educational Purposes:** Supporting law students and legal professionals
149
+ 4. **European Legal Integration:** Facilitating cross-border legal text processing
150
+
151
+ ## Dataset Link
152
+
153
+ **Hugging Face Hub:** [https://hf.co/datasets/louisbrulenaudet/code-assurances](https://hf.co/datasets/louisbrulenaudet/code-assurances)
154
+
155
+ ## Related Datasets
156
+
157
+ This dataset is part of a larger collection of French legal codes maintained by the same author, providing comprehensive coverage of French legal texts.
158
+
159
+ ## Citation
160
+
161
+ If you use this dataset in your research, please cite:
162
+ ```
163
+ DOI: 10.57967/hf/1455
164
+ ```
165
+
166
+ ## License
167
+
168
+ This dataset is released under the Apache 2.0 license, allowing for both commercial and non-commercial use with appropriate attribution.
utils/code_commande_publique/code_commande_publique.py ADDED
File without changes
utils/code_commande_publique/readme.md ADDED
@@ -0,0 +1,178 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code de la Commande Publique Dataset
2
+
3
+ ## Overview
4
+
5
+ The **Code de la Commande Publique** dataset is a comprehensive collection of French public procurement law texts, designed to provide researchers, professionals, and law students with simplified, up-to-date access to French legal texts. This dataset is enriched with metadata to facilitate integration into Community and European projects.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Dataset ID:** `louisbrulenaudet/code-commande-publique`
10
+ - **Author:** louisbrulenaudet
11
+ - **Downloads:** 2.7K+
12
+ - **Last Updated:** July 31, 2025
13
+ - **License:** Apache 2.0
14
+ - **DOI:** 10.57967/hf/1458
15
+
16
+ ## Description
17
+
18
+ The objective of this project is to provide researchers, professionals, and law students with simplified, up-to-date access to all French legal texts, enriched with a wealth of data to facilitate their integration into Community and European projects.
19
+
20
+ The data is refreshed daily on all legal codes and aims to simplify the production of training sets and labeling pipelines for the development of free, open-source legal AI applications.
21
+
22
+ ## Key Features
23
+
24
+ - **Language:** French (fr)
25
+ - **Size Category:** 1K-10K entries
26
+ - **Format:** Parquet
27
+ - **Modality:** Tabular and Text
28
+ - **Multilinguality:** Monolingual (French)
29
+
30
+ ## Supported Tasks
31
+
32
+ This dataset supports multiple natural language processing tasks:
33
+
34
+ - **Text Generation:** Generate legal text based on prompts
35
+ - **Table Question Answering:** Answer questions about legal tables and structured data
36
+ - **Summarization:** Create summaries of legal texts
37
+ - **Text Retrieval:** Find relevant legal passages
38
+ - **Question Answering:** Answer legal questions
39
+ - **Text Classification:** Categorize legal documents
40
+
41
+ ## Technical Details
42
+
43
+ ### Libraries Supported
44
+ - datasets
45
+ - pandas
46
+ - mlcroissant
47
+ - polars
48
+
49
+ ### Dataset Structure
50
+
51
+ The dataset contains structured legal articles with the following key fields:
52
+
53
+ #### Core Fields
54
+ - **`ref`** (string): Article reference (e.g., "Code de la commande publique, art. L1121-2")
55
+ - **`title_main`** (string): Main title (e.g., "Code de la commande publique")
56
+ - **`texte`** (string): Full legal text content
57
+ - **`num`** (string): Article number (e.g., "L1121-2")
58
+ - **`id`** (string): Unique article identifier (e.g., "LEGIARTI000037703290")
59
+ - **`cid`** (string): Content identifier (e.g., "LEGIARTI000037703290")
60
+
61
+ #### Metadata Fields
62
+ - **`type`** (string): Article type (e.g., "AUTONOME")
63
+ - **`etat`** (string): Legal status (e.g., "VIGUEUR" - in force)
64
+ - **`nature`** (string): Content nature (e.g., "Article")
65
+ - **`origine`** (string): Source origin (e.g., "LEGI")
66
+ - **`dateDebut`** (int64): Start date timestamp
67
+ - **`dateFin`** (int64): End date timestamp
68
+
69
+ #### HTML and Formatting
70
+ - **`texteHtml`** (string): HTML-formatted legal text with links
71
+ - **`nota`** (string): Additional notes
72
+ - **`notaHtml`** (string): HTML-formatted notes
73
+
74
+ #### Structural Information
75
+ - **`sectionParentId`** (string): Parent section identifier
76
+ - **`sectionParentTitre`** (string): Parent section title (e.g., "Section 2 : Objet")
77
+ - **`fullSectionsTitre`** (string): Full section hierarchy path
78
+ - **`ordre`** (int64): Display order within section
79
+
80
+ #### Cross-References
81
+ - **`lienCitations`** (list): Citations to other legal texts
82
+ - **`lienAutres`** (list): Other legal references
83
+ - **`versionPrecedente`** (string): Previous version reference
84
+ - **`refInjection`** (string): Injection reference
85
+
86
+ ### Typical Entry Example
87
+
88
+ ```json
89
+ {
90
+ "ref": "Code de la commande publique, art. L1121-2",
91
+ "title_main": "Code de la commande publique",
92
+ "texte": "Un contrat de concession de travaux a pour objet : 1° Soit l'exécution, soit la conception et l'exécution de travaux dont la liste figure dans un avis annexé au présent code ; 2° Soit la réalisation, soit la conception et la réalisation, par quelque moyen que ce soit, d'un ouvrage répondant aux exigences fixées par l'autorité concédante. Un ouvrage est le résultat d'un ensemble de travaux de bâtiment ou de génie civil destiné à remplir par lui-même une fonction économique ou technique.",
93
+ "num": "L1121-2",
94
+ "id": "LEGIARTI000037703290",
95
+ "cid": "LEGIARTI000037703290",
96
+ "type": "AUTONOME",
97
+ "etat": "VIGUEUR",
98
+ "nature": "Article",
99
+ "origine": "LEGI",
100
+ "dateDebut": 1554076800000,
101
+ "dateFin": 32472144000000,
102
+ "texteHtml": "<p><br/>Un contrat de concession de travaux a pour objet :<br/>1° Soit l'exécution, soit la conception et l'exécution de travaux dont la liste figure dans un avis annexé au présent code ;<br/>2° Soit la réalisation, soit la conception et la réalisation, par quelque moyen que ce soit, d'un ouvrage répondant aux exigences fixées par l'autorité concédante.<br/>Un ouvrage est le résultat d'un ensemble de travaux de bâtiment ou de génie civil destiné à remplir par lui-même une fonction économique ou technique.</p>",
103
+ "sectionParentTitre": "Section 2 : Objet",
104
+ "fullSectionsTitre": "Partie législative > PREMIÈRE PARTIE : DÉFINITIONS ET CHAMP D'APPLICATION > Livre Ier : CONTRATS DE LA COMMANDE PUBLIQUE > Titre II : CONTRATS DE CONCESSION > Chapitre Ier : Contrat de concession > Section 2 : Objet",
105
+ "lienCitations": [
106
+ {
107
+ "articleId": "JORFARTI000038318373",
108
+ "articleNum": "",
109
+ "dateDebut": 32472144000000,
110
+ "datePubli": 1553990400000,
111
+ "linkOrientation": "cible",
112
+ "linkType": "CITATION",
113
+ "natureText": "ARRETE",
114
+ "numTexte": "",
115
+ "parentCid": null,
116
+ "textCid": "JORFTEXT000038318367",
117
+ "textTitle": "Arrêté du 22 mars 2019 - art., v. init."
118
+ },
119
+ {
120
+ "articleId": "LEGIARTI000038319372",
121
+ "articleNum": "",
122
+ "dateDebut": 1554076800000,
123
+ "datePubli": 1553990400000,
124
+ "linkOrientation": "cible",
125
+ "linkType": "CITATION",
126
+ "natureText": "AVIS",
127
+ "numTexte": "",
128
+ "parentCid": null,
129
+ "textCid": "JORFTEXT000038319246",
130
+ "textTitle": "Avis divers - art. (V)"
131
+ },
132
+ {
133
+ "articleId": "LEGIARTI000046909723",
134
+ "articleNum": "Annexe préliminaire",
135
+ "dateDebut": 1704067200000,
136
+ "datePubli": 32472144000000,
137
+ "linkOrientation": "cible",
138
+ "linkType": "CITATION",
139
+ "natureText": "CODE",
140
+ "numTexte": "",
141
+ "parentCid": null,
142
+ "textCid": "LEGITEXT000037701019",
143
+ "textTitle": "Code de la commande publique - art. Annexe préliminaire (VD)"
144
+ }
145
+ ],
146
+ "lienAutres": []
147
+ }
148
+ ```
149
+
150
+ ### Tags
151
+ - `legal`
152
+ - `french law`
153
+ - `droit français`
154
+ - `Code de la commande publique`
155
+ - `finetuning`
156
+
157
+ ## Usage
158
+
159
+ This dataset is particularly useful for:
160
+
161
+ 1. **Legal AI Development:** Training models for legal text understanding and generation
162
+ 2. **Research:** Academic research in legal NLP and computational law
163
+ 3. **Professional Tools:** Development of legal assistance tools and applications
164
+ 4. **Education:** Law student training and educational applications
165
+
166
+ ## Access
167
+
168
+ - **Hugging Face Hub:** [https://hf.co/datasets/louisbrulenaudet/code-commande-publique](https://hf.co/datasets/louisbrulenaudet/code-commande-publique)
169
+ - **License:** Apache 2.0 (commercial use permitted with attribution)
170
+
171
+ ## Updates
172
+
173
+ The dataset is updated daily to ensure the most current version of French legal codes is available for users.
174
+
175
+ ---
176
+
177
+ *This dataset is part of a larger effort to make French legal texts more accessible and usable for AI applications while maintaining accuracy and legal validity.*
178
+
utils/code_commerce/code_commerce.py ADDED
File without changes
utils/code_commerce/readme.md ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code de Commerce Dataset
2
+
3
+ ## Overview
4
+
5
+ The **Code de Commerce** dataset is a comprehensive French legal text dataset that provides researchers, professionals, and law students with simplified, up-to-date access to French commercial law texts. This dataset is part of a larger project aimed at facilitating the integration of French legal texts into Community and European projects.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Dataset ID:** `louisbrulenaudet/code-commerce`
10
+ - **Author:** louisbrulenaudet
11
+ - **License:** Apache 2.0
12
+ - **Language:** French (fr)
13
+ - **Format:** Parquet
14
+ - **Size Category:** 1K<n<10K
15
+ - **DOI:** 10.57967/hf/1448
16
+
17
+ ## Key Features
18
+
19
+ ### Content
20
+ - **Type:** Non-instruct version of French Commercial Code
21
+ - **Last Updated:** July 30, 2025
22
+ - **Coverage:** Complete French Commercial Code (Code de commerce)
23
+ - **Purpose:** Legal research, professional practice, and law education
24
+
25
+ ### Technical Specifications
26
+ - **Modality:** Text and Tabular data
27
+ - **Libraries Supported:** datasets, pandas, mlcroissant, polars
28
+ - **Region:** US-based
29
+ - **Downloads:** 3.2K+
30
+ - **Likes:** 2
31
+
32
+ ## Use Cases
33
+
34
+ This dataset supports multiple natural language processing tasks:
35
+
36
+ - **Text Generation:** Generate legal text based on commercial law contexts
37
+ - **Table Question Answering:** Answer questions about commercial law data
38
+ - **Summarization:** Summarize complex legal texts
39
+ - **Text Retrieval:** Find relevant legal information
40
+ - **Question Answering:** Answer legal questions about commercial law
41
+ - **Text Classification:** Categorize legal documents and texts
42
+
43
+ ## Dataset Tags
44
+
45
+ - `task_categories:text-generation`
46
+ - `task_categories:table-question-answering`
47
+ - `task_categories:summarization`
48
+ - `task_categories:text-retrieval`
49
+ - `task_categories:question-answering`
50
+ - `task_categories:text-classification`
51
+ - `multilinguality:monolingual`
52
+ - `source_datasets:original`
53
+ - `language:fr`
54
+ - `license:apache-2.0`
55
+ - `size_categories:1K<n<10K`
56
+ - `format:parquet`
57
+ - `modality:tabular`
58
+ - `modality:text`
59
+ - `library:datasets`
60
+ - `library:pandas`
61
+ - `library:mlcroissant`
62
+ - `library:polars`
63
+ - `doi:10.57967/hf/1448`
64
+ - `region:us`
65
+ - `finetuning`
66
+ - `legal`
67
+ - `french law`
68
+ - `droit français`
69
+ - `Code de commerce`
70
+
71
+ ## Dataset Structure
72
+
73
+ The dataset contains French Commercial Code articles with the following key fields:
74
+
75
+ ### Core Fields
76
+ - **ref**: Article reference (e.g., "Code de commerce, art. L123-6")
77
+ - **title_main**: Main title (e.g., "Code de commerce")
78
+ - **texte**: Article text content (legal text)
79
+ - **texteHtml**: HTML formatted article text
80
+ - **num**: Article number (e.g., "L123-6")
81
+ - **id**: Unique article identifier (e.g., "LEGIARTI000051559571")
82
+ - **cid**: Content identifier (e.g., "LEGIARTI000006219292")
83
+ - **type**: Article type (e.g., "AUTONOME")
84
+ - **etat**: Legal status (e.g., "VIGUEUR" - in force)
85
+ - **nature**: Article nature (e.g., "Article")
86
+
87
+ ### Metadata Fields
88
+ - **dateDebut**: Start date (timestamp)
89
+ - **dateFin**: End date (timestamp)
90
+ - **version_article**: Article version (e.g., "6.0")
91
+ - **ordre**: Order/sequence number
92
+ - **origine**: Source origin (e.g., "LEGI")
93
+ - **sectionParentId**: Parent section ID
94
+ - **sectionParentTitre**: Parent section title
95
+ - **fullSectionsTitre**: Full section hierarchy title
96
+
97
+ ### Link Fields
98
+ - **lienCitations**: List of citation links to other legal texts
99
+ - **lienAutres**: List of other legal links
100
+
101
+ ### Example Row
102
+
103
+ ```json
104
+ {
105
+ "ref": "Code de commerce, art. L123-6",
106
+ "title_main": "Code de commerce",
107
+ "texte": "Le registre du commerce et des sociétés est tenu par le greffier de chaque tribunal de commerce, sous la surveillance du président ou d'un juge commis à cet effet, qui sont compétents pour toutes contestations entre l'assujetti et le greffier ainsi que pour tous recours exercés contre une décision, même implicite, du greffier du tribunal de commerce ou du tribunal judiciaire statuant en matière commerciale, prise en application de l'article L. 561-46-2 du code monétaire et financier.",
108
+ "dateDebut": 1746230400000,
109
+ "dateFin": 32472144000000,
110
+ "num": "L123-6",
111
+ "id": "LEGIARTI000051559571",
112
+ "cid": "LEGIARTI000006219292",
113
+ "type": "AUTONOME",
114
+ "etat": "VIGUEUR",
115
+ "nota": null,
116
+ "version_article": "6.0",
117
+ "ordre": 42949,
118
+ "conditionDiffere": null,
119
+ "infosComplementaires": null,
120
+ "surtitre": null,
121
+ "nature": "Article",
122
+ "texteHtml": "<p>Le registre du commerce et des sociétés est tenu par le greffier de chaque tribunal de commerce, sous la surveillance du président ou d'un juge commis à cet effet, qui sont compétents pour toutes contestations entre l'assujetti et le greffier ainsi que pour tous recours exercés contre une décision, même implicite, du greffier du tribunal de commerce ou du tribunal judiciaire statuant en matière commerciale, prise en application de l'article L. 561-46-2 du code monétaire et financier.</p>",
123
+ "dateFinExtension": 32472144000000,
124
+ "versionPrecedente": "LEGIARTI000044056256",
125
+ "refInjection": "MD-20250619_200300_541_BDJQUOT",
126
+ "idTexte": null,
127
+ "idTechInjection": "index_DATA_ARTICLE_LEGIARTI000051559571",
128
+ "origine": "LEGI",
129
+ "dateDebutExtension": 32472144000000,
130
+ "idEliAlias": null,
131
+ "cidTexte": null,
132
+ "sectionParentId": "LEGISCTA000006178752",
133
+ "multipleVersions": false,
134
+ "comporteLiensSP": false,
135
+ "sectionParentTitre": "Sous-section 2 : Tenue du registre et effets attachés à l'immatriculation.",
136
+ "infosRestructurationBranche": null,
137
+ "idEli": null,
138
+ "sectionParentCid": "LEGISCTA000006178752",
139
+ "numeroBo": null,
140
+ "infosRestructurationBrancheHtml": null,
141
+ "historique": null,
142
+ "infosComplementairesHtml": null,
143
+ "renvoi": null,
144
+ "fullSectionsTitre": "Partie législative > LIVRE Ier : Du commerce en général. > TITRE II : Des commerçants. > Chapitre III : Des obligations générales des commerçants. > Section 1 : Du registre du commerce et des sociétés > Sous-section 2 : Tenue du registre et effets attachés à l'immatriculation.",
145
+ "notaHtml": null,
146
+ "inap": null,
147
+ "lienCitations": [
148
+ {
149
+ "articleId": "LEGIARTI000006541148",
150
+ "articleNum": "4",
151
+ "dateDebut": 1107302400000,
152
+ "datePubli": 454809600000,
153
+ "linkOrientation": "cible",
154
+ "linkType": "CITATION",
155
+ "natureText": "DECRET",
156
+ "numTexte": "84-406",
157
+ "parentCid": null,
158
+ "textCid": "JORFTEXT000000882403",
159
+ "textTitle": "Décret n°84-406 du 30 mai 1984 - art. 4 (Ab)"
160
+ }
161
+ ],
162
+ "lienAutres": []
163
+ }
164
+ ```
165
+
166
+ ## Project Objectives
167
+
168
+ 1. **Simplified Access:** Provide easy access to French legal texts
169
+ 2. **Daily Updates:** Refresh data daily on all legal codes
170
+ 3. **Training Sets:** Simplify production of training sets for language models
171
+ 4. **Labeling Pipelines:** Facilitate development of labeling pipelines
172
+ 5. **Open Source:** Support development of free, open-source language models
173
+ 6. **European Integration:** Aid integration into Community and European projects
174
+
175
+ ## Usage
176
+
177
+ This dataset is particularly useful for:
178
+ - Legal AI research and development
179
+ - French law education and training
180
+ - Commercial law analysis and automation
181
+ - Legal document processing systems
182
+ - Multilingual legal AI applications
183
+
184
+ ## Links
185
+
186
+ - **Hugging Face Dataset:** [https://hf.co/datasets/louisbrulenaudet/code-commerce](https://hf.co/datasets/louisbrulenaudet/code-commerce)
187
+ - **Created:** December 12, 2023
188
+ - **Last Modified:** July 31, 2025
189
+
190
+ ## Citation
191
+
192
+ If you use this dataset in your research, please cite:
193
+ ```
194
+ DOI: 10.57967/hf/1448
195
+ ```
utils/code_consommation/code_consommation.py ADDED
File without changes
utils/code_consommation/readme.md ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code de la Consommation Dataset
2
+
3
+ ## Overview
4
+
5
+ The **Code de la Consommation** dataset is a comprehensive French legal text collection that provides researchers, professionals, and law students with simplified, up-to-date access to French consumer law. This dataset is part of a larger project aimed at facilitating the integration of French legal texts into Community and European projects.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Dataset ID:** `louisbrulenaudet/code-consommation`
10
+ - **Author:** louisbrulenaudet
11
+ - **Downloads:** 4.5K+
12
+ - **Last Updated:** July 31, 2025
13
+ - **License:** Apache 2.0
14
+ - **DOI:** 10.57967/hf/1446
15
+
16
+ ## Description
17
+
18
+ This dataset contains the French Consumer Code (Code de la consommation) in a structured format optimized for machine learning applications. The objective is to provide simplified, up-to-date access to French legal texts enriched with comprehensive data to facilitate their integration into Community and European projects.
19
+
20
+ ### Key Features
21
+
22
+ - **Daily Updates:** Data is refreshed daily on all legal codes
23
+ - **Training Set Production:** Designed to simplify the production of training sets and labeling pipelines
24
+ - **Open Source Development:** Supports the development of free, open-source language models
25
+ - **Legal Text Processing:** Optimized for French legal text analysis and understanding
26
+
27
+ ## Technical Specifications
28
+
29
+ ### Format
30
+ - **Primary Format:** Parquet
31
+ - **Modality:** Tabular and Text
32
+ - **Size Category:** 1K-10K entries
33
+
34
+ ### Supported Libraries
35
+ - datasets
36
+ - pandas
37
+ - mlcroissant
38
+ - polars
39
+
40
+ ## Task Categories
41
+
42
+ This dataset supports multiple natural language processing tasks:
43
+
44
+ - **Text Generation:** Generate legal text based on prompts
45
+ - **Table Question Answering:** Answer questions about legal provisions
46
+ - **Summarization:** Summarize legal texts and provisions
47
+ - **Text Retrieval:** Retrieve relevant legal information
48
+ - **Question Answering:** Answer legal questions
49
+ - **Text Classification:** Classify legal documents and provisions
50
+
51
+ ## Language and Region
52
+
53
+ - **Language:** French (fr)
54
+ - **Region:** US
55
+ - **Multilinguality:** Monolingual
56
+
57
+ ## Tags
58
+
59
+ - `legal`
60
+ - `french law`
61
+ - `droit français`
62
+ - `Code de la consommation`
63
+ - `finetuning`
64
+ - `text-generation`
65
+ - `table-question-answering`
66
+ - `summarization`
67
+ - `text-retrieval`
68
+ - `question-answering`
69
+ - `text-classification`
70
+
71
+ ## Usage
72
+
73
+ This dataset is particularly useful for:
74
+
75
+ 1. **Legal AI Development:** Training language models for French legal text understanding
76
+ 2. **Consumer Law Research:** Analyzing French consumer protection regulations
77
+ 3. **Legal Document Processing:** Building systems for legal text analysis
78
+ 4. **European Legal Integration:** Supporting cross-border legal text processing
79
+ 5. **Legal Education:** Supporting law students and legal professionals
80
+
81
+ ## Access
82
+
83
+ - **Hugging Face Link:** [https://hf.co/datasets/louisbrulenaudet/code-consommation](https://hf.co/datasets/louisbrulenaudet/code-consommation)
84
+ - **License:** Apache 2.0 (commercial use permitted)
85
+
86
+ ## Dataset Schema
87
+
88
+ The dataset contains structured legal articles with the following key fields:
89
+
90
+ ### Core Fields
91
+ - **ref**: Article reference (e.g., "Code de la consommation, art. L112-5")
92
+ - **title_main**: Main title of the legal text
93
+ - **texte**: Full text content of the legal article
94
+ - **dateDebut**: Start date (timestamp)
95
+ - **dateFin**: End date (timestamp)
96
+ - **num**: Article number (e.g., "L112-5")
97
+ - **id**: Unique article identifier
98
+ - **cid**: Content identifier
99
+ - **type**: Article type (e.g., "AUTONOME")
100
+ - **etat**: Status (e.g., "VIGUEUR" for in force)
101
+ - **version_article**: Version number
102
+ - **ordre**: Order/sequence number
103
+ - **texteHtml**: HTML formatted text content
104
+
105
+ ### Metadata Fields
106
+ - **nature**: Article nature (e.g., "Article")
107
+ - **origine**: Source origin (e.g., "LEGI")
108
+ - **sectionParentTitre**: Parent section title
109
+ - **fullSectionsTitre**: Full section hierarchy
110
+ - **lienCitations**: List of citation links to other articles
111
+ - **lienAutres**: List of other related links
112
+
113
+ ### Example Row
114
+
115
+ ```json
116
+ {
117
+ "ref": "Code de la consommation, art. L112-5",
118
+ "title_main": "Code de la consommation",
119
+ "texte": "Tout professionnel peut demander à l'autorité administrative chargée de la concurrence et de la consommation de prendre formellement position sur la conformité aux articles L. 112-1 à L. 112-4 et aux mesures réglementaires prises pour leur application, des modalités de l'information sur les prix de vente au consommateur qu'il envisage de mettre en place. Cette prise de position formelle a pour objet de prémunir le demandeur d'un changement d'appréciation de l'autorité administrative qui serait de nature à l'exposer à la sanction administrative prévue aux articles L. 131-5 et L. 131-6. L'autorité administrative prend formellement position sur cette demande dans un délai fixé par décret en Conseil d'Etat. Le silence gardé par l'autorité administrative à l'issue de ce délai vaut rejet de cette demande. Un décret en Conseil d'Etat précise les modalités d'application du présent article, notamment le contenu, les modalités de dépôt et d'avis de réception de la demande.",
120
+ "dateDebut": 1467331200000,
121
+ "dateFin": 32472144000000,
122
+ "num": "L112-5",
123
+ "id": "LEGIARTI000032227323",
124
+ "cid": "LEGIARTI000032220929",
125
+ "type": "AUTONOME",
126
+ "etat": "VIGUEUR",
127
+ "nota": "1.0",
128
+ "version_article": "1.0",
129
+ "ordre": 1193046470,
130
+ "nature": "Article",
131
+ "texteHtml": "<p><br/>Tout professionnel peut demander à l'autorité administrative chargée de la concurrence et de la consommation de prendre formellement position sur la conformité aux articles <a href=\"/affichCodeArticle.do?cidTexte=LEGITEXT000006069565&idArticle=LEGIARTI000032220921&dateTexte=&categorieLien=cid\" title=\"Code de la consommation - art. L112-1 (V)\">L. 112-1 à L. 112-4 </a>et aux mesures réglementaires prises pour leur application, des modalités de l'information sur les prix de vente au consommateur qu'il envisage de mettre en place. <br/>Cette prise de position formelle a pour objet de prémunir le demandeur d'un changement d'appréciation de l'autorité administrative qui serait de nature à l'exposer à la sanction administrative prévue aux articles <a href=\"/affichCodeArticle.do?cidTexte=LEGITEXT000006069565&idArticle=LEGIARTI000032221093&dateTexte=&categorieLien=cid\" title=\"Code de la consommation - art. L131-5 (V)\">L. 131-5 </a>et <a href=\"/affichCodeArticle.do?cidTexte=LEGITEXT000006069565&idArticle=LEGIARTI000032221095&dateTexte=&categorieLien=cid\" title=\"Code de la consommation - art. L131-6 (V)\">L. 131-6</a>. <br/>L'autorité administrative prend formellement position sur cette demande dans un délai fixé par décret en Conseil d'Etat. <br/>Le silence gardé par l'autorité administrative à l'issue de ce délai vaut rejet de cette demande. <br/>Un décret en Conseil d'Etat précise les modalités d'application du présent article, notamment le contenu, les modalités de dépôt et d'avis de réception de la demande.</p>",
132
+ "origine": "LEGI",
133
+ "sectionParentTitre": "Chapitre II : Information sur les prix et conditions de vente",
134
+ "fullSectionsTitre": "Partie législative nouvelle > Livre Ier : INFORMATION DES CONSOMMATEURS ET PRATIQUES COMMERCIALES > Titre Ier : INFORMATION DES CONSOMMATEURS > Chapitre II : Information sur les prix et conditions de vente",
135
+ "lienCitations": [
136
+ {
137
+ "articleId": "LEGIARTI000046293671",
138
+ "articleNum": "L123-11-3",
139
+ "textTitle": "Code de commerce - art. L123-11-3 (M)"
140
+ },
141
+ {
142
+ "articleId": "LEGIARTI000032220921",
143
+ "articleNum": "L112-1",
144
+ "textTitle": "Code de la consommation - art. L112-1 (V)"
145
+ }
146
+ ],
147
+ "lienAutres": []
148
+ }
149
+ ```
150
+
151
+ This example shows Article L112-5 from the French Consumer Code, which deals with professional requests for administrative position on price information compliance.
152
+
153
+ ## Related Datasets
154
+
155
+ This dataset is part of a larger collection of French legal codes maintained by the same author, providing comprehensive coverage of French legal texts for machine learning applications.
utils/code_monetaire_financier/code_monetaire_financier.py ADDED
File without changes
utils/code_monetaire_financier/readme.md ADDED
@@ -0,0 +1,171 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code Monétaire et Financier Dataset
2
+
3
+ ## Overview
4
+
5
+ This dataset contains the French **Code Monétaire et Financier** (Monetary and Financial Code), providing researchers, professionals, and law students with simplified, up-to-date access to French legal texts. The dataset is enriched with comprehensive data to facilitate integration into Community and European projects.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Dataset ID:** `louisbrulenaudet/code-monetaire-financier`
10
+ - **Author:** louisbrulenaudet
11
+ - **Downloads:** 1.6K+
12
+ - **Last Updated:** June 16, 2025
13
+ - **License:** Apache 2.0
14
+ - **Language:** French (fr)
15
+ - **Size Category:** 1K-10K entries
16
+ - **Format:** Parquet
17
+
18
+ ## Purpose and Objectives
19
+
20
+ The primary objective of this project is to provide:
21
+ - Simplified access to French legal texts
22
+ - Up-to-date legal information
23
+ - Enriched data for research and development
24
+ - Support for training sets and labeling pipelines
25
+ - Free, open-source legal AI development
26
+
27
+ ## Key Features
28
+
29
+ ### Task Categories
30
+ This dataset supports multiple natural language processing tasks:
31
+ - **Text Generation:** Generate legal text based on prompts
32
+ - **Table Question Answering:** Answer questions about legal tables and structured data
33
+ - **Summarization:** Create concise summaries of legal texts
34
+ - **Text Retrieval:** Find relevant legal passages
35
+ - **Question Answering:** Answer legal questions
36
+ - **Text Classification:** Categorize legal documents
37
+
38
+ ### Technical Specifications
39
+ - **Modality:** Text and Tabular data
40
+ - **Library Support:** datasets, pandas, mlcroissant, polars
41
+ - **DOI:** 10.57967/hf/1454
42
+ - **Region:** US
43
+
44
+ ## Content
45
+
46
+ The dataset contains the complete French **Code Monétaire et Financier**, which covers:
47
+ - Monetary regulations
48
+ - Financial institutions
49
+ - Banking operations
50
+ - Financial markets
51
+ - Payment systems
52
+ - Financial supervision
53
+ - Anti-money laundering provisions
54
+ - Consumer protection in financial services
55
+
56
+ ## Dataset Structure
57
+
58
+ The dataset contains structured legal articles with the following key fields:
59
+
60
+ ### Core Fields
61
+ - **ref**: Article reference (e.g., "L112-14")
62
+ - **title_main**: Article title (e.g., "Code monétaire et financier")
63
+ - **texte**: Full legal text content
64
+ - **texteHtml**: HTML-formatted legal text with links
65
+ - **num**: Article number (e.g., "L112-14")
66
+ - **id**: Unique article identifier (e.g., "LEGIARTI000037285751")
67
+ - **cid**: Content identifier
68
+ - **type**: Article type (e.g., "AUTONOME")
69
+ - **etat**: Legal status (e.g., "VIGUEUR" - in force)
70
+ - **nature**: Article nature (e.g., "Article")
71
+
72
+ ### Metadata Fields
73
+ - **dateDebut**: Start date (timestamp)
74
+ - **dateFin**: End date (timestamp)
75
+ - **version_article**: Version number
76
+ - **ordre**: Order/sequence number
77
+ - **origine**: Source (e.g., "LEGI")
78
+ - **sectionParentId**: Parent section ID
79
+ - **sectionParentTitre**: Parent section title
80
+ - **fullSectionsTitre**: Full section hierarchy
81
+
82
+ ### Link Fields
83
+ - **lienCitations**: List of legal citations and references
84
+ - **lienAutres**: List of other legal links
85
+
86
+ ### Example Row
87
+
88
+ ```json
89
+ {
90
+ "ref": "L112-14",
91
+ "title_main": "Code monétaire et financier",
92
+ "texte": "I.-Les commerçants mentionnés à l'article L. 121-1 du code de commerce peuvent fournir des espèces à l'utilisateur de services de paiement dans le cadre d'une opération de paiement pour l'achat de biens ou de services. II.-Ce service ne peut être fourni qu'à la demande de l'utilisateur de services de paiement agissant à des fins non professionnelles formulée juste avant l'exécution d'une opération de paiement pour l'achat de biens ou de services et dans des conditions conformes à l'article L. 112-1 du code de la consommation...",
93
+ "dateDebut": 1518537600000,
94
+ "dateFin": 32472144000000,
95
+ "num": "L112-14",
96
+ "id": "LEGIARTI000037285751",
97
+ "cid": "LEGIARTI000037285751",
98
+ "type": "AUTONOME",
99
+ "etat": "VIGUEUR",
100
+ "nota": null,
101
+ "version_article": "1.0",
102
+ "ordre": 1073741823,
103
+ "nature": "Article",
104
+ "texteHtml": "<p>I.-Les commerçants mentionnés à l'article <a href=\"/affichCodeArticle.do?cidTexte=LEGITEXT000005634379&idArticle=LEGIARTI000006219167&dateTexte=&categorieLien=cid\">L. 121-1 </a>du code de commerce peuvent fournir des espèces à l'utilisateur de services de paiement dans le cadre d'une opération de paiement pour l'achat de biens ou de services...</p>",
105
+ "origine": "LEGI",
106
+ "sectionParentId": "LEGISCTA000037285749",
107
+ "sectionParentTitre": "Section 6 : Fourniture d'espèces dans le cadre d'une opération de paiement",
108
+ "fullSectionsTitre": "Partie législative > Livre Ier : La monnaie > Titre Ier : Dispositions générales > Chapitre II : Règles d'usage de la monnaie > Section 6 : Fourniture d'espèces dans le cadre d'une opération de paiement",
109
+ "lienCitations": [
110
+ {
111
+ "articleId": "LEGIARTI000006219167",
112
+ "articleNum": "L121-1",
113
+ "linkType": "CITATION",
114
+ "natureText": "CODE",
115
+ "textCid": "LEGITEXT000005634379",
116
+ "textTitle": "Code de commerce - art. L121-1"
117
+ }
118
+ ],
119
+ "lienAutres": []
120
+ }
121
+ ```
122
+
123
+ ## Usage
124
+
125
+ ### Access via Hugging Face
126
+ ```python
127
+ from datasets import load_dataset
128
+
129
+ # Load the dataset
130
+ dataset = load_dataset("louisbrulenaudet/code-monetaire-financier")
131
+ ```
132
+
133
+ ### Direct Link
134
+ Visit the dataset page: [https://hf.co/datasets/louisbrulenaudet/code-monetaire-financier](https://hf.co/datasets/louisbrulenaudet/code-monetaire-financier)
135
+
136
+ ## Applications
137
+
138
+ This dataset is particularly useful for:
139
+ - **Legal AI Development:** Training models for legal text understanding
140
+ - **Research:** Academic studies in French law and financial regulations
141
+ - **Professional Use:** Legal professionals seeking automated legal text processing
142
+ - **Education:** Law students learning about French financial law
143
+ - **Compliance:** Financial institutions needing to understand French regulations
144
+
145
+ ## Tags and Categories
146
+
147
+ - **Legal Domain:** French law, droit français
148
+ - **Specialized:** Code monétaire et financier
149
+ - **Multilingual:** Monolingual French
150
+ - **Source:** Original dataset
151
+ - **Use Case:** Fine-tuning
152
+
153
+ ## Data Refresh
154
+
155
+ The dataset is refreshed daily on all legal codes to ensure:
156
+ - Up-to-date legal information
157
+ - Current regulatory compliance
158
+ - Latest amendments and modifications
159
+ - Accurate legal references
160
+
161
+ ## License and Usage
162
+
163
+ This dataset is released under the Apache 2.0 license, allowing for:
164
+ - Commercial use
165
+ - Modification and distribution
166
+ - Integration into proprietary systems
167
+ - Academic and research applications
168
+
169
+ ---
170
+
171
+ *For more detailed information, visit the [Hugging Face dataset page](https://hf.co/datasets/louisbrulenaudet/code-monetaire-financier).*
utils/code_propriete_intellectuelle/code_propriete_intellectuelle.py ADDED
File without changes
utils/code_propriete_intellectuelle/readme.md ADDED
@@ -0,0 +1,162 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code de la Propriété Intellectuelle Dataset
2
+
3
+ ## Overview
4
+
5
+ This dataset contains the French Intellectual Property Code (Code de la propriété intellectuelle) in a structured format, designed to provide researchers, professionals, and law students with simplified, up-to-date access to French legal texts. The dataset is enriched with comprehensive data to facilitate integration into Community and European projects.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Source:** [louisbrulenaudet/code-propriete-intellectuelle](https://hf.co/datasets/louisbrulenaudet/code-propriete-intellectuelle)
10
+ - **Author:** louisbrulenaudet
11
+ - **Downloads:** 3.2K+
12
+ - **Last Updated:** March 10, 2025
13
+ - **License:** Apache 2.0
14
+ - **DOI:** 10.57967/hf/1460
15
+
16
+ ## Dataset Characteristics
17
+
18
+ ### Language and Format
19
+ - **Language:** French (fr)
20
+ - **Format:** Parquet
21
+ - **Modality:** Text and Tabular
22
+ - **Size Category:** 1K-10K entries
23
+
24
+ ### Task Categories
25
+ This dataset is suitable for various natural language processing tasks:
26
+ - Text Generation
27
+ - Table Question Answering
28
+ - Summarization
29
+ - Text Retrieval
30
+ - Question Answering
31
+ - Text Classification
32
+
33
+ ### Technical Specifications
34
+ - **Multilinguality:** Monolingual (French)
35
+ - **Source:** Original dataset
36
+ - **Libraries:** Compatible with datasets, pandas, mlcroissant, and polars
37
+ - **Region:** US-based
38
+
39
+ ## Purpose and Applications
40
+
41
+ ### Primary Objectives
42
+ 1. **Legal Research:** Provide simplified access to French legal texts
43
+ 2. **Training Data:** Facilitate the production of training sets for legal AI applications
44
+ 3. **Labeling Pipelines:** Support development of free and open-source legal AI tools
45
+ 4. **Daily Updates:** Data is refreshed daily on all legal codes
46
+
47
+ ### Target Users
48
+ - Legal researchers and professionals
49
+ - Law students
50
+ - AI/ML developers working on legal applications
51
+ - European and Community project developers
52
+
53
+ ## Usage
54
+
55
+ ### Accessing the Dataset
56
+ ```python
57
+ from datasets import load_dataset
58
+
59
+ # Load the dataset
60
+ dataset = load_dataset("louisbrulenaudet/code-propriete-intellectuelle")
61
+ ```
62
+
63
+ ### Dataset Structure
64
+
65
+ The dataset contains structured legal articles with the following key fields:
66
+
67
+ | Field | Type | Description | Example |
68
+ |-------|------|-------------|---------|
69
+ | `ref` | string | Article reference | "Code de la propriété intellectuelle, art. L113-9-1" |
70
+ | `title_main` | string | Main title | "Code de la propriété intellectuelle" |
71
+ | `texte` | string | Article text content | Full legal text of the article |
72
+ | `dateDebut` | int64 | Start date (timestamp) | 1639699200000 |
73
+ | `dateFin` | int64 | End date (timestamp) | 32472144000000 |
74
+ | `num` | string | Article number | "L113-9-1" |
75
+ | `id` | string | Unique identifier | "LEGIARTI000044502241" |
76
+ | `cid` | string | Content ID | "LEGIARTI000044502241" |
77
+ | `type` | string | Article type | "AUTONOME" |
78
+ | `etat` | string | Legal status | "VIGUEUR" (in force) |
79
+ | `nature` | string | Article nature | "Article" |
80
+ | `texteHtml` | string | HTML formatted text | Formatted legal text with links |
81
+ | `origine` | string | Source origin | "LEGI" |
82
+ | `fullSectionsTitre` | string | Full section hierarchy | "Partie législative > Première partie : La propriété littéraire et artistique > ..." |
83
+ | `lienCitations` | list | Citation links | Array of related legal references |
84
+ | `lienAutres` | list | Other links | Array of additional legal references |
85
+
86
+ ### Typical Row Example
87
+
88
+ ```json
89
+ {
90
+ "ref": "Code de la propriété intellectuelle, art. L113-9-1",
91
+ "title_main": "Code de la propriété intellectuelle",
92
+ "texte": "Sauf stipulations contraires, lorsque des personnes qui ne relèvent pas de l'article L. 113-9 et qui sont accueillies dans le cadre d'une convention par une personne morale de droit privé ou de droit public réalisant de la recherche créent des logiciels dans l'exercice de leurs missions ou d'après les instructions de la structure d'accueil, leurs droits patrimoniaux sur ces logiciels et leur documentation sont dévolus à cette structure d'accueil, seule habilitée à les exercer, si elles se trouvent à l'égard de cette structure dans une situation où elles perçoivent une contrepartie et où elles sont placées sous l'autorité d'un responsable de ladite structure. Toute contestation sur l'application du présent article est soumise au tribunal judiciaire du siège social de la structure d'accueil.",
93
+ "dateDebut": 1639699200000,
94
+ "dateFin": 32472144000000,
95
+ "num": "L113-9-1",
96
+ "id": "LEGIARTI000044502241",
97
+ "cid": "LEGIARTI000044502241",
98
+ "type": "AUTONOME",
99
+ "etat": "VIGUEUR",
100
+ "nota": null,
101
+ "version_article": "1.0",
102
+ "ordre": 537160817,
103
+ "nature": "Article",
104
+ "texteHtml": "<p>Sauf stipulations contraires, lorsque des personnes qui ne relèvent pas de l'article <a href=\"/affichCodeArticle.do?cidTexte=LEGITEXT000006069414&idArticle=LEGIARTI000006278889&dateTexte=&categorieLien=cid\" title=\"Code de la propriété intellectuelle - art. L113-9 (V)\">L. 113-9</a> et qui sont accueillies dans le cadre d'une convention par une personne morale de droit privé ou de droit public réalisant de la recherche créent des logiciels dans l'exercice de leurs missions ou d'après les instructions de la structure d'accueil, leurs droits patrimoniaux sur ces logiciels et leur documentation sont dévolus à cette structure d'accueil, seule habilitée à les exercer, si elles se trouvent à l'égard de cette structure dans une situation où elles perçoivent une contrepartie et où elles sont placées sous l'autorité d'un responsable de ladite structure. <br/><br/>Toute contestation sur l'application du présent article est soumise au tribunal judiciaire du siège social de la structure d'accueil.</p>",
105
+ "origine": "LEGI",
106
+ "fullSectionsTitre": "Partie législative > Première partie : La propriété littéraire et artistique > Livre Ier : Le droit d'auteur > Titre Ier : Objet du droit d'auteur > Chapitre III : Titulaires du droit d'auteur",
107
+ "lienCitations": [
108
+ {
109
+ "articleId": "LEGIARTI000006278889",
110
+ "articleNum": "L113-9",
111
+ "dateDebut": 710121600000,
112
+ "linkType": "CITATION",
113
+ "natureText": "CODE",
114
+ "textCid": "LEGITEXT000006069414",
115
+ "textTitle": "Code de la propriété intellectuelle - art. L113-9 (V)"
116
+ }
117
+ ],
118
+ "lienAutres": []
119
+ }
120
+ ```
121
+
122
+ ### Key Features
123
+ - **Structured Legal Text:** Organized French intellectual property law content
124
+ - **Daily Updates:** Regular data refreshment for current legal information
125
+ - **European Integration:** Designed for Community and European project compatibility
126
+ - **Open Source:** Apache 2.0 licensed for broad usage
127
+
128
+ ## Legal Context
129
+
130
+ The French Intellectual Property Code (Code de la propriété intellectuelle) is a comprehensive legal framework that governs:
131
+ - Copyright and related rights
132
+ - Industrial property rights
133
+ - Patents and trademarks
134
+ - Design rights
135
+ - Trade secrets and know-how
136
+
137
+ ## Dataset Tags
138
+
139
+ - `legal` - Legal domain dataset
140
+ - `french law` - French legal system
141
+ - `droit français` - French law
142
+ - `finetuning` - Suitable for model fine-tuning
143
+ - `Code de la propriété intellectuelle` - Specific legal code
144
+
145
+ ## Citation
146
+
147
+ When using this dataset, please cite:
148
+ ```
149
+ DOI: 10.57967/hf/1460
150
+ ```
151
+
152
+ ## Related Resources
153
+
154
+ - **Dataset Page:** [https://hf.co/datasets/louisbrulenaudet/code-propriete-intellectuelle](https://hf.co/datasets/louisbrulenaudet/code-propriete-intellectuelle)
155
+ - **Author Profile:** [louisbrulenaudet](https://huggingface.co/louisbrulenaudet)
156
+
157
+ ## Notes
158
+
159
+ - The dataset is non-instruct format, meaning it contains raw legal text without instruction-tuning
160
+ - Data is refreshed daily to maintain current legal information
161
+ - Designed for integration into larger legal AI systems and European projects
162
+ - Suitable for both research and commercial applications under Apache 2.0 license
utils/code_travail/code_travail.py ADDED
File without changes
utils/code_travail/readme.md ADDED
@@ -0,0 +1,251 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Code du Travail Dataset
2
+
3
+ ## Overview
4
+
5
+ The **Code du Travail** dataset is a comprehensive French legal text collection that provides researchers, professionals, and law students with simplified, up-to-date access to all French legal texts. This dataset is enriched with extensive data to facilitate integration into Community and European projects.
6
+
7
+ ## Dataset Information
8
+
9
+ - **Dataset ID:** `louisbrulenaudet/code-travail`
10
+ - **Author:** louisbrulenaudet
11
+ - **License:** Apache 2.0
12
+ - **Language:** French (fr)
13
+ - **Format:** Parquet
14
+ - **Size Category:** 1K-10K entries
15
+ - **Downloads:** 2.1K+
16
+ - **Likes:** 8
17
+ - **Last Updated:** July 11, 2025
18
+
19
+ ## Purpose and Objectives
20
+
21
+ The primary objective of this project is to:
22
+ - Provide simplified, up-to-date access to French legal texts
23
+ - Facilitate integration into Community and European projects
24
+ - Simplify the production of training sets and labeling pipelines
25
+ - Support the development of free, open-source language models
26
+
27
+ ## Key Features
28
+
29
+ ### Data Refresh
30
+ - Data is refreshed daily on all legal codes
31
+ - Ensures up-to-date legal information
32
+
33
+ ### Supported Tasks
34
+ The dataset supports multiple natural language processing tasks:
35
+ - **Text Generation**
36
+ - **Table Question Answering**
37
+ - **Summarization**
38
+ - **Text Retrieval**
39
+ - **Question Answering**
40
+ - **Text Classification**
41
+
42
+ ### Technical Specifications
43
+ - **Modality:** Tabular and Text
44
+ - **Multilinguality:** Monolingual (French)
45
+ - **Source:** Original dataset
46
+ - **DOI:** 10.57967/hf/1456
47
+
48
+ ## Use Cases
49
+
50
+ ### For Researchers
51
+ - Legal text analysis and research
52
+ - French labor law studies
53
+ - Legal document processing
54
+
55
+ ### For Professionals
56
+ - Legal document automation
57
+ - Contract analysis
58
+ - Compliance checking
59
+
60
+ ### For Law Students
61
+ - French labor law education
62
+ - Legal text comprehension
63
+ - Case study preparation
64
+
65
+ ### For Developers
66
+ - Training language models for legal applications
67
+ - Building legal AI assistants
68
+ - Developing legal document processing tools
69
+
70
+ ## Dataset Structure
71
+
72
+ The dataset contains French labor law texts organized in a structured format that supports various NLP tasks. The data is stored in Parquet format for efficient processing and analysis.
73
+
74
+ ### Schema
75
+
76
+ The dataset includes the following fields:
77
+
78
+ | Field | Type | Description |
79
+ |-------|------|-------------|
80
+ | `ref` | string | Reference identifier |
81
+ | `title_main` | string | Main title of the legal text |
82
+ | `texte` | string | The actual legal text content |
83
+ | `dateDebut` | int64 | Start date (timestamp) |
84
+ | `dateFin` | int64 | End date (timestamp) |
85
+ | `num` | string | Article number |
86
+ | `id` | string | Unique identifier |
87
+ | `cid` | string | Content identifier |
88
+ | `type` | string | Type of legal text |
89
+ | `etat` | string | Current state/status |
90
+ | `nota` | string | Notes |
91
+ | `version_article` | string | Article version |
92
+ | `ordre` | int64 | Order/sequence number |
93
+ | `texteHtml` | string | HTML formatted text |
94
+ | `origine` | string | Source origin |
95
+ | `multipleVersions` | bool | Whether multiple versions exist |
96
+ | `comporteLiensSP` | bool | Contains special links |
97
+ | `sectionParentTitre` | string | Parent section title |
98
+ | `fullSectionsTitre` | string | Full section hierarchy title |
99
+ | `lienCitations` | list | Citation links |
100
+ | `lienAutres` | list | Other links |
101
+
102
+ ### Example Row
103
+
104
+ Here's a typical example from the dataset:
105
+
106
+ ```json
107
+ {
108
+ "ref": "Code du travail, art. L1133-2",
109
+ "title_main": "Code du travail",
110
+ "texte": "Les différences de traitement fondées sur l'âge ne constituent pas une discrimination lorsqu'elles sont objectivement et raisonnablement justifiées par un but légitime, notamment par le souci de préserver la santé ou la sécurité des travailleurs, de favoriser leur insertion professionnelle, d'assurer leur emploi, leur reclassement ou leur indemnisation en cas de perte d'emploi, et lorsque les moyens de réaliser ce but sont nécessaires et appropriés. Ces différences peuvent notamment consister en : 1° L'interdiction de l'accès à l'emploi ou la mise en place de conditions de travail spéciales en vue d'assurer la protection des jeunes et des travailleurs âgés ; 2° La fixation d'un âge maximum pour le recrutement, fondée sur la formation requise pour le poste concerné ou la nécessité d'une période d'emploi raisonnable avant la retraite.",
111
+ "dateDebut": 1212019200000,
112
+ "dateFin": 32472144000000,
113
+ "num": "L1133-2",
114
+ "id": "LEGIARTI000018931868",
115
+ "cid": "LEGIARTI000006900793",
116
+ "type": "AUTONOME",
117
+ "etat": "VIGUEUR",
118
+ "nota": "2.0",
119
+ "version_article": "85,898",
120
+ "ordre": null,
121
+ "conditionDiffere": null,
122
+ "infosComplementaires": null,
123
+ "surtitre": null,
124
+ "nature": "Article",
125
+ "texteHtml": "<p>Les différences de traitement fondées sur l'âge ne constituent pas une discrimination lorsqu'elles sont objectivement et raisonnablement justifiées par un but légitime, notamment par le souci de préserver la santé ou la sécurité des travailleurs, de favoriser leur insertion professionnelle, d'assurer leur emploi, leur reclassement ou leur indemnisation en cas de perte d'emploi, et lorsque les moyens de réaliser ce but sont nécessaires et appropriés.</p><p>Ces différences peuvent notamment consister en :</p><p>1° L'interdiction de l'accès à l'emploi ou la mise en place de conditions de travail spéciales en vue d'assurer la protection des jeunes et des travailleurs âgés ;</p><p>2° La fixation d'un âge maximum pour le recrutement, fondée sur la formation requise pour le poste concerné ou la nécessité d'une période d'emploi raisonnable avant la retraite.</p>",
126
+ "dateFinExtension": 32472144000000,
127
+ "versionPrecedente": "LEGIARTI000006900793",
128
+ "refInjection": "IG-20241212",
129
+ "idTexte": null,
130
+ "idTechInjection": "LEGIARTI000018931868",
131
+ "origine": "LEGI",
132
+ "dateDebutExtension": 32472144000000,
133
+ "idEliAlias": null,
134
+ "cidTexte": "LEGISCTA000006177837",
135
+ "sectionParentId": null,
136
+ "multipleVersions": false,
137
+ "comporteLiensSP": false,
138
+ "sectionParentTitre": "Chapitre III : Différences de traitement autorisées.",
139
+ "infosRestructurationBranche": null,
140
+ "idEli": null,
141
+ "sectionParentCid": "LEGISCTA000006177837",
142
+ "numeroBo": null,
143
+ "infosRestructurationBrancheHtml": null,
144
+ "historique": null,
145
+ "infosComplementairesHtml": null,
146
+ "renvoi": null,
147
+ "fullSectionsTitre": "Partie législative > Première partie : Les relations individuelles de travail > Livre Ier : Dispositions préliminaires > Titre III : Discriminations > Chapitre III : Différences de traitement autorisées.",
148
+ "notaHtml": "<p></p><p></p><p></p><p><br clear=\"none\" /></p>",
149
+ "inap": null,
150
+ "lienCitations": [
151
+ {
152
+ "articleId": "KALIARTI000021881967",
153
+ "articleNum": "",
154
+ "dateDebut": 1257292800000,
155
+ "datePubli": 1267401600000,
156
+ "linkOrientation": "cible",
157
+ "linkType": "CITATION",
158
+ "natureText": "Accord",
159
+ "numTexte": "",
160
+ "parentCid": null,
161
+ "textCid": "KALITEXT000021881957",
162
+ "textTitle": "Emploi des seniors - art. (VE)"
163
+ },
164
+ {
165
+ "articleId": "JORFARTI000022549156",
166
+ "articleNum": "1",
167
+ "dateDebut": 32472144000000,
168
+ "datePubli": 1280361600000,
169
+ "linkOrientation": "cible",
170
+ "linkType": "CITATION",
171
+ "natureText": "ARRETE",
172
+ "numTexte": "",
173
+ "parentCid": null,
174
+ "textCid": "JORFTEXT000022549153",
175
+ "textTitle": "Arrêté du 20 juillet 2010 - art. 1, v. init."
176
+ },
177
+ {
178
+ "articleId": "JORFARTI000048148650",
179
+ "articleNum": "1",
180
+ "dateDebut": 32472144000000,
181
+ "datePubli": 1696377600000,
182
+ "linkOrientation": "cible",
183
+ "linkType": "CITATION",
184
+ "natureText": "ARRETE",
185
+ "numTexte": "",
186
+ "parentCid": null,
187
+ "textCid": "JORFTEXT000048148648",
188
+ "textTitle": "Arrêté du 6 septembre 2023 - art. 1, v. init."
189
+ },
190
+ {
191
+ "articleId": "KALIARTI000022671872",
192
+ "articleNum": "",
193
+ "dateDebut": 1268870400000,
194
+ "datePubli": 32472144000000,
195
+ "linkOrientation": "cible",
196
+ "linkType": "CITATION",
197
+ "natureText": "Accord",
198
+ "numTexte": "",
199
+ "parentCid": null,
200
+ "textCid": "KALITEXT000022671870",
201
+ "textTitle": "Emploi des seniors - art. (VE)"
202
+ }
203
+ ],
204
+ "lienAutres": []
205
+ }
206
+ ```
207
+
208
+ This example shows Article L1133-2 from the French Labor Code, which deals with age-based treatment differences in employment. The article explains when age-based differences in treatment are not considered discrimination, particularly for health and safety reasons, professional integration, employment security, and retirement planning.
209
+
210
+ ## Access and Usage
211
+
212
+ ### Direct Access
213
+ - **Hugging Face Hub:** [https://hf.co/datasets/louisbrulenaudet/code-travail](https://hf.co/datasets/louisbrulenaudet/code-travail)
214
+ - **Full Description:** Available on the dataset page
215
+
216
+ ### Libraries Supported
217
+ - **datasets** (Hugging Face)
218
+ - **pandas**
219
+ - **mlcroissant**
220
+ - **polars**
221
+
222
+ ## Legal and Ethical Considerations
223
+
224
+ - **License:** Apache 2.0 - Allows commercial use with attribution
225
+ - **Region:** US-based dataset
226
+ - **Content:** French labor law texts
227
+ - **Use Case:** Educational, research, and commercial applications
228
+
229
+ ## Related Tags
230
+
231
+ The dataset is tagged with relevant categories including:
232
+ - `legal`
233
+ - `french law`
234
+ - `droit français`
235
+ - `Code du travail`
236
+ - `finetuning`
237
+
238
+ ## Citation
239
+
240
+ If you use this dataset in your research or applications, please cite:
241
+ ```
242
+ DOI: 10.57967/hf/1456
243
+ ```
244
+
245
+ ## Contributing
246
+
247
+ This dataset is part of a larger effort to provide open access to French legal texts. For more information about contributing or using the dataset, visit the Hugging Face dataset page.
248
+
249
+ ---
250
+
251
+ *This dataset is maintained by louisbrulenaudet and is updated regularly to ensure accuracy and completeness of French labor law information.*