以文本方式查看主题

-  W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  求助!关于pellet使用的问题。。。。。。。。。。。。。。。。  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=83637)


--  作者:jackws66
--  发布时间:2/27/2010 4:38:00 PM

--  求助!关于pellet使用的问题。。。。。。。。。。。。。。。。
各位大侠!小弟菜鸟,有一事不明:
在owl文件中出现:

<owl:Class rdf:ID="aaa">
<rdfs:subClassOf>
      <owl:Restriction>
        ...
       </owl:Restriction>
...

我在使用pellet推理aaa的子类时,却得不到Restriction的对象呢??
想使用别的jena推理机,可是速度太太太慢了。。。。



--  作者:jackws66
--  发布时间:2/28/2010 10:25:00 AM

--  
自己顶!哪位大哥帮着解答一下啊。。。
--  作者:jackws66
--  发布时间:3/1/2010 12:56:00 PM

--  
看到pellet关于限制的官方说明:
There is one fundamental difference between Pellet reasoner implementation in Jena and other existing Jena reasoners. Pellet treats the anonymous restrictions defined in an OWL ontology as syntactic expressions and do not return them as answers to any query. Consider the following example:
  Class(<a:Person> partial restriction(<a:hasAddress> someValuesFrom(<a:Address>))
  Class(<a:Student> partial <a:Person>))
  ObjectProperty(a:hasAddress Functional)

If this ontology is loaded in an OntModel backed by Pellet calling Student.listSuperClasses() would not include the restriction in the result. There are several reasons for this behavior: Treating each restriction as a named class would make it harder to reason with the ontology and the results you get in the end is not that useful. For example, in the above example, the reasoner can also return restriction(<a:hasAddress> minCardinality(1)) or restriction(<a:hasAddress> maxCardinality(1)) or restriction(<a:hasAddress> allValuesFrom(<a:Address>))  as a super class because they are all entailed by the above definition. Once class expression are considered, there are infinitely many possibilities, e.g. maxCardinality(1) implies maxCardinality(2) and so on. For this reason, Pellet will not return a restriction in an answer just because they physically exists in the ontology. However, one needs to get the syntactic definitions in the ontology and all the results Pellet returns are concatenated by the answers from the raw model. This means calling Person.listSuperClasses() for the above example would include the restriction in the results.

Note that, all the boolean functions would still work as expected. For example, asking the question like Student.hasSuperClass( restriction ) where restriction is the anonymous resource corresponding to the someValuesFrom restriction, Pellet will return true.

问题是:我确实是用类似于Person.listSuperClasses()的方法,还是得不到限制匿名类,这是怎么一回事啊???? 哪位大哥知道啊,是不是我哪理解错了啊?


--  作者:laotao
--  发布时间:3/1/2010 2:43:00 PM

--  
你要的到底是父类还是子类?
--  作者:jackws66
--  发布时间:3/1/2010 3:11:00 PM

--  
回4楼: 是父类。。 一楼写错了。。
--  作者:fanwander
--  发布时间:3/2/2010 4:18:00 PM

--  
楼主,我最近也遇到了和你差不多的问题,我想得到指定类所具有的所有Restriction(即:约束),但是一直没有找到相关实现方法~楼主能否指点一二~~谢谢!
--  作者:jackws66
--  发布时间:3/4/2010 11:12:00 PM

--  
回楼上
情况是这样的:
那段英文说明应经说的很清楚了,pellet是支持Person.listSuperClasses()这种情况的,可以得到限制属性,但我用到的是Person.listSuperClasses(true),求它的直接父类,发现pellet并不能支持这种情况。所以我决定改用jena推理此处
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
62.500ms