![]() |
1
3
在您自己的命名空间中为它们分配唯一的标识符。如果你后来发现这个“华盛顿”和 http://dbpedia.org/resource/Washington,_D.C 或者别的什么,你可以加一个owl:sameAs to 断言。 |
![]() |
2
2
首先,您可以使用现有的良好服务进行实体识别,例如 OpenCalais , Zemanta 和 Alchemy 不过,更具体地说,是的,只需为每件事“造出”自己的URI(标识符),然后讨论它们——在turtle中为这些信息提供一个表示
|
![]() |
3
1
您可能需要了解Apache Stanbol是如何做到这一点的: http://stanbol.apache.org/docs/trunk/components/enhancer/enhancementstructure.html |
![]() |
4
0
您可以像上面讨论的那样创建自己的URI,也可以使用空白节点。两种方法各有利弊: URI有一个外部标识,因此您可以在将来的查询中显式引用您的概念,这可以使某些查询更简单;但是,它们有一个外部标识,因此用于构造URI的算法成为基础结构的关键部分,并且必须保证它们既稳定又唯一。这在一开始可能很琐碎,但当您开始处理在不同时间(通常是并行地)重新处理的多个文档时,在分布式系统上,它很快就不再是直接处理了。
在这两种情况下,尤其是当您使用空白节点时,无论如何都应该包含出处语句来描述它。
因此,使用空白节点的示例可能是: @prefix my: <http://yourdomain.com/2010/07/20/conceptmap#> . @prefix proc: <http://yourdomain.com/2010/07/20/processing#> . @prefix prg: <http://yourdomain.com/processors#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.example.org/> . @prefix dcterms: <http://purl.org/dc/terms/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix doc: <http://yourdomain.com/doc-path/> . _:1 rdf:type proc:ProcessRun ; proc:parser prg:tagger ; proc:version "1.0.2" ; proc:time "2010-07-03 20:35:45"^^<xsd:Timestamp> ; proc:host prg:hostname-of-processing-node ; proc:file doc:some-doc#line=1,;md5=md5_sum_goes_here,mime-charset_goes_here ; _:2 rdf:type foaf:Person ; foaf:name "John Smith"@en ; proc:identifiedBy _:1 ; proc:atLocation doc:some-doc#char=0,9 . _:3 rdf:type owl:Thing ; foaf:name "Washington"@en ; proc:identifiedBy _:1 ; proc:atLocation doc:some-doc#char=24,33 . <http://yourdomain.com/some-doc#this> rdf:type foaf:Document ; dcterms:references _:2, _:3 . 注意使用rfc5147文本/纯片段标识符来唯一地标识正在处理的文件,这为您提供了如何标识单个运行的灵活性。另一种方法是在文档根的URI中捕获所有这些内容,或者完全放弃出处。 @prefix : <http://yourdomain.com/ProcessRun/parser=tagger/version=1.0.2/time=2010-07-03+20:35:45/host=hostname-of-processing-node/file=http%3A%2F%2Fyourdomain.com%2Fdoc-path%2Fsome-doc%23line%3D1%2C%3Bmd5%3Dmd5_sum_goes_here%2Cmime-charset_goes_here/$gt; . @prefix my: <http://yourdomain.com/2010/07/20/conceptmap#> . @prefix proc: <http://yourdomain.com/2010/07/20/processing#> . @prefix prg: <http://yourdomain.com/processors#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix xsd: <http://www.example.org/> . @prefix dcterms: <http://purl.org/dc/terms/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix doc: <http://yourdomain.com/doc-path/some-doc#> . :1 rdf:type proc:ProcessRun ; proc:parser prg:tagger ; proc:version "1.0.2" ; proc:time "2010-07-03 20:35:45"^^<xsd:Timestamp> ; proc:host prg:hostname-of-processing-node ; proc:file doc:some-doc#line=1,;md5=md5_sum_goes_here,mime-charset_goes_here ; :2 rdf:type foaf:Person ; foaf:name "John Smith"@en ; proc:identifiedBy :1 ; proc:atLocation doc:some-doc#char=0,9 . :3 rdf:type owl:Thing ; foaf:name "Washington"@en ; proc:identifiedBy :1 ; proc:atLocation doc:some-doc#char=24,33 . <http://yourdomain.com/some-doc#this> rdf:type foaf:Document ; dcterms:references :2, :3 .
最终,如果我要在图中发布出处信息以及最终的统一实体,我会倾向于使用空白节点,并将URI分配给最终统一实体的概念。 然而,如果我不打算追踪推论的出处,而这只是管道中的一次传递,最终将丢弃中间结果,那么我只需要使用某种文档哈希、时间戳和id来创建uri,就可以了。 @prefix : <http://yourdomain.com/entities#> . @prefix my: <http://yourdomain.com/2010/07/20/conceptmap#> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix dcterms: <http://purl.org/dc/terms/> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . :filename_timestamp_1 rdf:type foaf:Person ; foaf:name "John Smith"@en . :filename_timestamp_2 rdf:type owl:Thing ; foaf:name "Washington"@en . <http://yourdomain.com/some-doc#this> rdf:type foaf:Document ; dcterms:references :2, :3 . |
![]() |
dimid · 如何创建本地Wikidata查询服务? 7 年前 |
![]() |
Sara Lafia · 来自Docker的Apache旱獭进口商 7 年前 |
|
Anjan Kaur · 如何在JSON-LD中表示备选方案集合 7 年前 |
![]() |
Richy · 将描述逻辑应用于模型 8 年前 |
|
Ibrahim A · 使用Jung移除RDF图形死区 9 年前 |