繁体   English   中英

为什么推理者推断这个类是这个类的子类

[英]Why the reasoner inferred that this class is a sub class of this class

这是我的第一个类Ratings2016 ,它是一个等效的类: Ratings 和比 2016 大的 createdOn 值。

<!-- http://semanticrecommender.com/rs#Ratings2016 -->

    <owl:Class rdf:about="http://semanticrecommender.com/rs#Ratings2016">
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://semanticrecommender.com/rs#Rates"/>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://semanticrecommender.com/rs#createdOn"/>
                        <owl:someValuesFrom>
                            <rdfs:Datatype>
                                <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
                                <owl:withRestrictions rdf:parseType="Collection">
                                    <rdf:Description>
                                        <xsd:minInclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2016-01-01T00:00:00</xsd:minInclusive>
                                    </rdf:Description>
                                </owl:withRestrictions>
                            </rdfs:Datatype>
                        </owl:someValuesFrom>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>

这是另一个类Ratings2015它相当于 Ratings 并且 createdOn 大于 2015

 <!-- http://semanticrecommender.com/rs#Ratings2015 -->

    <owl:Class rdf:about="http://semanticrecommender.com/rs#Ratings2015">
        <owl:equivalentClass>
            <owl:Class>
                <owl:intersectionOf rdf:parseType="Collection">
                    <rdf:Description rdf:about="http://semanticrecommender.com/rs#Rates"/>
                    <owl:Restriction>
                        <owl:onProperty rdf:resource="http://semanticrecommender.com/rs#createdOn"/>
                        <owl:someValuesFrom>
                            <rdfs:Datatype>
                                <owl:onDatatype rdf:resource="http://www.w3.org/2001/XMLSchema#dateTime"/>
                                <owl:withRestrictions rdf:parseType="Collection">
                                    <rdf:Description>
                                        <xsd:minInclusive rdf:datatype="http://www.w3.org/2001/XMLSchema#dateTime">2015-01-01T00:00:00</xsd:minInclusive>
                                    </rdf:Description>
                                </owl:withRestrictions>
                            </rdfs:Datatype>
                        </owl:someValuesFrom>
                    </owl:Restriction>
                </owl:intersectionOf>
            </owl:Class>
        </owl:equivalentClass>
    </owl:Class>

当我运行推理器时,推理器说 Ratings2016 是 Ratings 2015 的子类

图片

这是不正确的,为什么会这样以及如何解决?

原因是您使用xsd:minInclusive来指定创建日期。 但是,根据 XMLSchema, xsdminInclusive仅指定了可能值的下限。 因此,由于Ratings2016的创建日期大于Ratings2015的日期,因此它包含在为Ratings2015指定的值中(从 2015 年初开始且不终止),并且属于该类。

解决这个问题的一种方法当然取决于您的问题,但也许它也可能足以为您的评级声明xsd:maxInclusive值。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM