hidemyname
hidemyname

Reputation: 4287

How to map mid of notable types of freebase to the type name?

I want to use freebase dump to query notable types. But I can only get the machine id of types like "m.0kpv11". Is there a way to map it to real name?

Upvotes: 1

Views: 559

Answers (1)

Tom Morris
Tom Morris

Reputation: 10540

The Freebase RDF dumps include a significant amount of redundancy, so there usually display names, in many languages, near the ID. e.g.

<http://rdf.freebase.com/ns/g.11b764z9c9>   <http://rdf.freebase.com/ns/common.notable_for.display_name>    "Musical Recording"@en  .
<http://rdf.freebase.com/ns/g.11b764z9c9>   <http://rdf.freebase.com/ns/common.notable_for.display_name>    "Musikalspår"@sv    .
<http://rdf.freebase.com/ns/g.11b764z9c9>   <http://rdf.freebase.com/ns/common.notable_for.object>  <http://rdf.freebase.com/ns/m.0kpv11>   .

but anything used as an object (3rd column in the triple) will also have a set of triples with the same ID as a subject (ie 1st column), so you can look for:

<http://rdf.freebase.com/ns/m.0kpv11>   <http://rdf.freebase.com/ns/type.object.name>   "Musical Recording"@en  .
<http://rdf.freebase.com/ns/m.0kpv11>   <http://www.w3.org/2000/01/rdf-schema#label>    "Musical Recording"@en  .

In addition to the @en for English labels, there are also labels available in a total of 44 languages (for this example anyway - it can vary). Some examples:

<http://rdf.freebase.com/ns/m.0kpv11>   <http://rdf.freebase.com/ns/type.object.name>   "Pista musical"@es  .
<http://rdf.freebase.com/ns/m.0kpv11>   <http://rdf.freebase.com/ns/type.object.name>   "Canción"@es-419    .
<http://rdf.freebase.com/ns/m.0kpv11>   <http://rdf.freebase.com/ns/type.object.name>   "Muusikapala"@et    .
<http://rdf.freebase.com/ns/m.0kpv11>   <http://rdf.freebase.com/ns/type.object.name>   "Μουσικό κομμάτι"@el    .

Upvotes: 1

Related Questions