At True Knowledge we are passionate about linked data and making our API as accessible as possible. We know there is a huge community of people working with linked data and we want to make our service more accessible to them. We have recently imported links to a series of external services using data made available through the DBpedia project. You can find a list of relations linking to external databases by querying our query API as described below.
Image Credit: Chris Bizer DBpedia LOD Cloud. CC
Querying True Knowledge
The following examples use our query language. If you are unfamiliar with it, please see our developers' help page, this code examples blog post, and this one.
The query for listing all foreign relations True Knowledge knows about is:
query x
x [is an instance of] [foreign key relation]
This allows you to ask questions about objects within the same database, for example you could ask for the wikipedia pages of the countries Queen Elizabeth II is head of state for:
query x
[url: ["http://en.wikipedia.org/wiki/Elizabeth_II_of_the_United_Kingdom"]] [is the wikipedia page for] y
y [is the head of state of] z
x [is the wikipedia page for] z
Or ask questions about objects between different databases, for example you could ask the Geonames URLs of the places the members of Girls Aloud are from given the DBpedia page:
query g
[url: ["http://dbpedia.org/resource/Girls_Aloud"]] [is the dbpedia uri for] x
[current time] [applies to] now/1
f: a [is a member of] x
f [applies at timepoint] now
p [is the origin of] a
g [is the geonames url for] p
You can use our api to map from one foreign key to another, or in this case all the others we know of:
query r, x
r [is an instance of] [foreign key relation]
[url: ["http://d.opencalais.com/er/company/ralg-tr1r/ce181d44-1915-3387-83da-0dc4ec01c6da"]] [is the open calais uri for] google
x r google
Or even the freebase ids of other husbands of women married to members of The Beatles:
query freebaseid
[url: ["http://en.wikipedia.org/wiki/The_Beatles"]] [is the wikipedia page for] thebeatles
beatle [is a member of] thebeatles
beatle [is married to] wife
wife [is married to] newhusband
newhusband ~[is strictly equal to] beatle
freebaseid [is the freebase id for] newhusband
Having a go...
The best place to start with using our API to run the examples above is at our developers' help page. We also have examples on this blog post about our API PHP library, and this one. You can ask us questions by replying to the API sign-up email or at our API support forums.
Comments