louisbrulenaudet commited on
Commit
c9d319f
1 Parent(s): 00683ff

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +135 -3
README.md CHANGED
@@ -1,3 +1,135 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ configs:
3
+ - config_name: default
4
+ data_files:
5
+ - split: fr
6
+ path: data/fr-*
7
+ license: cc-by-4.0
8
+ task_categories:
9
+ - question-answering
10
+ - text-generation
11
+ - table-question-answering
12
+ language:
13
+ - fr
14
+ tags:
15
+ - legal
16
+ - droit
17
+ - fiscalité
18
+ - taxation
19
+ - δεξιά
20
+ - recht
21
+ - derecho
22
+ pretty_name: The case-law, centralizing legal decisions for better use
23
+ ---
24
+ ## Dataset Description
25
+ - **Repository:** https://huggingface.co/datasets/HFforLegal/case-law
26
+ - **Leaderboard:** N/A
27
+ - **Point of Contact:** [Louis Brulé Naudet](mailto:louisbrulenaudet@icloud.com)
28
+
29
+ # The Case-law, centralizing legal decisions for better use, a community Dataset.
30
+
31
+ The Case-law Dataset is a comprehensive collection of legal decisons from various countries, centralized in a common format. This dataset aims to improve the development of legal AI models by providing a standardized, easily accessible corpus of global legal documents.
32
+
33
+ <div class="not-prose bg-gradient-to-r from-gray-50-to-white text-gray-900 border" style="border-radius: 8px; padding: 0.5rem 1rem;">
34
+ <p>Join us in our mission to make AI more accessible and understandable for the legal world, ensuring that the power of language models can be harnessed effectively and ethically in the pursuit of justice.</p>
35
+ </div>
36
+
37
+ ## Objective
38
+
39
+ The primary objective of this dataset is to centralize laws from around the world in a common format, thereby facilitating:
40
+
41
+ 1. Comparative legal studies
42
+ 2. Development of multilingual legal AI models
43
+ 3. Cross-jurisdictional legal research
44
+ 4. Improvement of legal technology tools
45
+
46
+ By providing a standardized dataset of global legal texts, we aim to accelerate the development of AI models in the legal domain, enabling more accurate and comprehensive legal analysis across different jurisdictions.
47
+
48
+ Easy-to-use script for hashing the `document`:
49
+
50
+ ```python
51
+ import hashlib
52
+ import datasets
53
+
54
+ def hash(
55
+ text: str
56
+ ) -> str:
57
+ """
58
+ Create or update the hash of the document content.
59
+
60
+ This function takes a text input, converts it to a string, encodes it in UTF-8,
61
+ and then generates a SHA-256 hash of the encoded text.
62
+
63
+ Parameters
64
+ ----------
65
+ text : str
66
+ The text content to be hashed.
67
+
68
+ Returns
69
+ -------
70
+ str
71
+ The SHA-256 hash of the input text, represented as a hexadecimal string.
72
+ """
73
+ return hashlib.sha256(str(text).encode()).hexdigest()
74
+
75
+ dataset = dataset.map(lambda x: {"hash": hash(x["document"])})
76
+ ```
77
+
78
+ ## Country-based Splits
79
+
80
+ The dataset uses country-based splits to organize legal documents from different jurisdictions. Each split is identified by the ISO 3166-1 alpha-2 code of the corresponding country.
81
+
82
+ ### ISO 3166-1 alpha-2 Codes
83
+
84
+ ISO 3166-1 alpha-2 codes are two-letter country codes defined in ISO 3166-1, part of the ISO 3166 standard published by the International Organization for Standardization (ISO).
85
+
86
+ Some examples of ISO 3166-1 alpha-2 codes:
87
+ - France: fr
88
+ - United States: us
89
+ - United Kingdom: gb
90
+ - Germany: de
91
+ - Japan: jp
92
+ - Brazil: br
93
+ - Australia: au
94
+
95
+ Before submitting a new split, please make sure the proposed split fits within the ISO code for the related country.
96
+
97
+ ### Accessing Country-specific Data
98
+
99
+ To access legal documents for a specific country, you can use the country's ISO 3166-1 alpha-2 code as the split name when loading the dataset. Here's an example:
100
+
101
+ ```python
102
+ from datasets import load_dataset
103
+
104
+ # Load the entire dataset
105
+ dataset = load_dataset("HFforLegal/case-law")
106
+
107
+ # Access the French legal decisions
108
+ fr_dataset = dataset['fr']
109
+ ```
110
+
111
+ ## Ethical Considerations
112
+
113
+ While this dataset provides a valuable resource for legal AI development, users should be aware of the following ethical considerations:
114
+
115
+ - Privacy: Ensure that all personal information has been properly anonymized.
116
+ - Bias: Be aware of potential biases in the source material and in the selection of included laws.
117
+ - Currency: Laws change over time. Always verify that you're working with the most up-to-date version of a law for any real-world application.
118
+ - Jurisdiction: Legal interpretations can vary by jurisdiction. AI models trained on this data should not be used as a substitute for professional legal advice.
119
+
120
+ ## Citing & Authors
121
+
122
+ If you use this dataset in your research, please use the following BibTeX entry.
123
+
124
+ ```BibTeX
125
+ @misc{HFforLegal2024,
126
+ author = {Louis Brulé Naudet},
127
+ title = {The case-law, centralizing legal decisions for better use},
128
+ year = {2024}
129
+ howpublished = {\url{https://huggingface.co/datasets/HFforLegal/case-law}},
130
+ }
131
+ ```
132
+
133
+ ## Feedback
134
+
135
+ If you have any feedback, please reach out at [louisbrulenaudet@icloud.com](mailto:louisbrulenaudet@icloud.com).