如何分析並將由表示法3文件表示的三元數據加載到數據庫中?我有點熟悉Jena和Sesame,但這些似乎適合處理RDF或烏龜,而不是完整的Notation3。將表示法3加載到數據庫中
我發現處理N3的強大工具相對較少。我發現的少數列出了here,並且只包含粗略的Python腳本,它們只能執行基本的命令行操作,並且似乎沒有標準的打包,分發或維護。默認的Python庫似乎是notation3.py
,但是我找不到它的一個主頁,並且發現分散在互聯網上的幾十個不同的版本。
例如,假設我有以下N3代表植物學分類:
{
[]
:genus "Abies" ;
:species "alba" ;
:name [:value "Silver Fir" ; :usage "common" ; :language "English" ] ;
:name [:value "European Silver Fir" ; :usage "common" ; :language "English" ] ;
:name [:value "abeto blanco" ; :usage "common" ; :language "Spanish" ] ;
:name [:value "abeto plateado" ; :usage "common" ; :language "Spanish" ] ;
:name [:value "Edeltanne" ; :usage "common" ; :language "German" ] ;
:name [:value "Silbertanne" ; :usage "common" ; :language "German" ] ;
:name [:value "Weißtanne" ; :usage "common" ; :language "German" ] ;
:stem!:type :erect ;
:stem!:height [ :value!:start 30.0 ; :value!:end 50.0 ; :value!:units "m" ] ;
:bark!:color :grey ;
:bark!:ridges :irregular ;
:foliage!:seasonality :evergreen ;
:foliage!:type :needle ;
:foliage!:arrangement :alternate ;
:foliage!:length [ :value!:start 1.0 ; :value!:end 3.0 ; :value!:units "cm" ] ;
:foliage!:width [ :value!:start 0.2 ; :value!:end 0.3 ; :value!:units "cm" ] ;
:foliage!:color :green ;
:foliage!:spiney :FALSE ;
:flower [ :gender :male ; :inflorescence :catkin ; :sense :straight ; :color :brown ] ;
:flower [ :gender :male ; :inflorescence :catkin ; :sense :straight ; :color :yellow ] ;
:flower [ :gender :female ; :inflorescence :catkin ; :sense :straight ; :color :pink ] ;
:fruit [ :kind :cone ; :color :brown ; ] ;
}
:is-a :botanical-classification ;
:source [
:uri <http://originating/site> ;
:name "John Doe" ;
:data-collection-date "2005-01-01" ;
] ;
:transcribed-by "Al Nonymous" ;
:transcription-date "2010-09-01" .
我希望能夠到這一點(和潛在的數以千計的類似記錄)加載到數據庫中,所以我可以運行任意查詢例如,「誰在2010年錄製了包含常見西班牙文名稱的記錄?」或「與X屬相關的平均花色是多少?」
這是目前實用與當前的語義網絡工具和N3嗎?