我尝试向(公共)RDF 数据集(wordnet)添加一些本体,特别是我需要区分LexicalEntries
动词和名词,分为两个子类。按照网络和 OWL 标准中的示例,我假设
:LexicalEntryNoun a owl:Class ;
rdfs:subClassOf
[ a owl:Restriction ;
owl:onProperty wn:part_of_speech ;
owl:hasValue wn:noun
] .
应该建立一个类LexicalEntryNoun
,但是查询(在jena fuseki中)
prefix : <http://gerastree.at/2017/litonto#>
SELECT *
WHERE {
?s a :LexicalEntryNoun.
}
给出一个空的结果。应该返回的两个 URI 都包含在由一个空白节点表示的类中,它代表限制,但不会像LexicalEntryNoun
其他查询中报告的那样报告。
我是 OWL 的新手,在海龟语法中找不到很多 OWL 的例子。我的错误在哪里?谢谢你的帮助!
我构建了一个非常小的数据子集,它与 OWL 推理器一起加载http://jena.hpl.hp.com/2003/OWLFBRuleReasoner
:
@prefix wn31: <http://wordnet-rdf.princeton.edu/wn31> .
@prefix lemon: <http://lemon-model.net/lemon#> .
@prefix nlp: <http://gerastree.at/nlp_2015#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix lit: <http://gerastree.at/lit_2014#> .
@prefix wn: <http://wordnet-rdf.princeton.edu/ontology#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ns: <http://www.example.org/ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://gerastree.at/2017/litonto#> .
<http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n>
a _:b0 , owl:Thing , rdfs:Resource , lemon:LexicalEntry ;
lemon:canonicalForm <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#CanonicalForm> ;
lemon:sense <http://www.lexvo.org/page/wordnet/30/noun/%27s_gravenhage_1_15_00> , <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n#1-n> ;
wn:part_of_speech wn:noun ;
owl:sameAs <http://wordnet-rdf.princeton.edu/wn31/%27s+Gravenhage-n> .
<http://wordnet-rdf.princeton.edu/wn31/%27hood-n>
a _:b0 , owl:Thing , rdfs:Resource , lemon:LexicalEntry ;
lemon:canonicalForm <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#CanonicalForm> ;
lemon:sense <http://www.lexvo.org/page/wordnet/30/noun/%27hood_1_15_00> , <http://wordnet-rdf.princeton.edu/wn31/%27hood-n#1-n> ;
wn:part_of_speech wn:noun ;
owl:sameAs <http://wordnet-rdf.princeton.edu/wn31/%27hood-n> .
:LexicalEntryNoun a owl:Class ;
rdfs:subClassOf
[ a owl:Restriction ;
owl:onProperty wn:part_of_speech ;
owl:hasValue wn:noun
] .