【问题标题】:Add Restriction in Protege在 Protege 中添加限制
【发布时间】:2018-04-24 14:44:08
【问题描述】:

我想对特定类的个人可以通过对象属性获取的值添加限制。

例如,我有通过对象属性HasMeans 连接的类GPSMeans(包含实例SpoofingJammingSpeed_ChangeSign_Change):

GPS -----> HasMeans Means

我想确保GPS 类的任何实例只能连接到Means 类instancesJammingSpoofing 而不能连接到其他类。 如果我说GPS instance G1 HasMeans Speed_Change,我的目标是在运行推理器时将其归类为错误。

提前致谢!

【问题讨论】:

    标签: owl semantic-web protege restriction


    【解决方案1】:

    您需要以下 OWL2 功能:

    在 Protégé 中使用的Manchester Syntax 中:

    Prefix: : <https://stackoverflow.com/q/50004546/7879193#>
    
    Ontology: <https://stackoverflow.com/q/50004546/7879193>
    
    Class: GPS
        SubClassOf: hasMean only {jamming, spoofing}
    
    Class: Mean
    
    ObjectProperty: hasMean
        Domain: GPS
        Range: Mean
    
    Individual: gps1
        Types: GPS
        Facts: hasMean jamming, hasMean spoofing
    
    Individual: gps2
        Types: GPS
        Facts: hasMean spoofing, hasMean speed_change
    
    DifferentIndividuals: 
        jamming, spoofing, speed_change
    
    Individual: jamming
        Types: Mean 
    
    Individual: spoofing
       Types: Mean
    
    Individual: speed_change
       Types:  Mean
    

    这就是不一致解释的样子:

    【讨论】:

    • 再次您好,感谢您的回答。我在类表达式编辑器中只放了 HasMeans {Jamming}。但是,问题仍然存在,当我尝试添加 gps1 hasMeans speed_change 的事实时,我想要 Protege 推理器给我一个错误。但事实并非如此,它只是将限制添加到事实中,就像 hasValue 限制一样。
    • @ArunaMaulik,您是否添加了 DifferentIndividuals 公理(编辑 > 让所有人都与众不同)?
    • @StanislavKralin 是的,我做到了。我刚刚重新启动 Protege 以确保一切正常并且工作正常!不是第一次重新启动 protege 有帮助..再次感谢!
    • @ArunavaMaulik 下次您应该“同步推理器”,而不是重新启动。更改本体后,您总是必须这样做,以强制推理器重新计算推理。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-07-27
    • 2023-03-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多