Google Api FreeBase data dumps parsing using c#

☆樱花仙子☆ 提交于 2019-12-04 05:24:59

问题


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#.


回答1:


There are a couple .NET libraries that can read the RDF format of the dumps:

  • SemWeb.NET
  • dotNetRdf

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/.



来源:https://stackoverflow.com/questions/16476981/google-api-freebase-data-dumps-parsing-using-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!