如何在 Protege 中添加匿名个人? [英] How can I add anonymous individuals in Protege?
问题描述
我想使用空白节点在 Protege 中添加一条语句.例如,如果我将其表示为 Turtle RDF,它将是 类似:
<预><代码>[rdf:type rdf:Statement ;#这个匿名资源是一个声明...rdf:subject ex:Paul ;#...与主题保罗rdf:predicate ex:running ;#...谓词运行rdf:object "10miles" ;#...和对象10英里"例如:hasPeriodStart "2018-04-09T10:00:00"^^xsd:dateTime ;例如:hasPeriodEnd "2018-04-09T12:00:00"^^xsd:dateTime ;].有没有办法在 Protege 中做类似的事情(不用创建具有 IRI 的命名个人)?
Protege 不支持空白节点.实现类似目标的一种方法是为空白节点分配一个临时/单独的命名空间.我会给你一个例子来说明我的意思.假设我有以下海龟语法(我省略了前缀以保持简短),
:jane :firstname "Jane";:lastname "Doe";:contactInfo [:phonenumber "011 739 4751";:email "janedoe@examples.com"] .
然后
[:phonenumber "011 739 4751";:电子邮件janedoe@examples.com"]
是一个空白节点.这可以使用空白节点 _:janeContactInfo
重写,如下所示:
:jane :firstname "Jane";:lastname "Doe";: 联系信息 _:janeContactInfo ._:janeContactInfo :phonenumber "011 739 4751";:电子邮件janedoe@examples.com".
这可以用曼彻斯特语法表示(这是 Protege 中使用的语法):
ObjectProperty:contactInfo数据属性:名字数据属性:姓氏数据属性:电话号码数据属性:电子邮件个人:简事实:例如:名字,简",例如:姓氏,母鹿",例如:contactInfo,_janeContactInfo个人:_janeContactInfo事实:例如:电话号码,011 739 4751"例如:电子邮件,janedoe@examples.com"
如果需要,您可以将 janeContactInfo
个人放在临时/单独的命名空间中.
I want to add a statement in Protege using a blank node. For example, if I expressed it as a Turtle RDF it would be something like:
[
rdf:type rdf:Statement ; #this anonymous resource is a Statement...
rdf:subject ex:Paul ; #...with subject Paul
rdf:predicate ex:running ; #...predicate running
rdf:object "10miles" ; #...and object "10miles"
ex:hasPeriodStart "2018-04-09T10:00:00"^^xsd:dateTime ;
ex:hasPeriodEnd "2018-04-09T12:00:00"^^xsd:dateTime ;
].
Is there a way of doing something similar in Protege (without creating a named individual with an IRI)?
Protege does not support blank nodes. One way to achieve something similar is assign a temporary/separate namespace for your blank nodes. I will give you an example of what I mean. Assume I have the following turtle syntax (I left prefixes out to keep this short),
:jane :firstname "Jane";
:lastname "Doe";
:contactInfo [:phonenumber "011 739 4751";
:email "janedoe@examples.com"] .
then
[:phonenumber "011 739 4751";
:email "janedoe@examples.com"]
is a blank node. This can be rewritten using a blank node _:janeContactInfo
as follows:
:jane :firstname "Jane";
:lastname "Doe";
: contactInfo _:janeContactInfo .
_:janeContactInfo :phonenumber "011 739 4751";
:email "janedoe@examples.com" .
This can be represented in Manchester syntax (this is the syntax used in Protege) as:
ObjectProperty: contactInfo
DataProperty: firstname
DataProperty: lastname
DataProperty: phonenumber
DataProperty: email
Individual: jane
Facts:
ex:firstname, "Jane",
ex:lastname, "Doe",
ex:contactInfo, _janeContactInfo
Individual: _janeContactInfo
Facts:
ex:phonenumber, "011 739 4751"
ex:email, "janedoe@examples.com"
The janeContactInfo
individual you can place in a temporary/separate namespace if you want.
这篇关于如何在 Protege 中添加匿名个人?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!