Search code examples
nlpsemantic-webfreebasedbpediawikidata

Way to dump the relations from Freebase?


I have ran through the Google API for Freebase, but still confusing. Is there simple way to dump the relations from Freebase?

I want to dump all entity-name-pair with a specific relation (e.g. marry_with, ...), and also want the chinese entity names.

Should I

  • write MQL to query all entity satisfying the condition? (but the MQL service is going to be retired recently. )
  • or dump all freebase and parse?
  • or is there other API capable of doing this?
  • or other KB (YAGO, DBpedia, wikidata) is more easier of doing this?

Which way is easier to work out. Please shed me some direction . thanks


Solution

  • Freebase was retired and Wikidata is the recommended alternative.

    You can use the Wikidata Query API to get entities with a specific property.

    For instance, the query http://wdq.wmflabs.org/api?q=CLAIM[26] retrieves the IDs of all items having the property spouse (P26).

    You can combine this with the Wikidata API, for instance to get labels and aliases in English for the first three items returned by the previous query: http://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q23|Q24|Q42&languages=en&props=labels|aliases