Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to search in freebase by mid

Tags:

freebase

I have just dumped the data from Freebase, but when I see in the data I see "/m/03lp844" which is mid. But how am I going to get more detail out of that mid? I can't find anything on the documentation.

So, I dumped film data and when I look for actors, it only shows a bunch of mids, but I need actors name as well.

Thanks a lot.

like image 466
toy Avatar asked Aug 09 '12 21:08

toy


2 Answers

You should look at the Freebase schema so that you understand how things are connected to each other. In the case of films and actors, they are connected together by an intermediary node /film/performance. You'll need to follow the link from the films to those nodes and from there to the linked actor (and look at the actor's /type/object/name property).

like image 127
Tom Morris Avatar answered Nov 01 '22 10:11

Tom Morris


The mid is an uniq id for every object in freebase. So you will see a lot of edges pointing to other mids. Indeed, I think only when the linked information is not simple values like string, number, etc, it will be a mid. One easy way to look what those mid refer to is using the rdf api: you could query by key /en/michael_jordan : https://www.googleapis.com/freebase/v1/rdf/en/michael_jordan or you could query by mids: https://www.googleapis.com/freebase/v1/rdf/m/054c1 and you could get the name of actors names using the "rdfs:name" edge. The result RDF api shown to you should be familiar.They are all the triples start with the key or mid in the freebase dump.

other interesting apis are here: http://wiki.freebase.com/wiki/API you can search, fetch description, find everything related to a mid, etc. Hope it helps.

like image 44
Chenyan Xiong Avatar answered Nov 01 '22 10:11

Chenyan Xiong