谷歌阿比游离碱的数据转储使用C#解析 [英] Google Api FreeBase data dumps parsing using c#

查看:145
本文介绍了谷歌阿比游离碱的数据转储使用C#解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要搜索的谷歌阿比游离碱。我想获得的数据量一般。例如歌曲,电影或所有ID。我下载的数据转储文件的GZ。我不知道会是怎样解析文件和获得我需要的数据的最佳解决方案。我使用.NET C#

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

推荐答案

有可读取转储的RDF格式的夫妇.NET库:

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

  • SemWeb.NET
  • dotNetRdf

数据转储也被格式化为制表符分隔值,所以你应该能够使用任何CSV解析器解析每行三。

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

这篇关于谷歌阿比游离碱的数据转储使用C#解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆