Skip to content
Snippets Groups Projects
Commit 38794edb authored by Aurélien Lamercerie's avatar Aurélien Lamercerie
Browse files

Generic CTS to create mod list nets

parent 002d116f
No related branches found
No related tags found
No related merge requests found
...@@ -30,11 +30,6 @@ net:Type ...@@ -30,11 +30,6 @@ net:Type
rdfs:label "Semantic Net Type" ; rdfs:label "Semantic Net Type" ;
rdfs:subClassOf net:Structure ; rdfs:subClassOf net:Structure ;
. .
net:abstraction
rdf:type owl:Class ;
rdfs:label "abstraction" ;
rdfs:subClassOf net:Type ;
.
net:abstractionClass net:abstractionClass
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "abstraction class" ; rdfs:label "abstraction class" ;
...@@ -48,7 +43,7 @@ net:atom ...@@ -48,7 +43,7 @@ net:atom
net:atomOf net:atomOf
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "atom of" ; rdfs:label "atom of" ;
rdfs:subPropertyOf net:type ; rdfs:subPropertyOf net:typeProperty ;
. .
net:atomType net:atomType
rdf:type rdf:Property ; rdf:type rdf:Property ;
...@@ -70,20 +65,20 @@ net:class_list ...@@ -70,20 +65,20 @@ net:class_list
rdfs:label "classList" ; rdfs:label "classList" ;
rdfs:subClassOf net:Type ; rdfs:subClassOf net:Type ;
. .
net:complement net:composite
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:label "complement" ; rdfs:label "composite" ;
rdfs:subClassOf net:Type ; rdfs:subClassOf net:Type ;
. .
net:complement_mod_list net:conjunctive_list
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:label "complement mod list" ; rdfs:label "conjunctive-list" ;
rdfs:subClassOf net:mod_list ; rdfs:subClassOf net:list ;
. .
net:entity net:disjunctive_list
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:label "entity" ; rdfs:label "disjunctive-list" ;
rdfs:subClassOf net:Type ; rdfs:subClassOf net:list ;
. .
net:entityClass net:entityClass
rdf:type rdf:Property ; rdf:type rdf:Property ;
...@@ -95,21 +90,11 @@ net:entity_class_list ...@@ -95,21 +90,11 @@ net:entity_class_list
rdfs:label "entityClassList" ; rdfs:label "entityClassList" ;
rdfs:subClassOf net:class_list ; rdfs:subClassOf net:class_list ;
. .
net:entity_mod_list
rdf:type owl:Class ;
rdfs:label "entity mod list" ;
rdfs:subClassOf net:mod_list ;
.
net:event net:event
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:label "event" ; rdfs:label "event" ;
rdfs:subClassOf net:Type ; rdfs:subClassOf net:Type ;
. .
net:feature
rdf:type owl:Class ;
rdfs:label "feature" ;
rdfs:subClassOf net:Type ;
.
net:featureClass net:featureClass
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "feature class" ; rdfs:label "feature class" ;
...@@ -118,7 +103,7 @@ net:featureClass ...@@ -118,7 +103,7 @@ net:featureClass
net:has_actor net:has_actor
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "has actor" ; rdfs:label "has actor" ;
rdfs:subPropertyOf net:has_object ; rdfs:subPropertyOf net:has_atom ;
. .
net:has_atom net:has_atom
rdf:type rdf:Property ; rdf:type rdf:Property ;
...@@ -158,12 +143,12 @@ net:has_mother_class ...@@ -158,12 +143,12 @@ net:has_mother_class
net:has_node net:has_node
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "UNL Node" ; rdfs:label "UNL Node" ;
rdfs:subPropertyOf net:property ; rdfs:subPropertyOf net:netProperty ;
. .
net:has_object net:has_object
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "relation" ; rdfs:label "relation" ;
rdfs:subPropertyOf net:property ; rdfs:subPropertyOf net:netProperty ;
. .
net:has_parent_class net:has_parent_class
rdf:type rdf:Property ; rdf:type rdf:Property ;
...@@ -183,7 +168,7 @@ net:has_possible_range ...@@ -183,7 +168,7 @@ net:has_possible_range
net:has_structure net:has_structure
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "Linguistic Structure (in UNL Document)" ; rdfs:label "Linguistic Structure (in UNL Document)" ;
rdfs:subPropertyOf net:property ; rdfs:subPropertyOf net:netProperty ;
. .
net:has_subClass net:has_subClass
rdf:type rdf:Property ; rdf:type rdf:Property ;
...@@ -193,23 +178,38 @@ net:has_subClass ...@@ -193,23 +178,38 @@ net:has_subClass
net:has_target net:has_target
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "has target" ; rdfs:label "has target" ;
rdfs:subPropertyOf net:has_object ; rdfs:subPropertyOf net:has_atom ;
. .
net:has_verb net:has_verb
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "has verb" ; rdfs:label "has verb" ;
rdfs:subPropertyOf net:has_object ; rdfs:subPropertyOf net:has_atom ;
. .
net:instanceUri net:instanceUri
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "instance uri" ; rdfs:label "instance uri" ;
rdfs:subPropertyOf net:objectValue ; rdfs:subPropertyOf net:objectValue ;
. .
net:list
rdf:type owl:Class ;
rdfs:label "list" ;
rdfs:subClassOf net:Type ;
.
net:listBy
rdf:type rdf:Property ;
rdfs:label "list by" ;
rdfs:subPropertyOf net:typeProperty ;
.
net:listGuiding net:listGuiding
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "Guiding connector of a list (or, and)" ; rdfs:label "Guiding connector of a list (or, and)" ;
rdfs:subPropertyOf net:objectValue ; rdfs:subPropertyOf net:objectValue ;
. .
net:listOf
rdf:type rdf:Property ;
rdfs:label "list of" ;
rdfs:subPropertyOf net:typeProperty ;
.
net:modCat1 net:modCat1
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "Modality Category (level 1)" ; rdfs:label "Modality Category (level 1)" ;
...@@ -220,34 +220,29 @@ net:modCat2 ...@@ -220,34 +220,29 @@ net:modCat2
rdfs:label "Modality Category (level 2)" ; rdfs:label "Modality Category (level 2)" ;
rdfs:subPropertyOf net:objectValue ; rdfs:subPropertyOf net:objectValue ;
. .
net:mod_list net:netProperty
rdf:type owl:Class ; rdf:type rdf:Property ;
rdfs:label "modList" ; rdfs:label "netProperty" ;
rdfs:subClassOf net:Type ;
. .
net:objectAttribute net:objectProperty
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "object attribute" ; rdfs:label "object attribute" ;
. .
net:objectType net:objectType
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "object type" ; rdfs:label "object type" ;
rdfs:subPropertyOf net:objectAttribute ; rdfs:subPropertyOf net:objectProperty ;
. .
net:objectValue net:objectValue
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "valuations"@fr ; rdfs:label "valuations"@fr ;
rdfs:subPropertyOf net:objectAttribute ; rdfs:subPropertyOf net:objectProperty ;
. .
net:parentClassUri net:parentClassUri
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "parent class uri" ; rdfs:label "parent class uri" ;
rdfs:subPropertyOf net:objectValue ; rdfs:subPropertyOf net:objectValue ;
. .
net:property
rdf:type rdf:Property ;
rdfs:label "netProperty" ;
.
net:state_property net:state_property
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:label "stateProperty" ; rdfs:label "stateProperty" ;
...@@ -256,12 +251,16 @@ net:state_property ...@@ -256,12 +251,16 @@ net:state_property
net:type net:type
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "type "@fr ; rdfs:label "type "@fr ;
rdfs:subPropertyOf net:property ; rdfs:subPropertyOf net:netProperty ;
. .
net:verb net:typeProperty
rdf:type rdf:Property ;
rdfs:label "type property" ;
.
net:unary_list
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:label "verb" ; rdfs:label "unary-list" ;
rdfs:subClassOf net:Type ; rdfs:subClassOf net:list ;
. .
net:verbClass net:verbClass
rdf:type rdf:Property ; rdf:type rdf:Property ;
......
...@@ -388,25 +388,26 @@ cts:batch_execution ...@@ -388,25 +388,26 @@ cts:batch_execution
sh:rule cts:complement-list-of-entity-classes ; sh:rule cts:complement-list-of-entity-classes ;
sh:rule cts:compose-agt-verb-obj-as-simple-event ; sh:rule cts:compose-agt-verb-obj-as-simple-event ;
sh:rule cts:compose-aoj-verb-obj-as-simple-state-property ; sh:rule cts:compose-aoj-verb-obj-as-simple-state-property ;
sh:rule cts:compose-entity-modlist-1 ; sh:rule cts:compose-atom-with-list-1 ;
sh:rule cts:compose-entity-modlist-2 ; sh:rule cts:compose-atom-with-list-2 ;
sh:rule cts:compose-entity-modlist-3 ;
sh:rule cts:compute-class-uri-of-net-object ; sh:rule cts:compute-class-uri-of-net-object ;
sh:rule cts:compute-domain-range-of-event-object-properties ; sh:rule cts:compute-domain-range-of-event-object-properties ;
sh:rule cts:compute-domain-range-of-state-property-object-properties ; sh:rule cts:compute-domain-range-of-state-property-object-properties ;
sh:rule cts:compute-instance-uri-of-net-object ; sh:rule cts:compute-instance-uri-of-net-object ;
sh:rule cts:create-atom-net ; sh:rule cts:create-atom-net ;
sh:rule cts:create-unary-list-net ;
sh:rule cts:define-uw-id ; sh:rule cts:define-uw-id ;
sh:rule cts:extend-mod-list ; sh:rule cts:extend-list-net ;
sh:rule cts:generate-atom-class ; sh:rule cts:generate-atom-class ;
sh:rule cts:generate-atom-instance ; sh:rule cts:generate-atom-instance ;
sh:rule cts:init-mod-list ; sh:rule cts:init-conjunctive-list-net ;
sh:rule cts:init-disjunctive-list-net ;
sh:rule cts:instantiate-atom-net ; sh:rule cts:instantiate-atom-net ;
sh:rule cts:instantiate-classlist-by-extension-1 ; sh:rule cts:instantiate-classlist-by-extension-1 ;
sh:rule cts:instantiate-classlist-by-extension-2 ; sh:rule cts:instantiate-classlist-by-extension-2 ;
sh:rule cts:link-to-scope-entry ; sh:rule cts:link-to-scope-entry ;
sh:rule cts:typify-modlist-entity ; sh:rule cts:specify-axis-of-list-net ;
sh:rule cts:typify-modlist-feature ; sh:rule cts:specify-items-of-list-net ;
. .
cts:batch_execution_1 cts:batch_execution_1
rdf:type cts:batch_execution ; rdf:type cts:batch_execution ;
...@@ -550,7 +551,7 @@ WHERE { ...@@ -550,7 +551,7 @@ WHERE {
BIND (concat(?n1, ?uw1Id, '-', ?uw2Id, '-', ?uw3Id) AS ?n2). BIND (concat(?n1, ?uw1Id, '-', ?uw2Id, '-', ?uw3Id) AS ?n2).
BIND (uri(?n2) AS ?newNet). BIND (uri(?n2) AS ?newNet).
}""" ; }""" ;
sh:order 2.9 ; sh:order 2.41 ;
. .
cts:compose-aoj-verb-obj-as-simple-state-property cts:compose-aoj-verb-obj-as-simple-state-property
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -622,9 +623,9 @@ WHERE { ...@@ -622,9 +623,9 @@ WHERE {
BIND (concat(?n1, ?uw1Id, '-', ?uw2Id, '-', ?uw3Id) AS ?n2). BIND (concat(?n1, ?uw1Id, '-', ?uw2Id, '-', ?uw3Id) AS ?n2).
BIND (uri(?n2) AS ?newNet). BIND (uri(?n2) AS ?newNet).
}""" ; }""" ;
sh:order 2.9 ; sh:order 2.41 ;
. .
cts:compose-entity-modlist-1 cts:compose-atom-with-list-1
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
...@@ -637,136 +638,25 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#> ...@@ -637,136 +638,25 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/> PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Compose an Entity net and a Complement ModList net # -- Compose an atom net and a list net (with distinct item classes)
CONSTRUCT { CONSTRUCT {
# Object: feature 2 # Object: feature 2
?newFeature2 a net:Object. ?newFeature2 a net:Object.
?newFeature2 net:objectType \"Feature\". ?newFeature2 net:objectType \"Feature\".
?newFeature2 net:has_node ?uw2. ?newFeature2 net:has_node ?uw2.
?newFeature2 net:has_parent_class ?featureClass. ?newFeature2 net:has_parent_class ?listItemClass.
?newFeature2 net:has_concept ?concept2. ?newFeature2 net:has_concept ?concept2.
# Object: feature 3 # Object: feature 3
?newFeature3 a net:Object. ?newFeature3 a net:Object.
?newFeature3 net:objectType \"Feature\". ?newFeature3 net:objectType \"Feature\".
?newFeature3 net:has_node ?uw3. ?newFeature3 net:has_node ?uw3.
?newFeature3 net:has_parent_class ?featureClass. ?newFeature3 net:has_parent_class ?listItemClass.
?newFeature3 net:has_concept ?concept3. ?newFeature3 net:has_concept ?concept3.
# Object: entity 2 # Object: entity 2
?newEntity2 a net:Object. ?newEntity2 a net:Object.
?newEntity2 net:objectType \"Entity\". ?newEntity2 net:objectType \"Entity\".
?newEntity2 net:has_node ?uw2. ?newEntity2 net:has_node ?uw2.
?newEntity2 net:has_parent_class ?entityClass. ?newEntity2 net:has_parent_class ?listItemClass.
?newEntity2 net:has_concept ?subEntity2.
?newEntity2 net:has_feature ?newFeature2.
# Object: entity 3
?newEntity3 a net:Object.
?newEntity3 net:objectType \"Entity\".
?newEntity3 net:has_node ?uw3.
?newEntity3 net:has_parent_class ?entityClass.
?newEntity3 net:has_concept ?subEntity3.
?newEntity3 net:has_feature ?newFeature3.
# Net: Entity ClassList
?newNet a net:Instance.
?newNet net:type net:entity_class_list.
?newNet net:has_structure ?req.
?newNet net:has_node ?uw1, ?uw2, ?uw3.
?newNet net:entityClass ?entityClass.
?newNet net:has_mainClass ?atomObject1.
?newNet net:has_subClass ?newEntity2, ?newEntity3.
?newNet net:has_feature ?newFeature2, ?newFeature3.
}
WHERE {
# net1: entity
?net1 a net:Instance.
?net1 net:type net:atom.
?net1 net:atomOf sys:Entity.
?net1 net:has_structure ?req.
?net1 net:has_node ?uw1.
?net1 net:has_atom ?atomObject1.
?atomObject1 net:has_parent_class ?entityClass.
?atomObject1 net:has_concept ?mainEntity.
# condition: mod(net1, net2)
?uw1 unl:mod ?uw2.
# net2: complement modList
?net2 a net:Instance.
?net2 net:type net:complement_mod_list.
?net2 net:has_structure ?req.
?net2 net:has_node ?uw2, ?uw3.
?net2 net:modCat2 ?featureClass.
# --old --- ?net2 net:concept ?subConcept.
# Filter
FILTER ( ?uw1 != ?uw3 ).
# UW: type UW-Occurrence and substructure of req sentence
# --old --- ?uw1 rdf:type unl:UW_Occurrence.
# --old --- ?uw2 rdf:type unl:UW_Occurrence.
# --old --- ?uw3 rdf:type unl:UW_Occurrence.
# --old --- ?uw1 unl:is_substructure_of ?req.
# --old --- ?uw2 unl:is_substructure_of ?req.
# --old --- ?uw3 unl:is_substructure_of ?req.
# Label: Id, concept, subEntity
?uw1 unl:has_id ?uw1Id.
?uw2 unl:has_id ?uw2Id.
?uw3 unl:has_id ?uw3Id.
?uw2 rdfs:label ?uw2Label.
?uw3 rdfs:label ?uw3Label.
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2).
BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3).
# URI (for Feature Object)
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:objectRef ?objectRef.
BIND (concat( ?netURI, ?objectRef) AS ?o1).
BIND (concat(?o1, ?uw2Id) AS ?f2).
BIND (concat(?o1, ?uw3Id) AS ?f3).
BIND (uri(?f2) AS ?newFeature2).
BIND (uri(?f3) AS ?newFeature3).
# URI (for Entity Object)
BIND (concat(?f2, '_', ?subEntity2) AS ?e2).
BIND (concat(?f3, '_', ?subEntity3) AS ?e3).
BIND (uri(?e2) AS ?newEntity2).
BIND (uri(?e3) AS ?newEntity3).
# URI (for ClassList Net)
cprm:Config_Parameters cprm:netURI ?netURI.
net:class_list rdfs:label ?classListLabel.
BIND (concat( ?netURI, ?classListLabel, '_') AS ?n1).
BIND (concat(?n1, ?uw1Id, '-', ?uw2Id) AS ?n2).
BIND (uri(?n2) AS ?newNet).
}""" ;
sh:order 2.6 ;
.
cts:compose-entity-modlist-2
rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX unl: <https://unl.tetras-libre.fr/rdf/schema#>
PREFIX net: <https://unsel.tetras-libre.fr/tenet/semantic-net#>
PREFIX cprm: <https://unsel.tetras-libre.fr/tenet/config/parameters#>
PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Compose an Entity net and an Entity ModList net (with distinct entity classes)
CONSTRUCT {
# Object: feature 2
?newFeature2 a net:Object.
?newFeature2 net:objectType \"Feature\".
?newFeature2 net:has_node ?uw2.
?newFeature2 net:has_parent_class ?entityClass2.
?newFeature2 net:has_concept ?concept2.
# Object: feature 3
?newFeature3 a net:Object.
?newFeature3 net:objectType \"Feature\".
?newFeature3 net:has_node ?uw3.
?newFeature3 net:has_parent_class ?entityClass2.
?newFeature3 net:has_concept ?concept3.
# Object: entity 2
?newEntity2 a net:Object.
?newEntity2 net:objectType \"Entity\".
?newEntity2 net:has_node ?uw2.
?newEntity2 net:has_parent_class ?entityClass2.
?newEntity2 net:has_concept ?subEntity2. ?newEntity2 net:has_concept ?subEntity2.
?newEntity2 net:has_feature ?newFeature2. ?newEntity2 net:has_feature ?newFeature2.
# Object: entity 3 # Object: entity 3
...@@ -781,7 +671,7 @@ CONSTRUCT { ...@@ -781,7 +671,7 @@ CONSTRUCT {
?newNet net:type net:entity_class_list. ?newNet net:type net:entity_class_list.
?newNet net:has_structure ?req. ?newNet net:has_structure ?req.
?newNet net:has_node ?uw1, ?uw2, ?uw3. ?newNet net:has_node ?uw1, ?uw2, ?uw3.
?newNet net:entityClass ?entityClass1. ?newNet net:entityClass ?atomParentClass.
?newNet net:has_mainClass ?atomObject1. ?newNet net:has_mainClass ?atomObject1.
?newNet net:has_subClass ?newEntity2, ?newEntity3. ?newNet net:has_subClass ?newEntity2, ?newEntity3.
?newNet net:has_feature ?newFeature2, ?newFeature3. ?newNet net:has_feature ?newFeature2, ?newFeature3.
...@@ -794,27 +684,19 @@ WHERE { ...@@ -794,27 +684,19 @@ WHERE {
?net1 net:has_structure ?req. ?net1 net:has_structure ?req.
?net1 net:has_node ?uw1. ?net1 net:has_node ?uw1.
?net1 net:has_atom ?atomObject1. ?net1 net:has_atom ?atomObject1.
?atomObject1 net:has_parent_class ?entityClass1. ?atomObject1 net:has_parent_class ?atomParentClass.
?atomObject1 net:has_concept ?mainEntity. ?atomObject1 net:has_concept ?mainEntity.
# condition: mod(net1, net2) # condition: mod(net1, net2)
?uw1 unl:mod ?uw2. ?uw1 unl:mod ?uw2.
# net2: entity modList # net2: entity modList
?net2 a net:Instance. ?net2 a net:Instance.
?net2 net:type net:entity_mod_list. ?net2 net:type net:list.
?net2 net:modCat1 fprm:System_Entity. ?net2 net:listOf ?listItemClass.
?net2 net:modCat2 ?entityClass2.
?net2 net:has_structure ?req. ?net2 net:has_structure ?req.
?net2 net:has_node ?uw2, ?uw3. ?net2 net:has_node ?uw2, ?uw3.
# Filter # Filter
FILTER ( ?uw1 != ?uw3 ). FILTER ( ?uw1 != ?uw3 ).
FILTER ( ?entityClass1 != ?entityClass2 ). FILTER ( ?atomParentClass != ?listItemClass ).
# UW: type UW-Occurrence and substructure of req sentence
# --old --- ?uw1 rdf:type unl:UW_Occurrence.
# --old --- ?uw2 rdf:type unl:UW_Occurrence.
# --old --- ?uw3 rdf:type unl:UW_Occurrence.
# --old --- ?uw1 unl:is_substructure_of ?req.
# --old --- ?uw2 unl:is_substructure_of ?req.
# --old --- ?uw3 unl:is_substructure_of ?req.
# Label: Id, concept, subEntity # Label: Id, concept, subEntity
?uw1 unl:has_id ?uw1Id. ?uw1 unl:has_id ?uw1Id.
?uw2 unl:has_id ?uw2Id. ?uw2 unl:has_id ?uw2Id.
...@@ -845,9 +727,9 @@ WHERE { ...@@ -845,9 +727,9 @@ WHERE {
BIND (concat(?n1, ?uw1Id, '-', ?uw2Id) AS ?n2). BIND (concat(?n1, ?uw1Id, '-', ?uw2Id) AS ?n2).
BIND (uri(?n2) AS ?newNet). BIND (uri(?n2) AS ?newNet).
}""" ; }""" ;
sh:order 2.6 ; sh:order 2.32 ;
. .
cts:compose-entity-modlist-3 cts:compose-atom-with-list-2
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
...@@ -860,58 +742,50 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#> ...@@ -860,58 +742,50 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/> PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Compose an Entity net and an Entity ModList net (with same entity classes) # -- Compose an atom net and an list net (with same item classes)
CONSTRUCT { CONSTRUCT {
# Object: entity 2 # Object: entity 2
?newEntity2 a net:Object. ?newEntity2 a net:Object.
?newEntity2 net:objectType \"Entity\". ?newEntity2 net:objectType \"Entity\".
?newEntity2 net:has_node ?uw2. ?newEntity2 net:has_node ?uw2.
?newEntity2 net:has_parent_class ?entityClass2. ?newEntity2 net:has_parent_class ?listItemClass.
?newEntity2 net:has_concept ?subEntity2. ?newEntity2 net:has_concept ?subEntity2.
# Object: entity 3 # Object: entity 3
?newEntity3 a net:Object. ?newEntity3 a net:Object.
?newEntity3 net:objectType \"Entity\". ?newEntity3 net:objectType \"Entity\".
?newEntity3 net:has_node ?uw3. ?newEntity3 net:has_node ?uw3.
?newEntity3 net:has_parent_class ?entityClass2. ?newEntity3 net:has_parent_class ?listItemClass.
?newEntity3 net:has_concept ?subEntity3. ?newEntity3 net:has_concept ?subEntity3.
# Net: Entity ClassList # Net: Entity ClassList
?newNet a net:Instance. ?newNet a net:Instance.
?newNet net:type net:entity_class_list. ?newNet net:type net:entity_class_list.
?newNet net:has_structure ?req. ?newNet net:has_structure ?req.
?newNet net:has_node ?uw1, ?uw2, ?uw3. ?newNet net:has_node ?uw1, ?uw2, ?uw3.
?newNet net:entityClass ?entityClass1. ?newNet net:entityClass ?atomParentClass.
?newNet net:has_mainClass ?atomObject1. ?newNet net:has_mainClass ?atomObject1.
?newNet net:has_subClass ?newEntity2, ?newEntity3. ?newNet net:has_subClass ?newEntity2, ?newEntity3.
} }
WHERE { WHERE {
# net1: agent # net1: atom
?net1 a net:Instance. ?net1 a net:Instance.
?net1 net:type net:atom. ?net1 net:type net:atom.
?net1 net:atomOf sys:Entity. ?net1 net:atomOf sys:Entity.
?net1 net:has_structure ?req. ?net1 net:has_structure ?req.
?net1 net:has_node ?uw1. ?net1 net:has_node ?uw1.
?net1 net:has_atom ?atomObject1. ?net1 net:has_atom ?atomObject1.
?atomObject1 net:has_parent_class ?entityClass1. ?atomObject1 net:has_parent_class ?atomParentClass.
?atomObject1 net:has_concept ?mainEntity. ?atomObject1 net:has_concept ?mainEntity.
# condition: mod(net1, net2) # condition: mod(net1, net2)
?uw1 unl:mod ?uw2. ?uw1 unl:mod ?uw2.
# net2: entity modList # net2: entity modList
?net2 a net:Instance. ?net2 a net:Instance.
?net2 net:type net:entity_mod_list. ?net2 net:type net:list.
?net2 net:modCat1 fprm:System_Entity. ?net2 net:listOf ?listItemClass.
?net2 net:modCat2 ?entityClass2.
?net2 net:has_structure ?req. ?net2 net:has_structure ?req.
?net2 net:has_node ?uw2, ?uw3. ?net2 net:has_node ?uw2, ?uw3.
# Filter # Filter
FILTER ( ?uw1 != ?uw3 ). FILTER ( ?uw1 != ?uw3 ).
FILTER ( ?entityClass1 = ?entityClass2 ). FILTER ( ?atomParentClass = ?listItemClass ).
# UW: type UW-Occurrence and substructure of req sentence
# --old --- ?uw1 rdf:type unl:UW_Occurrence.
# --old --- ?uw2 rdf:type unl:UW_Occurrence.
# --old --- ?uw3 rdf:type unl:UW_Occurrence.
# --old --- ?uw1 unl:is_substructure_of ?req.
# --old --- ?uw2 unl:is_substructure_of ?req.
# --old --- ?uw3 unl:is_substructure_of ?req.
# Label: Id, subEntity # Label: Id, subEntity
?uw1 unl:has_id ?uw1Id. ?uw1 unl:has_id ?uw1Id.
?uw2 unl:has_id ?uw2Id. ?uw2 unl:has_id ?uw2Id.
...@@ -937,7 +811,7 @@ WHERE { ...@@ -937,7 +811,7 @@ WHERE {
BIND (concat(?s1, ?uw1Id, '-', ?uw2Id) AS ?s2). BIND (concat(?s1, ?uw1Id, '-', ?uw2Id) AS ?s2).
BIND (uri(?s2) AS ?newNet). BIND (uri(?s2) AS ?newNet).
}""" ; }""" ;
sh:order 2.6 ; sh:order 2.33 ;
. .
cts:compute-class-uri-of-net-object cts:compute-class-uri-of-net-object
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1180,7 +1054,52 @@ WHERE { ...@@ -1180,7 +1054,52 @@ WHERE {
BIND (concat(?n1, ?uw1Id) AS ?n2). BIND (concat(?n1, ?uw1Id) AS ?n2).
BIND (uri(?n2) AS ?newNet). BIND (uri(?n2) AS ?newNet).
}""" ; }""" ;
sh:order 2.1 ; sh:order 2.11 ;
.
cts:create-unary-list-net
rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX unl: <https://unl.tetras-libre.fr/rdf/schema#>
PREFIX net: <https://unsel.tetras-libre.fr/tenet/semantic-net#>
PREFIX cprm: <https://unsel.tetras-libre.fr/tenet/config/parameters#>
PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Initialize a ModList net
CONSTRUCT {
?semNet a net:Instance.
?semNet net:type net:list.
?semNet net:type net:unary_list.
?semNet net:has_structure ?req.
?semNet net:has_node ?uw1.
?semNet net:has_concept ?concept1.
}
WHERE {
# UW: type UW-Occurrence and substructure of req sentence
?uw0 rdf:type unl:UW_Occurrence.
?uw0 unl:is_substructure_of ?req.
# selection: target UW of modifier (mod)
?uw0 unl:mod ?uw1.
FILTER NOT EXISTS { ?uw1 (unl:and|unl:or) ?uw2 }
# UW: type UW-Occurrence and substructure of req sentence
?uw1 rdf:type unl:UW_Occurrence.
?uw1 unl:is_substructure_of ?req.
# Label(s) / URI
?uw1 rdfs:label ?uw1Label.
?uw1 unl:has_id ?uw1Id.
cprm:Config_Parameters cprm:netURI ?netURI.
net:list rdfs:label ?listLabel.
BIND (strbefore(?uw1Label, '(') AS ?concept1).
# -- old --- BIND (strbefore(?uw2Label, '(') AS ?concept2).
BIND (concat( ?netURI, ?listLabel, '_') AS ?s1).
BIND (concat(?s1, ?uw1Id) AS ?s2).
BIND (uri(?s2) AS ?semNet).
}""" ;
sh:order 2.21 ;
. .
cts:define-uw-id cts:define-uw-id
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1223,17 +1142,15 @@ cts:entity_extraction ...@@ -1223,17 +1142,15 @@ cts:entity_extraction
rdf:type sh:NodeShape ; rdf:type sh:NodeShape ;
rdfs:label "entity extraction" ; rdfs:label "entity extraction" ;
rdfs:subClassOf cts:net_extension ; rdfs:subClassOf cts:net_extension ;
sh:rule cts:compose-entity-modlist-1 ; sh:rule cts:compose-atom-with-list-1 ;
sh:rule cts:compose-entity-modlist-2 ; sh:rule cts:compose-atom-with-list-2 ;
sh:rule cts:compose-entity-modlist-3 ;
sh:rule cts:create-atom-net ; sh:rule cts:create-atom-net ;
sh:rule cts:extend-mod-list ; sh:rule cts:extend-list-net ;
sh:rule cts:init-mod-list ; sh:rule cts:init-conjunctive-list-net ;
sh:rule cts:instantiate-atom-net ; sh:rule cts:instantiate-atom-net ;
sh:rule cts:instantiate-classlist-by-extension-1 ; sh:rule cts:instantiate-classlist-by-extension-1 ;
sh:rule cts:instantiate-classlist-by-extension-2 ; sh:rule cts:instantiate-classlist-by-extension-2 ;
sh:rule cts:typify-modlist-entity ; sh:rule cts:specify-items-of-list-net ;
sh:rule cts:typify-modlist-feature ;
. .
cts:event_extraction cts:event_extraction
rdf:type owl:Class ; rdf:type owl:Class ;
...@@ -1242,7 +1159,7 @@ cts:event_extraction ...@@ -1242,7 +1159,7 @@ cts:event_extraction
rdfs:subClassOf cts:net_extension ; rdfs:subClassOf cts:net_extension ;
sh:rule cts:compose-agt-verb-obj-as-simple-event ; sh:rule cts:compose-agt-verb-obj-as-simple-event ;
. .
cts:extend-mod-list cts:extend-list-net
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
...@@ -1263,22 +1180,18 @@ CONSTRUCT { ...@@ -1263,22 +1180,18 @@ CONSTRUCT {
WHERE { WHERE {
# selection: modList net # selection: modList net
?semNet a net:Instance. ?semNet a net:Instance.
?semNet net:type net:mod_list. ?semNet net:type net:list.
?semNet net:has_node ?uw1. ?semNet net:has_node ?uw1.
# extension: disjunction of UW # extension: disjunction of UW
?uw1 (unl:or|unl:and) ?uw2. ?uw1 (unl:or|unl:and) ?uw2.
# UW: type UW-Occurrence and substructure of req sentence # UW: type UW-Occurrence and substructure of req sentence
# -- old --- ?uw1 rdf:type unl:UW_Occurrence.
# -- old --- ?uw1 unl:is_substructure_of ?req.
?uw2 rdf:type unl:UW_Occurrence. ?uw2 rdf:type unl:UW_Occurrence.
?uw2 unl:is_substructure_of ?req. ?uw2 unl:is_substructure_of ?req.
# Label(s) / URI # Label(s) / URI
?uw1 rdfs:label ?uw1Label.
?uw2 rdfs:label ?uw2Label. ?uw2 rdfs:label ?uw2Label.
BIND (strbefore(?uw1Label, '(') AS ?concept1)
BIND (strbefore(?uw2Label, '(') AS ?concept2) BIND (strbefore(?uw2Label, '(') AS ?concept2)
}""" ; }""" ;
sh:order 2.4 ; sh:order 2.22 ;
. .
cts:feature_extraction cts:feature_extraction
rdf:type owl:Class ; rdf:type owl:Class ;
...@@ -1389,7 +1302,7 @@ cts:generation ...@@ -1389,7 +1302,7 @@ cts:generation
sh:rule cts:generate-atom-class ; sh:rule cts:generate-atom-class ;
sh:rule cts:generate-atom-instance ; sh:rule cts:generate-atom-instance ;
. .
cts:init-mod-list cts:init-conjunctive-list-net
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
...@@ -1405,32 +1318,77 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> ...@@ -1405,32 +1318,77 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Initialize a ModList net # -- Initialize a ModList net
CONSTRUCT { CONSTRUCT {
?semNet a net:Instance. ?semNet a net:Instance.
?semNet net:type net:mod_list. ?semNet net:type net:list.
?semNet net:type net:conjunctive_list.
?semNet net:has_structure ?req. ?semNet net:has_structure ?req.
?semNet net:has_node ?uw1. ?semNet net:has_node ?uw1.
?semNet net:has_concept ?concept1. ?semNet net:has_concept ?concept1.
} }
WHERE { WHERE {
# UW: type UW-Occurrence and substructure of req sentence # UW: type UW-Occurrence and substructure of req sentence
?uw0 rdf:type unl:UW_Occurrence. ?uw1 rdf:type unl:UW_Occurrence.
?uw0 unl:is_substructure_of ?req. ?uw1 unl:is_substructure_of ?req.
# selection: target UW of modifier (mod) # selection: target UW of modifier (mod)
?uw0 unl:mod ?uw1. ?uw1 unl:and ?uw2.
# UW: type UW-Occurrence and substructure of req sentence
?uw2 rdf:type unl:UW_Occurrence.
?uw2 unl:is_substructure_of ?req.
# Label(s) / URI
?uw1 rdfs:label ?uw1Label.
?uw1 unl:has_id ?uw1Id.
cprm:Config_Parameters cprm:netURI ?netURI.
net:list rdfs:label ?listLabel.
BIND (strbefore(?uw1Label, '(') AS ?concept1).
# -- old --- BIND (strbefore(?uw2Label, '(') AS ?concept2).
BIND (concat( ?netURI, ?listLabel, '_') AS ?s1).
BIND (concat(?s1, ?uw1Id) AS ?s2).
BIND (uri(?s2) AS ?semNet).
}""" ;
sh:order 2.21 ;
.
cts:init-disjunctive-list-net
rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX unl: <https://unl.tetras-libre.fr/rdf/schema#>
PREFIX net: <https://unsel.tetras-libre.fr/tenet/semantic-net#>
PREFIX cprm: <https://unsel.tetras-libre.fr/tenet/config/parameters#>
PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Initialize a ModList net
CONSTRUCT {
?semNet a net:Instance.
?semNet net:type net:list.
?semNet net:type net:disjunctive_list.
?semNet net:has_structure ?req.
?semNet net:has_node ?uw1.
?semNet net:has_concept ?concept1.
}
WHERE {
# UW: type UW-Occurrence and substructure of req sentence # UW: type UW-Occurrence and substructure of req sentence
?uw1 rdf:type unl:UW_Occurrence. ?uw1 rdf:type unl:UW_Occurrence.
?uw1 unl:is_substructure_of ?req. ?uw1 unl:is_substructure_of ?req.
# selection: target UW of modifier (mod)
?uw1 unl:or ?uw2.
# UW: type UW-Occurrence and substructure of req sentence
?uw2 rdf:type unl:UW_Occurrence.
?uw2 unl:is_substructure_of ?req.
# Label(s) / URI # Label(s) / URI
?uw1 rdfs:label ?uw1Label. ?uw1 rdfs:label ?uw1Label.
?uw1 unl:has_id ?uw1Id. ?uw1 unl:has_id ?uw1Id.
cprm:Config_Parameters cprm:netURI ?netURI. cprm:Config_Parameters cprm:netURI ?netURI.
net:mod_list rdfs:label ?modListLabel. net:list rdfs:label ?listLabel.
BIND (strbefore(?uw1Label, '(') AS ?concept1). BIND (strbefore(?uw1Label, '(') AS ?concept1).
# -- old --- BIND (strbefore(?uw2Label, '(') AS ?concept2). # -- old --- BIND (strbefore(?uw2Label, '(') AS ?concept2).
BIND (concat( ?netURI, ?modListLabel, '_') AS ?s1). BIND (concat( ?netURI, ?listLabel, '_') AS ?s1).
BIND (concat(?s1, ?uw1Id) AS ?s2). BIND (concat(?s1, ?uw1Id) AS ?s2).
BIND (uri(?s2) AS ?semNet). BIND (uri(?s2) AS ?semNet).
}""" ; }""" ;
sh:order 2.3 ; sh:order 2.21 ;
. .
cts:instantiate-atom-net cts:instantiate-atom-net
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1467,7 +1425,7 @@ WHERE { ...@@ -1467,7 +1425,7 @@ WHERE {
?uw1 unl:has_id ?uw1Id. ?uw1 unl:has_id ?uw1Id.
BIND (?uw1Id AS ?instanceName). BIND (?uw1Id AS ?instanceName).
}""" ; }""" ;
sh:order 2.2 ; sh:order 2.12 ;
. .
cts:instantiate-classlist-by-extension-1 cts:instantiate-classlist-by-extension-1
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1505,7 +1463,7 @@ WHERE { ...@@ -1505,7 +1463,7 @@ WHERE {
# Filter # Filter
FILTER NOT EXISTS { ?subObject2 net:has_instance ?instanceName2 } . FILTER NOT EXISTS { ?subObject2 net:has_instance ?instanceName2 } .
}""" ; }""" ;
sh:order 2.7 ; sh:order 2.34 ;
. .
cts:instantiate-classlist-by-extension-2 cts:instantiate-classlist-by-extension-2
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1544,7 +1502,7 @@ WHERE { ...@@ -1544,7 +1502,7 @@ WHERE {
# Filter # Filter
FILTER NOT EXISTS { ?subObject2 net:has_instance ?instanceName2 } . FILTER NOT EXISTS { ?subObject2 net:has_instance ?instanceName2 } .
}""" ; }""" ;
sh:order 2.8 ; sh:order 2.35 ;
. .
cts:link-to-scope-entry cts:link-to-scope-entry
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
...@@ -1595,14 +1553,7 @@ cts:preprocessing ...@@ -1595,14 +1553,7 @@ cts:preprocessing
sh:rule cts:define-uw-id ; sh:rule cts:define-uw-id ;
sh:rule cts:link-to-scope-entry ; sh:rule cts:link-to-scope-entry ;
. .
cts:state_property_extraction cts:specify-axis-of-list-net
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:label "state property extraction" ;
rdfs:subClassOf cts:net_extension ;
sh:rule cts:compose-aoj-verb-obj-as-simple-state-property ;
.
cts:typify-modlist-entity
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
...@@ -1615,32 +1566,24 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#> ...@@ -1615,32 +1566,24 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/> PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Typify a ModList net as Entity ModList # -- Specify the class of items in the list
CONSTRUCT { CONSTRUCT {
?semNet net:type net:entity_mod_list. ?semNet net:listBy ?unlRel.
?semNet net:modCat1 fprm:System_Entity.
?semNet net:modCat2 ?entityClass.
} }
WHERE { WHERE {
# Entity (from System Ontology) # UW: type UW-Occurrence and substructure of req sentence
?targetClass rdfs:subClassOf* sys:Entity. ?uw0 rdf:type unl:UW_Occurrence.
?targetClass sys:is_class ?entityClass. ?uw0 unl:is_substructure_of ?req.
?targetClass sys:has_restriction ?entityRestriction.
# net: modList # net: modList
?semNet a net:Instance. ?semNet a net:Instance.
?semNet net:type net:mod_list. ?semNet net:type net:list.
?semNet net:has_node ?uw1. ?semNet net:has_node ?uw1.
# UW: type UW-Occurrence and substructure of req sentence # selection: target UW of modifier (mod)
?uw1 rdf:type unl:UW_Occurrence. ?uw0 ?unlRel ?uw1.
?uw1 unl:is_substructure_of ?req.
# Label(s) / URI
?uw1 rdfs:label ?uw1Label.
# Filter
FILTER ( regex(str(?uw1Label),str(?entityRestriction)) ).
}""" ; }""" ;
sh:order 2.5 ; sh:order 2.23 ;
. .
cts:typify-modlist-feature cts:specify-items-of-list-net
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#> sh:construct """PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
...@@ -1653,20 +1596,18 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#> ...@@ -1653,20 +1596,18 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/> PREFIX sys: <https://unsel.tetras-libre.fr/tenet/frame/system-ontology/>
PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Typify a ModList net as Feature ModList # -- Specify the class of items in the list
CONSTRUCT { CONSTRUCT {
?semNet net:type net:complement_mod_list. ?semNet net:listOf ?atomClass.
?semNet net:modCat1 fprm:System_Feature.
?semNet net:modCat2 ?featureClass.
} }
WHERE { WHERE {
# Entity Feature (from System Ontology) # Entity Feature (from System Ontology)
?targetClass rdfs:subClassOf* sys:Feature. ?targetClass rdfs:subClassOf* sys:Structure.
?targetClass sys:is_class ?featureClass. ?targetClass sys:is_class ?atomClass.
?targetClass sys:has_restriction ?featureRestriction. ?targetClass sys:has_restriction ?atomRestriction.
# net: modList # net: modList
?semNet a net:Instance. ?semNet a net:Instance.
?semNet net:type net:mod_list. ?semNet net:type net:list.
?semNet net:has_node ?uw1. ?semNet net:has_node ?uw1.
# UW: type UW-Occurrence and substructure of req sentence # UW: type UW-Occurrence and substructure of req sentence
?uw1 rdf:type unl:UW_Occurrence. ?uw1 rdf:type unl:UW_Occurrence.
...@@ -1674,9 +1615,16 @@ WHERE { ...@@ -1674,9 +1615,16 @@ WHERE {
# Label(s) / URI # Label(s) / URI
?uw1 rdfs:label ?uw1Label. ?uw1 rdfs:label ?uw1Label.
# Filter # Filter
FILTER ( regex(str(?uw1Label),str(?featureRestriction)) ). FILTER ( regex(str(?uw1Label),str(?atomRestriction)) ).
}""" ; }""" ;
sh:order 2.5 ; sh:order 2.23 ;
.
cts:state_property_extraction
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:label "state property extraction" ;
rdfs:subClassOf cts:net_extension ;
sh:rule cts:compose-aoj-verb-obj-as-simple-state-property ;
. .
cts:verb_extraction cts:verb_extraction
rdf:type owl:Class ; rdf:type owl:Class ;
......
...@@ -205,11 +205,11 @@ def run(corpus, source_ref, target_ref): ...@@ -205,11 +205,11 @@ def run(corpus, source_ref, target_ref):
if __name__ == '__main__': if __name__ == '__main__':
target_ref = "system" target_ref = "system"
run(req_100, 'R100', target_ref) run(req_100, 'R100b', target_ref)
run(req_200, 'R200', target_ref) run(req_200, 'R200b', target_ref)
run(req_300, 'R300a', target_ref) run(req_300, 'R300b', target_ref)
run(corpus_40, 'Corpus-CCTP-40c', target_ref) #run(corpus_40, 'Corpus-CCTP-40c', target_ref)
run(corpus_ERTMS, 'Corpus-ERTMS', target_ref) #run(corpus_ERTMS, 'Corpus-ERTMS', target_ref)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment