freebase

Google Freebase Api C# .Net Example

不羁岁月 提交于 2019-12-06 06:31:52
问题 I am new to developing with the Goolge API’s. I am trying to get the Google.Apis.Freebase.V1 API working in C#. Does anyone have a small example on using this API in C#? I have spent the last several days looking and can only find a couple of examples for the old Freebase Api. Nothing for the Google API. I am just looking for a simple example on setting up a connection to the API, doing a search, then how to handle a MQL query back into a Json object. The simpler the better. Thanks Scott 回答1:

text file of all titles / topic titles in Freebase

落花浮王杯 提交于 2019-12-06 06:23:00
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! Filter the RDF dump on the predicate/property ns:type.object.name . If you only want a particular language, also

converting freebase MQL to SPARQL

落花浮王杯 提交于 2019-12-06 05:15:03
问题 following freebase MQL finds 5 artists and 50 albums for each artists. [{ "type" : "/music/artist", "name":null, "album" : [{ "name" : null, "count":null, "limit":50 }], "limit":5 }] first try - without a subquery I can write SPARQL like this: SELECT ?artist ?album WHERE { ?artist :type :/music/artist . ?artist :album ?album } LIMIT n but, I don't know how many n should be specified because SPARQL has no hierarchy as far as I know. second try - with a sub-query (not sure this works correctly)

Can I export translations of place names from freebase.com

最后都变了- 提交于 2019-12-06 00:05:47
So I've looked at this use of the freebase API and I was really impressed with the translations of the name that it found. IE Rome, Roma, Rom, Rzym, Rooma,로마, 罗马市. This is because I have a database of some 5000+ location names and I would very much like all French, German or Korean translations for these English names. The problem is I spent about two hours clicking around freebase, and could find no way to get a view of city/location names in a different language mapped to English. So I'd love it if someone who understands what freebase is and how it's organized could get me a link to that

Freebase API call works in browser but fails with curl

邮差的信 提交于 2019-12-06 00:03:18
I'm trying to receive data from the Freebase API. I manually built a working API call which gave me a valid JSON response in my browser. So I wrote a PHP Function which should do exactly that: $service_url = 'https://www.googleapis.com/freebase/v1/search'; $params = array( 'filter' => '(all name:"Avatar")', 'lang' => 'en', 'type' => 'film/film', 'key' => Configure::read('Api.Key') ); $url = $service_url . '?' . http_build_query($params); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $response = json_decode(curl_exec($ch), true); curl_close

Using freebase vectors with gensim

让人想犯罪 __ 提交于 2019-12-05 21:31:32
I am trying to use the freebase word embeddings released by Google, but I have a hard time getting the words from the freebase name. model = gensim.models.Word2Vec.load_word2vec_format('freebase-vectors-skipgram1000.bin',binary=True) model.vocab.keys()[:10] Out[22]: [u'/m/026tg5z', u'/m/018jz8', u'/m/04klsk', u'/m/08gd39', u'/m/0kt94', u'/m/05mtf0t', u'/m/05tjjb', u'/m/01m3vn', u'/m/0h7p35', u'/m/03ggvg3'] Does anyone know if it exist some kind of table to map the freebase representations into the words they represent ? Regards, Hedi Someone has actually done a nice thing for us all and mapped

List all Freebase Domains with MQL query or API call

旧时模样 提交于 2019-12-05 17:12:47
I would like to develop a Freebase java application that lets you browse Freebase. I thought a good starting point would be to mimic the Freebase Schema Explorer and allow the user of my app to "drill down" through Domains, Types in a Domain, then Instances in a Type. Can someone please assist in how you retrieve a List of domains? Then a list in that domain? etc... The user can then select a domain and i would like to preset a list of types within that domain and so on until they have found the entry or entries they are investigating. Philip Kendall MQL for domains: [{ "id": null, "name":

google api for glorious info box? [closed]

∥☆過路亽.° 提交于 2019-12-05 13:10:40
I'm guessing this info is privileged since I couldn't find anything on Google's listed APIs. In fact I'd be amazed if it wasn't proprietary securely fastened Google magic, but thought I'd ask anyway. Is there an Google API for the information appearing when you do a basic search for say an Actress or Rockband? You know the box that appears to the right of the results if google figures out exactly what you're looking for. (I'm specifically interested in musicians despite the example below) I.e. https://www.google.com/search?q=woody+allen I can get similar milage using Freebase, but Google's is

Pass a JSON object to an url with requests

偶尔善良 提交于 2019-12-05 08:14:11
So, I want to use Kenneth' excellent requests module . Stumbled up this problem while trying to use the Freebase API . Basically, their API looks like that: https://www.googleapis.com/freebase/v1/mqlread?query=... as a query, they expect a JSON object, here's one that will return a list of wines with their country and percentage of alcohol : [{ "country": null, "name": null, "percentage_alcohol": null, "percentage_alcohol>": 0, "type": "/food/wine" }]​ Of course, we'll have to escape the hell out of this before passing it to an URL, so the actual query will look like this: fullurl = 'https:/

How to use Google Knowledge Graph API

旧时模样 提交于 2019-12-04 23:29:49
问题 In what useful way can I use Google Knowledge Graph API at the moment? Let's say I have the MID for 1990 FIFA World Cup , which is /m/014nm_ and I make this request: GET https://kgsearch.googleapis.com/v1/entities:search?ids=%2Fm%2F014nm_&key={MY_API_KEY} I'll get something like this http://pastebin.com/M1fgj7Ew Now how can I use that information in a meaningful way? Just a description and a wikipedia link is not that comprehensive. How can I find out what other entities are linked to this