rafmacalaba commited on
Commit
bfa598b
·
verified ·
1 Parent(s): ffab8c0

Add source s2orc

Browse files
README.md CHANGED
@@ -38,7 +38,7 @@ All sources share the same schema; a field a source does not have is null.
38
 
39
  | table | one row per | main columns |
40
  |---|---|---|
41
- | `documents` | document | `corpus_id`, `source`, `source_doc_id`, `source_url`, `pdf_url`, `doi`, `sha256`, `n_pages`, `extraction_status`, `entity_model`, `metadata_model`, `extraction_settings` (the models and settings that produced the document's mentions; null for a source published before they were recorded), plus `document_type` and `publication_year` as analysis context |
42
  | `mentions` | extracted mention | `mention_id`, `corpus_id`, `page_number` (1-based), `mention_text`, `specificity`, `score`, `role`, `usage_action`, `usage_summary`, `theme_tags`, `dataset_geography`, `dataset_year`, `dataset_version`, `dataset_producer`, `dataset_acronym`, `dataset_data_type` `document_type`, `publication_year`, `source_url` |
43
  | `datasets` | distinct dataset in a document | `corpus_id`, `dataset_name`, `specificity`, `n_occurrences`, `pages`, `max_score`, `role`, `usage_action`, `theme_tags`, `dataset_*` |
44
 
@@ -74,10 +74,26 @@ family) or `generic` (nothing distinguishing, like "household survey" or "census
74
  Named mentions create and join families. Descriptive mentions (if included) only join an *existing* family, with a stricter
75
  rule (a known form, an acronym, or a close match); most stay unresolved (`unmatched`), because descriptions like "passenger
76
  data" are not dataset names. Named results do not depend on whether descriptive mentions are included.
 
77
  `match_score` is the confidence; low `fuzzy`/`extends` scores are the least reliable. `family_id` is assigned once and
78
  never changes, so adding sources only extends the registry. `canonical_name`, `kind` (majority of the extracted data
79
  type) and `producer` are automatic and may be imperfect.
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  ## Sources
82
 
83
  See `summary-<source>.json` in the repository for counts per source.
 
38
 
39
  | table | one row per | main columns |
40
  |---|---|---|
41
+ | `documents` | document | `corpus_id`, `source`, `source_doc_id`, `source_url`, `pdf_url`, `doi`, `sha256`, `n_pages`, `extraction_status`, `entity_model`, `metadata_model`, `extraction_settings` (the models and settings that produced the document's mentions; null for a source published before they were recorded), `topics` (topics of the whole document when the source has them: for OpenAlex, the topic searches that found the paper; null otherwise), plus `document_type` and `publication_year` as analysis context |
42
  | `mentions` | extracted mention | `mention_id`, `corpus_id`, `page_number` (1-based), `mention_text`, `specificity`, `score`, `role`, `usage_action`, `usage_summary`, `theme_tags`, `dataset_geography`, `dataset_year`, `dataset_version`, `dataset_producer`, `dataset_acronym`, `dataset_data_type` `document_type`, `publication_year`, `source_url` |
43
  | `datasets` | distinct dataset in a document | `corpus_id`, `dataset_name`, `specificity`, `n_occurrences`, `pages`, `max_score`, `role`, `usage_action`, `theme_tags`, `dataset_*` |
44
 
 
74
  Named mentions create and join families. Descriptive mentions (if included) only join an *existing* family, with a stricter
75
  rule (a known form, an acronym, or a close match); most stay unresolved (`unmatched`), because descriptions like "passenger
76
  data" are not dataset names. Named results do not depend on whether descriptive mentions are included.
77
+ `unnamed` (written as a description, not a name: see below; `family_id` is null).
78
  `match_score` is the confidence; low `fuzzy`/`extends` scores are the least reliable. `family_id` is assigned once and
79
  never changes, so adding sources only extends the registry. `canonical_name`, `kind` (majority of the extracted data
80
  type) and `producer` are automatic and may be imperfect.
81
 
82
+ ## What is left out (both ON by default; `datause/quality.py`)
83
+
84
+ - **Non-English passages and documents.** The model writes its one-line summary in the language of the passage, so a mention
85
+ whose summary is identified as another language (probability at least 0.9) is left out, and so is every mention of a
86
+ document where more than half of the summarised passages are. The language of the dataset *name* does not count:
87
+ "Encuesta Nacional de Hogares" cited in an English document stays. Off with `--no-english-only`.
88
+ - **Datasets that are not named.** A form written as a description ("survey launched by the UNHCR", "mobile phone usage data",
89
+ "Routine surveillance system") can join an existing family but never creates one, and a family none of whose forms is
90
+ written like a name is dropped. Lowercase spellings of a real name ("demographic and health survey") still join it.
91
+ Off with `--no-named-only`.
92
+
93
+ `canonicalize.py` and `build_graph.py` take both flags and record what they left out (`non_english`, `unnamed`) in their output;
94
+ `harmonize.py` takes `--named-only` so a real dataset is never merged into a family that is left out. The dataset's label is chosen
95
+ among the forms written as a name when there is one ("Economic Activity Index", not "index of economic activity").
96
+
97
  ## Sources
98
 
99
  See `summary-<source>.json` in the repository for counts per source.
datasets/s2orc.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d85ebf969c827927b5b23f450cfa8b020fd7134d7ed40b895c70608e78f8f9cf
3
+ size 14308213
documents/s2orc.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7e242b861684efb8a53ae3937e84ff316b1b20692757fee89a32bf2760fd106
3
+ size 17738417
mention_family/s2orc.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24013414d123560f3c8e7f0141d6fff8070128c8ffd9e19f0ee9da1176de563c
3
+ size 5747040
mentions/s2orc.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2c5268233d99e30b9a288cd061e9503a37b7445faa3c2dbc12e1270f78836c46
3
+ size 28133826
summary-s2orc.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source": "s2orc",
3
+ "run_config": "s2orc",
4
+ "run_documents": 101945,
5
+ "documents_written": 101382,
6
+ "documents_in_run_without_source_metadata": 563,
7
+ "source_rows_without_sha256": 0,
8
+ "extraction_status": {
9
+ "ok": 101366,
10
+ "failed_extract": 16
11
+ },
12
+ "duplicate_pdfs_merged": 0,
13
+ "mentions": 485596,
14
+ "mentions_skipped_duplicate_id": 0,
15
+ "mentions_of_documents_not_in_documents": 0,
16
+ "datasets": 312238,
17
+ "expected_datasets_from_run": 312238,
18
+ "unreadable_lines_skipped": {},
19
+ "extraction": {
20
+ "entity_model": "rafmacalaba/gliner_agents_v3@4eae3f566f7b6d77a1cdb6f93b5c8ce5f4126172",
21
+ "metadata_model": "rafmacalaba/lfm2.5-350M-focus-metadata@95b746edb4a158d3b3fa487f4fd3d2ec32071860",
22
+ "extraction_settings": "{\"chunk_tokens\": 384, \"chunk_unit\": \"words\", \"dedupe_overlap\": true, \"enrich\": true, \"footnote_link\": true, \"labels\": [\"NAMED_DATA\", \"DESCRIPTIVE_DATA\", \"VAGUE_DATA\"], \"overlap\": 50, \"threshold\": 0.5}",
23
+ "stamp": {
24
+ "entity_model_id": "rafmacalaba/gliner_agents_v3",
25
+ "entity_revision": "4eae3f566f7b6d77a1cdb6f93b5c8ce5f4126172",
26
+ "metadata_model_id": "rafmacalaba/lfm2.5-350M-focus-metadata",
27
+ "metadata_revision": "95b746edb4a158d3b3fa487f4fd3d2ec32071860",
28
+ "labels": [
29
+ "NAMED_DATA",
30
+ "DESCRIPTIVE_DATA",
31
+ "VAGUE_DATA"
32
+ ],
33
+ "threshold": 0.5,
34
+ "chunk_tokens": 384,
35
+ "overlap": 50,
36
+ "chunk_unit": "words",
37
+ "footnote_link": true,
38
+ "dedupe_overlap": true,
39
+ "enrich": true,
40
+ "extract_batch_size": 32,
41
+ "lfm_batch_size": 16,
42
+ "device": "cuda"
43
+ },
44
+ "n_runs": 4,
45
+ "first_started_at": "2026-11-19T20:30:39+00:00",
46
+ "last_started_at": "2026-11-20T16:38:53+00:00",
47
+ "libraries": {
48
+ "python": "3.11.7",
49
+ "torch": "2.8.0",
50
+ "transformers": "5.16.1",
51
+ "gliner": "0.2.29",
52
+ "pymupdf": "1.28.2",
53
+ "pymupdf4llm": "0.3.4"
54
+ }
55
+ }
56
+ }