freebase

Find a place description in Freebase using latitude and longitude?

雨燕双飞 提交于 2019-12-11 19:28:31
问题 I'm receiving lat and long data from Google Maps and I want to send that along to Freebase to get a description of the relevant place. There's a geocode schema (http://www.freebase.com/location/geocode?schema=) but it seems like you have to to enter them separately? I'd like to, let's say using the lat / long of Berlin, get the following description from Freebase: http://www.freebase.com/m/0156q Would love any help, thank you. 回答1: If you convert your point to a small bounding box, you could

from wikipedia title to freebase mid

99封情书 提交于 2019-12-11 19:16:29
问题 Is there a way to map Wikipedia title link to Freebase mids? For example, wikipedia titles are: From_Russia_with_Love_(film), John_Barry_(composer), Lionel_Bart, Matt_Monro [{ "mid": null, "id": "/en/matt_monro" }] It works for titles like "Matt_Monro", "Lionel_Bart", but not "from_russia_with_love_(film)" or "john_barry_(composer)" Any suggestions please? 回答1: The correct key to use is /wikipedia/en_title/Matt_Monro . There's no guarantee that /en/matt_monro points the same place (and newer

How to read Freebase RDF data? It seems to be a bit broken

心已入冬 提交于 2019-12-11 10:31:36
问题 I'm following instruction of using Freebase RDF parsing for ruby at https://developers.google.com/freebase/v1/rdf-overview Environment: rdf-1.1.6, rdf-turtle-1.1.4, ruby-2.1.4[ x86_64 ], Ubuntu 14.10 My code is: require 'rubygems' require 'cgi' require 'addressable/uri' require 'rdf' require 'rdf/turtle' topic_id = '/m/0d6lp' url = Addressable::URI.parse('https://www.googleapis.com/freebase/v1/rdf' + topic_id) RDF::Turtle::Reader.open(url) do |reader| reader.each_statement do |statement| puts

distant supervision: how to connect named entities to freebase (KB) relations

风流意气都作罢 提交于 2019-12-11 03:59:17
问题 I'm trying to create a distant supervision corpus. Thus far I've assembled the data, and passed it through an NER system, so you can see an example below. Original data: <p> Myles Brand, the president of the National Collegiate Athletic Association, said in a telephone interview that he had not been approached about whether the N.C.A.A. might oversee a panel for the major bowl games similar to the one that chooses teams for the men's and women's basketball tournaments. </p> Processed with

Stuck on parsing a JSON response to a Java Object in Android

流过昼夜 提交于 2019-12-10 23:32:14
问题 I am making a query call to freebase and I receive a JSON response. The response has the following structure: { "code": "/api/status/ok", "result": [ { "/common/topic/image": [{ "guid": "#9202a8c04000641f8000000004b67f6d" }], "/people/person/profession": [{ "name": "Critic" }], "id": "/en/michael_jackson_1942", "name": "Michael Jackson", "type": "/people/person" }, { "/common/topic/image": [{ "guid": "#9202a8c04000641f800000001b90fdea" }], "/people/person/profession": [{ "name": "Actor" }],

Obtain /common/topic/description in Freebase MQL

て烟熏妆下的殇ゞ 提交于 2019-12-10 23:31:08
问题 Good day, how can I obtain the topic text description in Freebase? For example, I ask MQL query about Chernobyl disaster: [{ "type": "/common/topic", "description": null, "mid": "/m/07q37w" }] but obtain null description. At the same time I can see non-null description at Freebase page: http://www.freebase.com/m/07q37w 回答1: /common/topic/description is a pseudo-property which is not accessible through MQL. You can use the Topic API as follows: https://www.googleapis.com/freebase/v1/topic/m

Non unique query with Freebase MQL read google api

不问归期 提交于 2019-12-10 17:36:22
问题 It seems I am only able to do unique queries (i.e. including an entity id in the query) with the new freebase MQL read api: The following searches on id and type: https://www.googleapis.com/freebase/v1/mqlread?query={"name":null,"id":"/en/bob_dylan","type":"/people/person"} and successfully returns: { "result": { "type": "/people/person", "id": "/en/bob_dylan", "name": "Bob Dylan" } } The following searches with type only: https://www.googleapis.com/freebase/v1/mqlread?query={"name":null,

Freebase query - exclusion of certain values

左心房为你撑大大i 提交于 2019-12-10 14:28:22
问题 I want to retrieve name of all movies and their genre. It's ok if information about genre is empty, but if genre is known I want to retrieve it. "/film/film/genre": [{"id":null,"optional":"optional"}] But I'm not interested in gay pornography, so I want to exclude all movies with genre "/en/gay_pornography". "/film/film/genre": [{"id|=":["/en/gay_pornography"],"optional":"forbidden"}] The problem is, how to combine it in one query? I.e. how to get all movies, even those with no genre and

text file of all titles / topic titles in Freebase

微笑、不失礼 提交于 2019-12-10 11:17:49
问题 I need a text file to contain every title / title of each topic / title of each item in a .txt file each on its own line. How can I do this or make this if I have already downloaded a freebase rdf dump? If possible, I also need a separate text file with each topic's / item's description on a single line each description on its own line. How can I do that? I would greatly appreciate it if someone could help me make either of these files from a Freebase rdf dump. Thanks in Advance! 回答1: Filter

Freebase “Key cursor is a reserved word”

前提是你 提交于 2019-12-10 10:04:41
问题 Following the Freebase docs on Envelope Parameters, running { "cursor":true, "query":[{ "type":"/music/album", "artist":"The Police", "name":null, "limit":10 }] }​ results in error "Key cursor is a reserved word" as @Domenic notes. What's going wrong? Edit 1 So this query without a cursor works but this one doesn't because cursor was a variable name not a string enclosed in quotes. As a user it makes sense to type the broken version of "cursor" because the read parameter type table has both