YAGO - Syntax
YAGO is based on RDF
(Resource Description Framework), a family of specifications from the
(World Wide Web Consortium).
The distribution I'm importing is encoded in
(Terse RDF Triple Language).
Neo4j and Turtle both support Unicode
but there are some minor character set issues which must be handled.
There are also some namespace and related issues.
This page is only a descriptive summary;
see the conversion code for definitive information.
YAGO's Turtle (
) files use
allowing them to shorten URIs in the RDF triples.
Using the Unix command line, I did a simple and quick sanity check,
making sure that there were no cross-file usage conflicts:
$ head -50 *.ttl | egrep '^@' | sort | uniq -c
25 @base <http://yago-knowledge.org/resource/> .
25 @prefix dbp: <http://dbpedia.org/ontology/> .
notation is convenient, but not fully utilized in YAGO.
So, I extended and regularized things a bit,
to an explicit
, adding more prefixes, etc:
appears to be used far more than any other prefix,
so my tentative plan (to save space) is to make it the default.
By default, Cypher identifiers use a rather restricted character set:
This conflicts with YAGO's use of colons (eg,
and could conflict with other (eg, Unicode) characters, as well.
However, the only YAGO-based identifiers I'm using are names
of relations and properties.
These are derived from my expansions of YAGO predicates
so I can ensure that there are no character set problems.
YAGO2s is divided into 25 "themes" (eg,
each of which has a unique provenance (ie, nature, origin).
I may capture this information (eg, in a
Some YAGO names (eg,
) have a prefix (
which further characterizes their provenance.
I may split off this information in a future revision.
RDF's literal objects can contain both values and metadata (eg, units).
I plan to strip off the metadata and store it in a companion property (
RDF Literal prop prop_M
----------- ---- ------
42, "42"^^xsd:integer 42 'number'
1.85"^^<m> 1.85 'number (^^<m>)'
"1.2"^^xsd:a 1.2 'number (^^xsd:a)'
"a"@b 'a' 'string (@b)
This wiki page is maintained by Rich Morin
an independent consultant specializing in software design, development, and documentation.
Please feel free to email
comments, inquiries, suggestions, etc!