maps:mapstoclass
現在、以下のトリプルに基づいて新しいプロパティを推測しようとしています。アイデアは、推論された結果を (data:classes のアライメントを含む rdf ファイルと一緒に) 使用して、 で指定されたdata0:object100
からの とそのオーバーラップ オブジェクトとの間の類似性を判断できるというものです。data1:
maps:hasOverlap
maps:relation_obj1 a maps:OverlapRelations ;
maps:hasOverlap [ a data1:classA ;
maps:mainRelativeArea "80.0"^^xsd:float ;
maps:secRelativeArea "100.0"^^xsd:float ;
maps:secfeature data1:object1 ;
] ;
maps:hasOverlap [ a data1:classX ;
maps:mainRelativeArea "40.0"^^xsd:float ;
maps:secRelativeArea "100.0"^^xsd:float ;
maps:secfeature data1:object2 ;
] ;
maps:mainfeature data0:object100 ;
maps:mainclass data0:classB .
最初に、オブジェクトのプロパティがmaps:hasOverlap
満たされているかどうかを確認しましたqualifiedValueShape
(shacl 形状/ルールは最後に示されています)。この場合、maps:secfeature data1:object1 を持つ「hasOverlap」オブジェクトのみが条件を満たします。したがって、「maps:mapsto」のオブジェクトは data1:object1 である必要があります。私が期待する結果は次のとおりです。
maps:relation_obj1 maps:mapstoclass data1:object1.
ただし、現在取得しています:
maps:relation_obj1 maps:mapstoclass data1:object1, data1:object2.
私は何を間違っていますか?ルールの sh:condition は、sh:object 内で明示的に適用する必要がありますか? 私はノード式を見てきましたが、それを使用することに成功しませんでした - ドキュメントに適用可能な例を見つけることができませんでした.
使用される形状:
ex:mainAreaShape
rdf:type sh:NodeShape;
sh:property [
sh:path maps:mainRelativeArea ;
sh:minInclusive 80 ;
].
ex:secAreaShape
rdf:type sh:NodeShape;
sh:property [
sh:path maps:secRelativeArea ;
sh:minInclusive 80 ;
].
ex:OverlapRelations
rdf:type rdfs:Class, sh:NodeShape ;
sh:targetClass maps:OverlapRelations;
rdfs:label "whether overlap between features is enough to generate relation" ;
sh:rule [
rdf:type sh:TripleRule ;
sh:subject sh:this ;
sh:predicate maps:mapstoclass;
sh:object [sh:path (maps:hasOverlap
rdf:type) ;
];
sh:condition ex:OverlapRelations;
sh:condition [
sh:property [
sh:path maps:hasOverlap ;
sh:nodeKind sh:BlankNode ;
sh:minCount 1;
sh:qualifiedValueShape [
sh:and (ex:mainAreaShape ex:secAreaShape);
];
sh:qualifiedMinCount 1;
sh:qualifiedMaxCount 1;
];
];
].