すべてのエンティティを含む圧縮された freebase データ ダンプがあります。grep などを使用してデータ ダンプをトリミングし、英語のエンティティのみを含めるにはどうすればよいですか?
rdf ダンプを次のように取得しようとしているのは次のとおりです: http://play.golang.org/p/-WwSysL3y3
<card>
<title></title>
<image></image>
<text></text>
<facts>
<fact></fact>
<fact></fact>
<fact></fact>
</fact>
</card>
card は、すべての子要素にコンテンツを持つ各エンティティです。タイトルは /type/object/name です。テキストは、 によって行われたトピックの途中の画像です"https://usercontent.googleapis.com/freebase/v1/image"%s"\n", id
。テキストは、エンティティの /common/document/text です。ファクトとそのファクトの子は、年齢、生年月日、身長などのファクトであり、検索のナレッジ パネルに表示されるファクトです。
これは、Go ( Golang ) でこのように rdf を xml に解析しようとする私の試みです。誰かがこの形式で rdf を取得するのを手伝ってくれれば幸いです。
これが私がやろうとしていることのアルゴリズムまたはロジックです:
For every entity written in english:
parse the `type/object/name`property's and write that to the xml file in the `<title></title>` element.
parse the mid and add that to `https://usercontent.googleapis.com/freebase/v1/image`and then write the result to the xml file in the <image></image> element.
parse the common/document/text property and writes its value to the <text></text> element.
And lastly, for each fact about the entity, write them to the <fact></fact> elements in the XML file, which are all children of the <facts></facts> element.