Question

I'm currently working on a project using the freebase dumps, which I insert assertions into a per-mid ordered LevelDB. My goal is to be able for a given name, like Bob Dylan, to retrieve every types linked to it name.

For example, "Bob Dylan" would correspond to "Musician", "Film Producer" and so on, each corresponding themselves to the types "/music/artist", "/film/producer" etc...

Unfortunatly, if it's rather easy to find out the Bob Dylan mid into the quad dump

/m/bobdylanmid        /common/topic/notable_types   /music/artist
/m/bobdylanmid        /common/topic/notable_types   /film/producer

I'd like to be able to find those types names in various languages now. But I can't find a logical way to retrieve them in the dump.

Any clue please?

Was it helpful?

Solution

I'm not 100% certain, but I don't think the schema is actually in the quad dump. I know it never used to be.

You'll need to look up the names using a query like this. Unfortunately, the human readable names exist only in English, so you'd need to jump through some more hoops to get other languages. For that you could try something along the lines of this slightly more complicated query

[{
  "id":   "/music/artist",
  "/freebase/type_profile/equivalent_topic": {
    "name": {
      "lang":  null,
      "value": null
    }
  },
  "name": null
}]​

It depends on the "equivalent topic" property being filled in, which may not be the case for all types. If you only want a few languages, you could modify the query to return those explicitly ("Musician" has 45 different language variants).

OTHER TIPS

If you are mainly interested in cases like your example (a person is/was a ...) using properties (rather than types) may do the job, in your case (the latter via a cvt):

/people/person/profession
/people/person/employment_history /business/employment_tenure/title

This might be more what you want to have anyways, unless you also want to display that e.g. Alan Turing is a "Literature Subject".

For the corresponding instances (with types /business/job_title, /people/profession) you can get the names in different languages (if existing).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top