wikipunk commited on
Commit
3b67a15
·
1 Parent(s): a322b20

add readme back

Browse files
Files changed (1) hide show
  1. INFO.md → README.md +10 -12
INFO.md → README.md RENAMED
@@ -3,7 +3,7 @@
3
  ## Dataset Description
4
  This datasets contains triples filtered from yago-facts.ttl and
5
  yago-beyond-wikipedia.ttl in the YAGO 4.5 dataset. The SPARQL query
6
- used to filter the triples is in `raw/filter.sparql`. This represents
7
  a subset of the YAGO 4.5 dataset maintaining only English labels.
8
 
9
  I remapped some schema.org URIs to use the
@@ -33,9 +33,9 @@ base. YAGO refines the data as follows:
33
  ### Dataset Structure
34
  The dataset is structured as follows:
35
 
36
- - **raw/yago-taxonomy.ttl:** Contains the `rdfs:subClassOf` relations
37
  for YAGO and the prefix mappings for the N-Triples.
38
- - **raw/facts.tar.gz:** Compressed file containing chunks of the
39
  dataset in N-Triples format, representing the factual knowledge in
40
  YAGO.
41
 
@@ -49,7 +49,7 @@ Each RDF triple in the dataset is represented with the following features:
49
  - **object:** The object of the triple, representing the entity or
50
  value linked by the predicate.
51
 
52
- ### Splits
53
 
54
  The dataset is logically divided into multiple chunks, each containing
55
  a subset of RDF triples. Users can load specific chunks or the entire
@@ -67,15 +67,13 @@ from datasets import load_dataset
67
  dataset = load_dataset('wikipunk/yago-4.5-en', num_proc=4)
68
  ```
69
 
70
- ### Accessing the YAGO Taxonomy File
 
 
71
 
72
- The `yago-taxonomy.ttl` file can be accessed and loaded in every process as follows:
73
-
74
- ```python
75
- from rdflib import Graph
76
-
77
- taxonomy_graph = Graph()
78
- taxonomy_graph.parse('raw/yago-taxonomy.ttl', format='turtle')
79
  ```
80
 
81
  ## Additional Information
 
3
  ## Dataset Description
4
  This datasets contains triples filtered from yago-facts.ttl and
5
  yago-beyond-wikipedia.ttl in the YAGO 4.5 dataset. The SPARQL query
6
+ used to filter the triples is in `filter.sparql`. This represents
7
  a subset of the YAGO 4.5 dataset maintaining only English labels.
8
 
9
  I remapped some schema.org URIs to use the
 
33
  ### Dataset Structure
34
  The dataset is structured as follows:
35
 
36
+ - **yago-taxonomy.ttl:** Contains the `rdfs:subClassOf` relations
37
  for YAGO and the prefix mappings for the N-Triples.
38
+ - **facts.tar.gz:** Compressed file containing chunks of the
39
  dataset in N-Triples format, representing the factual knowledge in
40
  YAGO.
41
 
 
49
  - **object:** The object of the triple, representing the entity or
50
  value linked by the predicate.
51
 
52
+ ### Chunks
53
 
54
  The dataset is logically divided into multiple chunks, each containing
55
  a subset of RDF triples. Users can load specific chunks or the entire
 
67
  dataset = load_dataset('wikipunk/yago-4.5-en', num_proc=4)
68
  ```
69
 
70
+ ``` python
71
+ # Accessing the first row of the dataset
72
+ first_row = dataset[0]
73
 
74
+ # Output: {'subject': '<http://yago-knowledge.org/resource/Sdsscgb_11322_U002E_4_Q85387516>',
75
+ # 'predicate': '<http://www.w3.org/2000/01/rdf-schema#comment>',
76
+ # 'object': '"galaxy"@en'}
 
 
 
 
77
  ```
78
 
79
  ## Additional Information