簡體   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