I want to search the google Api freebase. I want to get general amount of data. For example all Ids of songs, or films. I downloaded the data dumps gz file. I wonder what will be the best solution of parsing the file and getting the data I need. I am using .net c#.
Asked
Active
Viewed 667 times
1 Answers
1
There are a couple .NET libraries that can read the RDF format of the dumps:
The data dumps are also formatted as tab separated values so you should be able to use any CSV parser to parse each line as a triple.
Make sure that you read through the developer docs on how the data dumps are formatted. Basically, each line forms a triple that has a subject, predicate and object. To get all the data about films you'll be looking for triples that have a predicate that starts with /film/.

Shawn Simister
- 4,613
- 1
- 26
- 31
-
I tried using an already made parser like CsvReader and it raised error : "An unhandled exception of type 'LumenWorks.Framework.IO.Csv.MalformedCsvException' occurred in LumenWorks.Framework.IO.dll". any ideas? – Gidi May 11 '13 at 14:56
-
Did you tell it to separate on tabs rather than commas? Also you might need to tell it to skip over the first couple of lines where the prefix headers are. That error message could be anything though. – Shawn Simister May 11 '13 at 21:24
-
can you please tell me how tp search for actors or directors please? – Gidi May 12 '13 at 11:32
-
I would also love to get imdb ids from the Api. – Gidi May 12 '13 at 13:52
-
this is the query I want http://www.freebase.com/query?autorun=1&q=%22id%22:%22/m/0bth54%22,%22name%22:null,%22/film/film/imdb_id%22:[] and when I try to search the google api to return json it raise error with this url: https://www.googleapis.com/freebase/v1/mqlread?query={{%22/film/film/imdb_id%22:[],%22id%22:%22/m/027pfg%22}} What am I doing wrong?? – Gidi May 12 '13 at 14:00
-
http://stackoverflow.com/questions/16508206/google-freebase-api-problems-with-querying – Gidi May 12 '13 at 14:51
-
http://stackoverflow.com/questions/16537725/freebase-google-api-data-dumps-seatrching-for-all-films – Gidi May 14 '13 at 07:48
-
http://stackoverflow.com/questions/17523027/trying-to-get-wiki-id-from-the-freebase-api – Gidi Jul 08 '13 at 09:24