Datasets:

Modalities:
Image
Text
Formats:
parquet
Languages:
Danish
ArXiv:
DOI:
Libraries:
Datasets
Dask
License:
kris927b commited on
Commit
9c3619e
·
1 Parent(s): b0dbe01

Fixing minor things based on review.

Browse files
data/domsdatabasen/create.py CHANGED
@@ -33,19 +33,6 @@ from typing import cast
33
 
34
  import torch
35
 
36
- # Ensure threads don't contend
37
- os.environ["MKL_DYNAMIC"] = "FALSE"
38
- os.environ["OMP_DYNAMIC"] = "FALSE"
39
- os.environ["OMP_NUM_THREADS"] = "2" # Avoid OpenMP issues with multiprocessing
40
- os.environ["OPENBLAS_NUM_THREADS"] = "2"
41
- os.environ["MKL_NUM_THREADS"] = "2"
42
- os.environ["GRPC_VERBOSITY"] = "ERROR"
43
- os.environ["GLOG_minloglevel"] = "2"
44
- os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = (
45
- "1" # Transformers uses .isin for a simple op, which is not supported on MPS
46
- )
47
- os.environ["IN_STREAMLIT"] = "true" # Avoid multiprocessing inside surya
48
-
49
  import gc
50
  import requests
51
  import torch.multiprocessing as mp
@@ -295,12 +282,6 @@ def main():
295
 
296
  doc_infos = [doc for doc in doc_infos if doc["id"] not in existing_ids]
297
 
298
- # Download PDFs in parallel
299
- # with ThreadPoolExecutor(max_workers=MAX_WORKERS) as executor:
300
- # futures = [executor.submit(download_pdf, doc) for doc in doc_infos]
301
- # for future in as_completed(futures):
302
- # future.result()
303
-
304
  # Extract text in parallel using multiprocessing
305
  with mp.Pool(
306
  processes=MAX_WORKERS, initializer=worker_init, maxtasksperchild=10
@@ -337,6 +318,19 @@ def main():
337
 
338
 
339
  if __name__ == "__main__":
 
 
 
 
 
 
 
 
 
 
 
 
 
340
  mp.set_start_method("spawn", force=True)
341
  log_path = Path(__file__).parent / "domsdatabasen.log"
342
  logging.basicConfig(
 
33
 
34
  import torch
35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
36
  import gc
37
  import requests
38
  import torch.multiprocessing as mp
 
282
 
283
  doc_infos = [doc for doc in doc_infos if doc["id"] not in existing_ids]
284
 
 
 
 
 
 
 
285
  # Extract text in parallel using multiprocessing
286
  with mp.Pool(
287
  processes=MAX_WORKERS, initializer=worker_init, maxtasksperchild=10
 
318
 
319
 
320
  if __name__ == "__main__":
321
+ # Ensure threads don't contend
322
+ os.environ["MKL_DYNAMIC"] = "FALSE"
323
+ os.environ["OMP_DYNAMIC"] = "FALSE"
324
+ os.environ["OMP_NUM_THREADS"] = "2" # Avoid OpenMP issues with multiprocessing
325
+ os.environ["OPENBLAS_NUM_THREADS"] = "2"
326
+ os.environ["MKL_NUM_THREADS"] = "2"
327
+ os.environ["GRPC_VERBOSITY"] = "ERROR"
328
+ os.environ["GLOG_minloglevel"] = "2"
329
+ os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = (
330
+ "1" # Transformers uses .isin for a simple op, which is not supported on MPS
331
+ )
332
+ os.environ["IN_STREAMLIT"] = "true" # Avoid multiprocessing inside surya
333
+
334
  mp.set_start_method("spawn", force=True)
335
  log_path = Path(__file__).parent / "domsdatabasen.log"
336
  logging.basicConfig(
data/domsdatabasen/domsdatabasen.md CHANGED
@@ -25,6 +25,8 @@ domains:
25
 
26
  Launched in early 2022, the platform aims to increase transparency and public insight into the workings of the judiciary in Denmark. It is accessible to everyone – legal professionals, citizens, companies, and public authorities interested in Danish case law.
27
 
 
 
28
  ### Purpose and Scope
29
  The main goal of the database is to support the principle of openness in the administration of justice. It offers users access to selected civil and criminal decisions, with an initial focus on rulings from the higher courts, such as:
30
 
@@ -53,10 +55,6 @@ Businesses involved in cases are typically not pseudonymized unless their name r
53
  Domsdatabasen is continuously being developed. As digitization progresses and technical workflows improve, the number of published decisions is expected to grow. The judgments are published as full case strings, including decisions at multiple judicial levels, providing context and legal reasoning throughout the appeal process.
54
 
55
 
56
-
57
- ## Dataset Description
58
-
59
-
60
  <!-- START-DESC-STATS -->
61
  - **Language**: dan, dansk, Danish
62
  - **Domains**: Legal
 
25
 
26
  Launched in early 2022, the platform aims to increase transparency and public insight into the workings of the judiciary in Denmark. It is accessible to everyone – legal professionals, citizens, companies, and public authorities interested in Danish case law.
27
 
28
+ ## Dataset Description
29
+
30
  ### Purpose and Scope
31
  The main goal of the database is to support the principle of openness in the administration of justice. It offers users access to selected civil and criminal decisions, with an initial focus on rulings from the higher courts, such as:
32
 
 
55
  Domsdatabasen is continuously being developed. As digitization progresses and technical workflows improve, the number of published decisions is expected to grow. The judgments are published as full case strings, including decisions at multiple judicial levels, providing context and legal reasoning throughout the appeal process.
56
 
57
 
 
 
 
 
58
  <!-- START-DESC-STATS -->
59
  - **Language**: dan, dansk, Danish
60
  - **Domains**: Legal