使用F#的基本.NET集合类实现内存中的语义web三元组存储的有效方法是什么?
是否有任何F#示例或项目已经在这样做了?
发布于 2009-09-28 10:57:35
还有SemWeb,这是一个C#库,它提供了自己的基于SQL三重存储- http://razor.occams.info/code/semweb/
我正在为RDF开发一个名为dotNetRDF的新C#库,并且刚刚发布了最新的Alpha http://www.dotnetrdf.org。
这是一个与spoon16展示的程序等效的程序:
open System
open VDS.RDF
open VDS.RDF.Parsing
open VDS.RDF.Query
//Get a Graph and fill it from a file
let g = new Graph()
let parser = new TurtleParser()
parser.Load(g, "test.ttl")
//Place into a Triple Store and query
let store = new TripleStore()
store.Load(g)
let results = store.ExecuteQuery("SELECT ?s ?p ?o WHERE {?s ?p ?o} LIMIT 10") :?> SparqlResultSet
//Output the results
Console.WriteLine(results.Count.ToString() ^ " Results")
for result in results.Results do
Console.WriteLine(result.ToString())
done
//Wait for user to hit enter so they can see the results
Console.ReadLine() |> ignore我的图书馆目前支持我自己的SQL数据库、AllegroGraph、4store、Joseki、Sesame、Talis和Virtuoso作为后备存储。
https://stackoverflow.com/questions/1386406
复制相似问题