Wuhuwill Cursor commited on
Commit
4a78a44
·
1 Parent(s): abbc5cc

Remove redundant object display column

Browse files

Co-authored-by: Cursor <cursoragent@cursor.com>

Files changed (3) hide show
  1. README.md +19 -14
  2. SHA256SUMS +2 -2
  3. data/knowledge_edges.parquet +2 -2
README.md CHANGED
@@ -43,7 +43,7 @@ The release provides two ways to use the same graph:
43
  The default Dataset Viewer shows each knowledge connection as:
44
 
45
  ```text
46
- subject ── relation ──▶ object
47
  ```
48
 
49
  For example, an edge can also carry a natural-language question, a surface statement, construction-time confidence, and connectivity statistics.
@@ -77,7 +77,7 @@ The default Parquet split contains all 357,205 forward edges. It is not a sample
77
  - `hf download factprop/FACTPROP --repo-type dataset` downloads the **entire release**, including the canonical graph checkpoint.
78
  - `load_dataset(..., split="curated")` downloads only the curated entity summary; it is not the complete graph.
79
 
80
- If your goal is to obtain all knowledge connections in an easy-to-use format, use `knowledge_edges`. If you also need inverse traversal edges, raw BCE labels, stored evidence, or construction metadata, download `factprop_graph_v1.pkl`.
81
 
82
  ## Data model
83
 
@@ -96,7 +96,7 @@ The canonical checkpoint stores `qid` and `qid_status` as node attributes.
96
  Each forward edge represents one stored factual connection:
97
 
98
  ```text
99
- (subject, relation, object)
100
  ```
101
 
102
  The Parquet representation includes:
@@ -107,8 +107,7 @@ The Parquet representation includes:
107
  | `subject` | string | Source node label |
108
  | `subject_qid` | string or null | Subject Wikidata QID where available |
109
  | `relation` | string | FACTPROP relation identifier |
110
- | `object` | string | Target node label or readable literal |
111
- | `object_node_label` | string | Canonical checkpoint node label; use this field to reconstruct exact topology |
112
  | `object_qid` | string or null | Object Wikidata QID where available |
113
  | `object_type` | string | `entity`, `literal`, or `date_literal` |
114
  | `question` | string or null | Natural-language question associated with the fact |
@@ -118,7 +117,7 @@ The Parquet representation includes:
118
  | `subject_forward_out_degree` | integer | Number of forward facts originating from the subject |
119
  | `object_forward_in_degree` | integer | Number of forward facts pointing to the object |
120
 
121
- The table is sorted by descending `object_forward_in_degree`, making highly connected objects easy to inspect. For ordinary entities, `object` and `object_node_label` are identical. BCE literals use a readable `object` value while preserving the original negative checkpoint label in `object_node_label`.
122
 
123
  ### Auxiliary inverse edges
124
 
@@ -170,7 +169,7 @@ Inspect one connection:
170
 
171
  ```python
172
  row = edges[0]
173
- print(f'{row["subject"]} --{row["relation"]}--> {row["object"]}')
174
  print("Question:", row["question"])
175
  print("Statement:", row["surface"])
176
  print("Object connectivity:", row["object_forward_in_degree"])
@@ -189,22 +188,28 @@ edges = load_dataset(
189
 
190
  ## Common recipes
191
 
192
- ### Find all displayed facts involving an entity
193
 
194
  ```python
195
  entity = "Apple Inc."
196
 
197
  connected = edges.filter(
198
- lambda row: row["subject"] == entity or row["object"] == entity
 
 
199
  )
200
 
201
- print(connected.select_columns(["subject", "relation", "object"])[:20])
 
 
 
 
202
  ```
203
 
204
  For incoming facts only:
205
 
206
  ```python
207
- incoming = edges.filter(lambda row: row["object"] == entity)
208
  print("Incoming forward facts:", incoming.num_rows)
209
  ```
210
 
@@ -422,9 +427,9 @@ The canonical graph stores BCE year literals as negative internal labels:
422
  Ancient Egypt --FoundingDate--> -3100
423
  ```
424
 
425
- The edge surface expresses the readable meaning: approximately 3100 BCE. These values are date literals, not negative row IDs, negative connectivity, or corrupted entity indices.
426
 
427
- For usability, `knowledge_edges` renders such objects as `3100 BCE` and marks them as `object_type="date_literal"`. The same row preserves `-3100` in `object_node_label`, allowing exact topology reconstruction. The canonical checkpoint and complete raw entity index also retain the original labels.
428
 
429
  ## Recommended uses
430
 
@@ -517,7 +522,7 @@ sha256sum -c SHA256SUMS
517
 
518
  The released construction code uses `gpt-4o-mini` to generate candidate triplets and natural-language fields, then validates supported relations through Wikidata API and SPARQL queries. Project materials describe these candidates as Wikipedia-derived; the released builder does not directly ingest Wikipedia article text. The entity popularity index was exported from the unchanged paper graph, and its source checksum is retained in `metadata/graph.json`.
519
 
520
- `knowledge_edges` contains every forward edge from the checkpoint. It changes only the user-facing display of negative BCE literals and preserves each canonical object label separately. Topology and connectivity metrics are derived directly from the canonical graph. No graph nodes, mappings, edge topology, or checkpoint metadata were changed for this release.
521
 
522
  Use a Hub revision to freeze data. Proposed mapping corrections or enhanced versions should use a new versioned artifact rather than overwrite `factprop_graph_v1.pkl`.
523
 
 
43
  The default Dataset Viewer shows each knowledge connection as:
44
 
45
  ```text
46
+ subject ── relation ──▶ object_node_label
47
  ```
48
 
49
  For example, an edge can also carry a natural-language question, a surface statement, construction-time confidence, and connectivity statistics.
 
77
  - `hf download factprop/FACTPROP --repo-type dataset` downloads the **entire release**, including the canonical graph checkpoint.
78
  - `load_dataset(..., split="curated")` downloads only the curated entity summary; it is not the complete graph.
79
 
80
+ If your goal is to obtain all knowledge connections in an easy-to-use format, use `knowledge_edges`. If you also need inverse traversal edges, stored evidence, or construction metadata, download `factprop_graph_v1.pkl`.
81
 
82
  ## Data model
83
 
 
96
  Each forward edge represents one stored factual connection:
97
 
98
  ```text
99
+ (subject, relation, object_node_label)
100
  ```
101
 
102
  The Parquet representation includes:
 
107
  | `subject` | string | Source node label |
108
  | `subject_qid` | string or null | Subject Wikidata QID where available |
109
  | `relation` | string | FACTPROP relation identifier |
110
+ | `object_node_label` | string | Canonical target-node label; use this field for display, filtering, and topology reconstruction |
 
111
  | `object_qid` | string or null | Object Wikidata QID where available |
112
  | `object_type` | string | `entity`, `literal`, or `date_literal` |
113
  | `question` | string or null | Natural-language question associated with the fact |
 
117
  | `subject_forward_out_degree` | integer | Number of forward facts originating from the subject |
118
  | `object_forward_in_degree` | integer | Number of forward facts pointing to the object |
119
 
120
+ The table is sorted by descending `object_forward_in_degree`, making highly connected objects easy to inspect. `object_node_label` is the single target-node field and exactly matches the canonical checkpoint label.
121
 
122
  ### Auxiliary inverse edges
123
 
 
169
 
170
  ```python
171
  row = edges[0]
172
+ print(f'{row["subject"]} --{row["relation"]}--> {row["object_node_label"]}')
173
  print("Question:", row["question"])
174
  print("Statement:", row["surface"])
175
  print("Object connectivity:", row["object_forward_in_degree"])
 
188
 
189
  ## Common recipes
190
 
191
+ ### Find all facts involving an entity
192
 
193
  ```python
194
  entity = "Apple Inc."
195
 
196
  connected = edges.filter(
197
+ lambda row: (
198
+ row["subject"] == entity or row["object_node_label"] == entity
199
+ )
200
  )
201
 
202
+ print(
203
+ connected.select_columns(
204
+ ["subject", "relation", "object_node_label"]
205
+ )[:20]
206
+ )
207
  ```
208
 
209
  For incoming facts only:
210
 
211
  ```python
212
+ incoming = edges.filter(lambda row: row["object_node_label"] == entity)
213
  print("Incoming forward facts:", incoming.num_rows)
214
  ```
215
 
 
427
  Ancient Egypt --FoundingDate--> -3100
428
  ```
429
 
430
+ The edge `surface` expresses the readable meaning: approximately 3100 BCE. These values are date literals, not negative row IDs, negative connectivity, or corrupted entity indices.
431
 
432
+ To avoid two nearly identical target columns, `knowledge_edges` retains only the canonical `object_node_label`, such as `-3100`, and marks it as `object_type="date_literal"`. Use the `surface` field when a human-readable BCE expression is needed.
433
 
434
  ## Recommended uses
435
 
 
522
 
523
  The released construction code uses `gpt-4o-mini` to generate candidate triplets and natural-language fields, then validates supported relations through Wikidata API and SPARQL queries. Project materials describe these candidates as Wikipedia-derived; the released builder does not directly ingest Wikipedia article text. The entity popularity index was exported from the unchanged paper graph, and its source checksum is retained in `metadata/graph.json`.
524
 
525
+ `knowledge_edges` contains every forward edge from the checkpoint and uses the canonical target label in `object_node_label`. Topology and connectivity metrics are derived directly from the canonical graph. No graph nodes, mappings, edge topology, or checkpoint metadata were changed for this release.
526
 
527
  Use a Hub revision to freeze data. Proposed mapping corrections or enhanced versions should use a new versioned artifact rather than overwrite `factprop_graph_v1.pkl`.
528
 
SHA256SUMS CHANGED
@@ -1,12 +1,12 @@
1
  8eebe4a8b875d1061c7b55947883b455fa1565fb6a6e39b8056c7160381d7cfc GRAPH.md
2
  06d1d7c1b3d72eb9ba4efc0d3a14cb0a52049b36883d6b5b666a24babf132777 LICENSE_DATA
3
- 5863c0d8320fe0fd3e5e2dfabc4a2de13927e342c9ff5eafde112d85f31afb34 README.md
4
  33fb70fa85c957c1d702cd57b81a4ed0d3cde6d558394409f96046fbee9f9093 THIRD_PARTY_NOTICES.md
5
  fa7d9aec01b9c98c09cebc941265e4351693b362ffb3048d2c86585e84d7800d browser-index.json
6
  3a9211368ac52af6cd0647cb026c05cb62743804011b68624682e11df964c038 data/entities_curated.parquet
7
  010beb905ef89b491159a8d8b2b013ea55219d26c8545bed07f64010bfa9ffce data/entities_curated.jsonl
8
  2c21f2aefb9cbcc749cd813412dd90fea440050eeb8efb3356de786ebeb501e6 data/entities.jsonl
9
- 58c0aadc93626731bac8ee26002e7b82fbc4919f0dc9ea6bf2b2c0b112c8d0a4 data/knowledge_edges.parquet
10
  437a434260edbb019c85575d65b4775cb2461f145e17966ee3acc8e4625ce7c8 factprop_graph_v1.pkl
11
  c73d0a4b3f6df2166ba960a64cd5d3522728f46c2597f4f6604cc65533b46888 load_graph.py
12
  29e825c9838eb795a18672eb6a569cc2b666cf6971b5bd911655113a138e94ad metadata/graph.json
 
1
  8eebe4a8b875d1061c7b55947883b455fa1565fb6a6e39b8056c7160381d7cfc GRAPH.md
2
  06d1d7c1b3d72eb9ba4efc0d3a14cb0a52049b36883d6b5b666a24babf132777 LICENSE_DATA
3
+ 8050ea1ee01238cce56ee08ee92229be211afcfd5ee3fc41eaf7ba349bba84b8 README.md
4
  33fb70fa85c957c1d702cd57b81a4ed0d3cde6d558394409f96046fbee9f9093 THIRD_PARTY_NOTICES.md
5
  fa7d9aec01b9c98c09cebc941265e4351693b362ffb3048d2c86585e84d7800d browser-index.json
6
  3a9211368ac52af6cd0647cb026c05cb62743804011b68624682e11df964c038 data/entities_curated.parquet
7
  010beb905ef89b491159a8d8b2b013ea55219d26c8545bed07f64010bfa9ffce data/entities_curated.jsonl
8
  2c21f2aefb9cbcc749cd813412dd90fea440050eeb8efb3356de786ebeb501e6 data/entities.jsonl
9
+ 95c003701c343fb7dfa49b3dd324154e31f1da66ec5cfda7f1868c9a0a86bcb5 data/knowledge_edges.parquet
10
  437a434260edbb019c85575d65b4775cb2461f145e17966ee3acc8e4625ce7c8 factprop_graph_v1.pkl
11
  c73d0a4b3f6df2166ba960a64cd5d3522728f46c2597f4f6604cc65533b46888 load_graph.py
12
  29e825c9838eb795a18672eb6a569cc2b666cf6971b5bd911655113a138e94ad metadata/graph.json
data/knowledge_edges.parquet CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:58c0aadc93626731bac8ee26002e7b82fbc4919f0dc9ea6bf2b2c0b112c8d0a4
3
- size 18599971
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95c003701c343fb7dfa49b3dd324154e31f1da66ec5cfda7f1868c9a0a86bcb5
3
+ size 17291119