仅在门徒中使用关键字 returns 无

using keyword only in protege returns nothing

我有一个 class Movie,它有像 2515159 这样代表电影的实例,还有一个名为 Country 的 class,它有像英国、美国、意大利这样的实例、奥地利等国。我还有一个角色 hasCountry 匹配电影中的国家,例如:

2515159 hasCountry Italy
2515159 hasCountry Austria

(一部电影可以有多个国家)

现在问题: 我想创建一个名为 EuropeanMovieMovie 的子 class,其中包含只有欧洲国家/地区的个人实例。

在 protege 中创建名为 EuropeanMovie 的 Movie 的子class 之后,我尝试放置等同于:

Movie and hasCountry only {Austria,Italy, ...all the EU countries...}

也尝试过:

  Movie
   and hasCountry some (
          {Austria,Italy, ...all the EU countries...}
          and   not  {USA, and other non EU countries...} )

但是上面只使用关键字并没有return任何东西,而像开头的例子一样只有欧盟国家的电影。

经过大量搜索,我没有找到太多,但我认为这可能与 owl 的开放世界假设有关,但我不明白。

如果有人能提供任何建议,那将非常有帮助,谢谢!!!

Protégé 5.1.0 和 Pallet,我测试过:

Movie and hasCountry some ({Austria, Italy})

并且没有括号:

 Movie and hasCountry some {Austria, Italy}

以及我推荐的方法 - 将 EuropeanCountry 作为单独的 class:

:EuropeanMovie rdf:type owl:Class ;
     owl:equivalentClass [ owl:intersectionOf ( :Movie
           [ rdf:type owl:Restriction ;
                  owl:onProperty :hasCountry ;                                                                
                     owl:someValuesFrom [ rdf:type owl:Class ;                                                              
                        owl:oneOf ( :Austria :Italy ) ] ] ) ;
                                     rdf:type owl:Class] ;
               rdfs:subClassOf :Movie .

然后定义EuropeanMovie为:

Movie and hasCountry some EuropeanCountry

的确,这是开放世界假设 (OWA) 的结果。 OWA 意味着可能有其他知识未在 ontology 中描述(但不与之矛盾)。特别是,如果 ontology 包含

2515159 hasCountry Italy
2515159 hasCountry Austria

不代表电影中没有其他国家。它可能很容易

2515159 hasCountry USA

ontology 中未提及。这就是带有 only 的请求无法为您找到任何电影的原因。

为了得到 only 查询的正确答案,您必须修改 ontology 以确保影片中没有国家/地区,但 [=30= 中明确提到的国家除外].

例如,可以添加only语句来说明ontology中的知识是完整的。通过添加

{2515159} subClassOf hasCountry only {Italy, Austria}

可以保证电影中没有其他国家2515159.