mql

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:

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)

Google Freebase Api C# .Net Example

家住魔仙堡 提交于 2019-12-04 09:27:28
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 The correct code to do a MQL query in C# using the Google API Client Library should look something like

converting freebase MQL to SPARQL

吃可爱长大的小学妹 提交于 2019-12-04 09:05:49
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) Following sub-query looks like working. SELECT ?artist ?album WHERE { ?artist :album ?album . { SELECT

How can I get a list of all film ids from Freebase?

非 Y 不嫁゛ 提交于 2019-12-03 15:35:31
On a project I was working on a couple of years back, I was building a set of data about movies from Freebase. A simple shell script downloaded the "film.tsv" file (from http://download.freebase.com/datadumps/latest/browse/film/film.tsv ). I then used the "id" field in that file to build the necessary MQL requests for each of the films (retrieving the other properties I was interested in e.g. actors, genres). After looking at the developer's guide today I realise that Freebase has moved on a fair bit and significantly I see that the dump file I used before is no longer available. I also see

Import Freebase to Triplestore

我怕爱的太早我们不能终老 提交于 2019-12-03 12:53:08
问题 I'm currently planning a big project containing big data. I already used the search and all results tell me that it's not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB or Freebase to RDF As I can see, the dump is already available as RDF, so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL? 回答1: For everybody having Problems importing the Freebase Dump: 1) Keep your RDF/Turtle Parser

Import Freebase to Triplestore

梦想的初衷 提交于 2019-12-03 03:10:41
I'm currently planning a big project containing big data. I already used the search and all results tell me that it's not possible to import Freebase into any triplestore without usage of 3rd Party Tools like BaseKB or Freebase to RDF As I can see, the dump is already available as RDF, so where is the problem if I want to import the dump into my 4store triplestore and access the data via SPARQL? For everybody having Problems importing the Freebase Dump: 1) Keep your RDF/Turtle Parser updated. (Latest Version of raptor 2 can recognize the '.', e.g. at ns:common.topic.notable_for.example 2) The

How to get cursor from mqlread() when using Freebase API?

我的未来我决定 提交于 2019-12-01 13:42:28
I'm using the Python-Freebase module's mqlread() . Using the following query: query = [{ "cursor": True, "id": None, "type": "/games/game", "mid": None, }] That returns 100 entries, but the result does not include "cursor". If you run the query manually you get something like: { "code": "/api/status/ok", "cursor": "eNqFj8FqwzAQRD-mF4sisrtaaaWlhP6H8MHYNTUEW8hpKP36KjgU2kvnMoeZ4THjR923qhKS07wpAvR5VZbYBIL9sE76FDGAs-yCA_FISprL_nWUt5tC383L59ukh9llH_TvpL7Y7rYUdZ4CN9iRITB6vTwnAhriCAwAgXGO8Etkz48dicnvy3ptTGO6OwgsBwIfwJNeHpDWowgh_URO63-M0Z7vM0neGZNL3RrihBKFU_uZS2l3sT-9cpIBaRrnOE8JhaAhQL4B9ZFRmg==",

How to get cursor from mqlread() when using Freebase API?

十年热恋 提交于 2019-12-01 12:39:30
问题 I'm using the Python-Freebase module's mqlread(). Using the following query: query = [{ "cursor": True, "id": None, "type": "/games/game", "mid": None, }] That returns 100 entries, but the result does not include "cursor". If you run the query manually you get something like: { "code": "/api/status/ok", "cursor": "eNqFj8FqwzAQRD-mF4sisrtaaaWlhP6H8MHYNTUEW8hpKP36KjgU2kvnMoeZ4THjR923qhKS07wpAvR5VZbYBIL9sE76FDGAs-yCA_FISprL_nWUt5tC383L59ukh9llH

Freebase Java API full text retrieval

↘锁芯ラ 提交于 2019-11-30 20:34:51
问题 Is it possible to use the "text" MQL extension with the java api, so you can get the full description text. I mean sth like this:link but for the java api. 回答1: You can use the extended parameter in the query envelope to enable MQL extensions in your query. With the example query that Philip gave in the linked question, that would look like this: JSON query = o( "id", "/en/jimi_hendrix", "/common/topic/article", a(o( "text", o( "maxlength", 16384, "chars", null ) )) ); JSON envelope = o(