diff --git a/CHANGELOG b/CHANGELOG index a67e95a91f572f44187eb94d8ed1e194f42bc1d8..029fdce916217331a7ea173927acb1cb55319f24 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,10 +5,34 @@ All notable changes to this project will be documented in this file. ------------------------------------------------------------------------------- +## [0.2.0] - 2021-09-28 + +### Added + +### Changed +- Fusion of CTS for atom elements (entity, feature, verb, ...) +- Addition of seeds in system ontology +- Abandonment of parameter ontology for frame ontologies + + +------------------------------------------------------------------------------- + +## [0.1.3] - 2021-09-17 Demo CS 2 + +### Added +- Relation between classes/instances and requirements +- Extraction of events as classes and object properties +- Extraction of state properties as classes and object properties +- Batch execution for CTS (Compositional Transduction Schemes) + +### Changed +- Order of CTS (Compositional Transduction Schemes) + + ## [0.1.2] - 2021-09-08 Demo CS 1 ### Added -- Trandusction Schemes to extract Entity classes and instances +- Transduction Schemes to extract Entity classes and instances - Transduction Schemes to extract Feature classes - Net object to refine the inclusion of class relations diff --git a/config/semantic-net.ttl b/config/semantic-net.ttl index c2b0a172cd88cb025af1f03bd77d02a65c92ce82..12672eb16b77723d5857b8a83a88b21f545a3e1e 100644 --- a/config/semantic-net.ttl +++ b/config/semantic-net.ttl @@ -15,30 +15,25 @@ net:Instance rdfs:label "Semantic Net Instance" ; rdfs:subClassOf net:Structure ; . -net:Net_Type - rdf:type owl:Class ; - rdfs:label "Semantic Net Type" ; - rdfs:subClassOf net:Structure ; -. net:Object rdf:type owl:Class ; rdfs:label "Object using in semantic net instance" ; rdfs:subClassOf net:Structure ; . -net:Object_Type - rdf:type owl:Class ; - rdfs:label "Object Type" ; - rdfs:subClassOf net:Structure ; -. net:Structure rdf:type owl:Class ; rdfs:comment "A semantic net captures a set of nodes, and associates this set with type(s) and value(s)." ; rdfs:label "Semantic Net Structure" ; . +net:Type + rdf:type owl:Class ; + rdfs:label "Semantic Net Type" ; + rdfs:subClassOf net:Structure ; +. net:abstraction rdf:type owl:Class ; rdfs:label "abstraction" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:abstractionClass rdf:type rdf:Property ; @@ -48,7 +43,12 @@ net:abstractionClass net:atom rdf:type owl:Class ; rdfs:label "atom" ; - rdfs:subClassOf net:Object_Type ; + rdfs:subClassOf net:Type ; +. +net:atomOf + rdf:type rdf:Property ; + rdfs:label "atom of" ; + rdfs:subPropertyOf net:type ; . net:atomType rdf:type rdf:Property ; @@ -58,7 +58,7 @@ net:atomType net:class rdf:type owl:Class ; rdfs:label "class" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:classUri rdf:type rdf:Property ; @@ -68,38 +68,28 @@ net:classUri net:class_list rdf:type owl:Class ; rdfs:label "classList" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:complement rdf:type owl:Class ; rdfs:label "complement" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:complement_mod_list rdf:type owl:Class ; rdfs:label "complement mod list" ; rdfs:subClassOf net:mod_list ; . -net:concept - rdf:type rdf:Property ; - rdfs:label "concept "@fr ; - rdfs:subPropertyOf net:objectValue ; -. net:entity rdf:type owl:Class ; rdfs:label "entity" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:entityClass rdf:type rdf:Property ; rdfs:label "entity class" ; rdfs:subPropertyOf net:objectValue ; . -net:entityInstance - rdf:type rdf:Property ; - rdfs:label "entity instance" ; - rdfs:subPropertyOf net:objectValue ; -. net:entity_class_list rdf:type owl:Class ; rdfs:label "entityClassList" ; @@ -113,12 +103,12 @@ net:entity_mod_list net:event rdf:type owl:Class ; rdfs:label "event" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:feature rdf:type owl:Class ; rdfs:label "feature" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:featureClass rdf:type rdf:Property ; @@ -135,6 +125,11 @@ net:has_atom rdfs:label "has atom" ; rdfs:subPropertyOf net:has_object ; . +net:has_concept + rdf:type rdf:Property ; + rdfs:label "concept "@fr ; + rdfs:subPropertyOf net:objectValue ; +. net:has_entity rdf:type rdf:Property ; rdfs:label "has entity" ; @@ -145,11 +140,21 @@ net:has_feature rdfs:label "has feature" ; rdfs:subPropertyOf net:has_object ; . +net:has_instance + rdf:type rdf:Property ; + rdfs:label "entity instance" ; + rdfs:subPropertyOf net:objectValue ; +. net:has_mainClass rdf:type rdf:Property ; rdfs:label "has main class" ; rdfs:subPropertyOf net:has_object ; . +net:has_mother_class + rdf:type rdf:Property ; + rdfs:label "has mother class" ; + rdfs:subPropertyOf net:objectValue ; +. net:has_node rdf:type rdf:Property ; rdfs:label "UNL Node" ; @@ -160,6 +165,11 @@ net:has_object rdfs:label "relation" ; rdfs:subPropertyOf net:property ; . +net:has_parent_class + rdf:type rdf:Property ; + rdfs:label "parent class" ; + rdfs:subPropertyOf net:objectValue ; +. net:has_possible_domain rdf:type rdf:Property ; rdfs:label "has possible domain" ; @@ -213,7 +223,7 @@ net:modCat2 net:mod_list rdf:type owl:Class ; rdfs:label "modList" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:objectAttribute rdf:type rdf:Property ; @@ -229,11 +239,6 @@ net:objectValue rdfs:label "valuations"@fr ; rdfs:subPropertyOf net:objectAttribute ; . -net:parentClass - rdf:type rdf:Property ; - rdfs:label "parent class" ; - rdfs:subPropertyOf net:objectValue ; -. net:parentClassUri rdf:type rdf:Property ; rdfs:label "parent class uri" ; @@ -246,7 +251,7 @@ net:property net:state_property rdf:type owl:Class ; rdfs:label "stateProperty" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:type rdf:type rdf:Property ; @@ -256,7 +261,7 @@ net:type net:verb rdf:type owl:Class ; rdfs:label "verb" ; - rdfs:subClassOf net:Net_Type ; + rdfs:subClassOf net:Type ; . net:verbClass rdf:type rdf:Property ; diff --git a/config/transduction-schemes.ttl b/config/transduction-schemes.ttl index 34b5e0ecad88b98c64a63d6801def86376e6e6e1..d1ca902d36d0de223ec0aefc67b64ea23cd5d7a7 100644 --- a/config/transduction-schemes.ttl +++ b/config/transduction-schemes.ttl @@ -60,7 +60,7 @@ WHERE { ?net1 net:type net:abstraction. ?net1 net:has_structure ?req. ?net1 net:abstractionClass ?abstractionClass. - ?net1 net:concept ?abstractionConcept. + ?net1 net:has_concept ?abstractionConcept. # Filter: entity not present in a class list FILTER NOT EXISTS { ?net2 net:class2 ?abstractionConcept} # URI: class @@ -107,13 +107,13 @@ WHERE { ?net1 net:entityClass ?entityClass. ?net1 net:has_node ?uw2, ?uw3. ?net1 net:has_mainClass ?mainEntityObject. - ?mainEntityObject net:concept ?mainEntity. + ?mainEntityObject net:has_concept ?mainEntity. ?net1 net:has_subClass ?subEntityObject2, ?subEntityObject3. ?subEntityObject2 net:concept ?subEntity2. ?subEntityObject2 net:has_node ?uw2. - ?subEntityObject3 net:concept ?subEntity3. + ?subEntityObject3 net:has_concept ?subEntity3. ?subEntityObject3 net:has_node ?uw3. - ?subEntityObject3 net:entityInstance ?mainInstance. + ?subEntityObject3 net:has_instance ?mainInstance. # extension: disjunction of UW ?uw2 unl:and ?uw3. # --old --- FILTER NOT EXISTS { ?net2 net:has_subClass ?mainEntity }. @@ -124,13 +124,8 @@ WHERE { BIND (strbefore(?uw2Label, '(') AS ?concept2) BIND (strbefore(?uw3Label, '(') AS ?concept3) BIND (concat(?concept2, '-or-', ?concept3) AS ?concept23) - # --old --- FILTER ( STRSTARTS(?subEntity2, ?concept2) ). - # --old --- FILTER ( STRSTARTS(?subEntity3, ?concept3) ). - # -- old --- BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2). - # -- old --- BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3). BIND (concat(?concept23, '_', ?mainEntity) AS ?subEntity23). # URI (for classes) - # -- old --- cprm:Config_Parameters cprm:baseURI ?baseURI. fprm:System_Ontology fprm:frameURI ?frameURI. BIND (concat( ?frameURI, ?entityClass) AS ?s1). BIND (concat(?s1, '#', ?mainEntity) AS ?s2). @@ -181,13 +176,13 @@ WHERE { ?net1 net:entityClass ?entityClass. ?net1 net:has_node ?uw2, ?uw3. ?net1 net:has_mainClass ?mainEntityObject. - ?mainEntityObject net:concept ?mainEntity. + ?mainEntityObject net:has_concept ?mainEntity. ?net1 net:has_subClass ?subEntityObject2, ?subEntityObject3. - ?subEntityObject2 net:concept ?subEntity2. + ?subEntityObject2 net:has_concept ?subEntity2. ?subEntityObject2 net:has_node ?uw2. - ?subEntityObject3 net:concept ?subEntity3. + ?subEntityObject3 net:has_concept ?subEntity3. ?subEntityObject3 net:has_node ?uw3. - ?subEntityObject3 net:entityInstance ?mainInstance. + ?subEntityObject3 net:has_instance ?mainInstance. # extension: disjunction of UW ?uw2 unl:or ?uw3. # --old --- FILTER NOT EXISTS { ?net2 net:has_subClass ?mainEntity }. @@ -198,13 +193,8 @@ WHERE { BIND (strbefore(?uw2Label, '(') AS ?concept2) BIND (strbefore(?uw3Label, '(') AS ?concept3) BIND (concat(?concept2, '-or-', ?concept3) AS ?concept23) - # --old --- FILTER ( STRSTARTS(?subEntity2, ?concept2) ). - # --old --- FILTER ( STRSTARTS(?subEntity3, ?concept3) ). - # -- old --- BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2). - # -- old --- BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3). BIND (concat(?concept23, '_', ?mainEntity) AS ?subEntity23). # URI (for classes) - # -- old --- cprm:Config_Parameters cprm:baseURI ?baseURI. fprm:System_Ontology fprm:frameURI ?frameURI. BIND (concat( ?frameURI, ?entityClass) AS ?s1). BIND (concat(?s1, '#', ?mainEntity) AS ?s2). @@ -249,12 +239,13 @@ CONSTRUCT { WHERE { # net1: entity ?net1 a net:Instance. - ?net1 net:type net:entity. + ?net1 net:type net:atom. + ?net1 net:atomOf sys:Entity. ?net1 net:has_structure ?req. ?net1 net:has_atom ?atomObject1. - ?atomObject1 net:parentClass ?entityClass. - ?atomObject1 net:concept ?entityConcept. - ?atomObject1 net:entityInstance ?mainInstance. + ?atomObject1 net:has_parent_class ?entityClass. + ?atomObject1 net:has_concept ?entityConcept. + ?atomObject1 net:has_instance ?mainInstance. # Filter: entity not present in a class list FILTER NOT EXISTS { ?net2 net:has_subClass ?entityConcept} # URI (for classes) @@ -311,16 +302,16 @@ WHERE { ?net1 net:has_structure ?req. ?net1 net:has_verb ?verbObject1. ?verbObject1 net:verbClass ?verbClass. - ?verbObject1 net:concept ?verbConcept. + ?verbObject1 net:has_concept ?verbConcept. ?net1 net:has_actor ?actorObject1. - ?actorObject1 net:parentClass ?actorClass. - ?actorObject1 net:concept ?actorConcept. - ?actorObject1 net:entityInstance ?actorInstance. + ?actorObject1 net:has_parent_class ?actorClass. + ?actorObject1 net:has_concept ?actorConcept. + ?actorObject1 net:has_instance ?actorInstance. ?actorObject1 net:instanceUri ?actorInstanceUri. ?net1 net:has_target ?targetObject1. - ?targetObject1 net:parentClass ?targetClass. - ?targetObject1 net:concept ?targetConcept. - ?targetObject1 net:entityInstance ?targetInstance. + ?targetObject1 net:has_parent_class ?targetClass. + ?targetObject1 net:has_concept ?targetConcept. + ?targetObject1 net:has_instance ?targetInstance. ?targetObject1 net:instanceUri ?targetInstanceUri. # Label: event BIND (concat(?actorConcept, '-', ?verbConcept) AS ?e1). @@ -339,24 +330,6 @@ WHERE { BIND (concat(?o1, '#', ?verbConcept) AS ?o2). BIND (uri( ?o1) AS ?eventObjectPropertyUri). BIND (uri( ?o2) AS ?newEventObjectPropertyUri). - # URI (for instance) - # -- old --- BIND (concat( ?frameURI, ?eventClass) AS ?i1). - # -- old --- BIND (concat(?i1, '_', ?mainInstance) AS ?i2). - # -- old --- BIND (uri(?i2) AS ?mainInstanceUri). - # URI (for Entity classes) - # -- old --- fprm:System_Ontology fprm:frameURI ?frameURI. - # -- old --- BIND (concat( ?frameURI, ?actorClass) AS ?e1a). - # -- old --- BIND (concat(?e1a, '#', ?actorConcept) AS ?e1b). - # -- old --- BIND (concat(?e1a, '_', ?actorInstance) AS ?e1c). - # -- old --- BIND (uri(?e1a) AS ?actorClassUri). - # -- old --- BIND (uri(?e1b) AS ?actorUri). - # -- old --- BIND (uri(?e1c) AS ?actorInstanceUri). - # -- old --- BIND (concat( ?frameURI, ?targetClass) AS ?e2a). - # -- old --- BIND (concat(?e2a, '#', ?targetConcept) AS ?e2b). - # -- old --- BIND (concat(?e2a, '_', ?targetInstance) AS ?e2c). - # -- old --- BIND (uri(?e2a) AS ?targetClassUri). - # -- old --- BIND (uri(?e2b) AS ?targetUri). - # -- old --- BIND (uri(?e2c) AS ?targetInstanceUri). }""" ; sh:order 3.1 ; . @@ -385,11 +358,12 @@ CONSTRUCT { WHERE { # net1: feature ?net1 a net:Instance. - ?net1 net:type net:feature. + ?net1 net:type net:atom. + ?net1 net:atomOf sys:Feature. ?net1 net:has_structure ?req. ?net1 net:has_atom ?atomObject1. - ?atomObject1 net:parentClass ?featureClass. - ?atomObject1 net:concept ?featureConcept. + ?atomObject1 net:has_parent_class ?featureClass. + ?atomObject1 net:has_concept ?featureConcept. # Filter: entity not present in a class list FILTER NOT EXISTS { ?net2 net:class2 ?featureConcept} # URI: class @@ -434,20 +408,17 @@ WHERE { ?net1 net:has_structure ?req. ?net1 net:entityClass ?entityClass. ?net1 net:has_mainClass ?mainEntityObject. - ?mainEntityObject net:concept ?mainEntity. + ?mainEntityObject net:has_concept ?mainEntity. ?net1 net:has_subClass ?subEntityObject. - ?subEntityObject net:concept ?subEntity. - ?subEntityObject net:entityInstance ?mainInstance. + ?subEntityObject net:has_concept ?subEntity. + ?subEntityObject net:has_instance ?mainInstance. # Filter -- old --- FILTER NOT EXISTS { ?net2 net:has_subClass ?mainEntity} # URI (for classes) - # -- old --- BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity). - # -- old --- cprm:Config_Parameters cprm:baseURI ?baseURI. fprm:System_Ontology fprm:frameURI ?frameURI. fprm:System_Entity rdfs:label ?entityLabel. BIND (concat( ?frameURI, ?entityClass) AS ?s1). BIND (concat(?s1, '#', ?mainEntity) AS ?s2). BIND (concat(?s1, '#', ?subEntity) AS ?s3). - # -- old --- BIND (uri( ?s1) AS ?entityUri). BIND (uri(?s2) AS ?mainEntityUri). BIND (uri(?s3) AS ?subEntityUri). # URI (for instance) @@ -490,22 +461,22 @@ CONSTRUCT { ?actorInstanceUri ?newStatePropertyObjectPropertyUri ?targetInstanceUri. } WHERE { - # net1: entity + # net1: state property ?net1 a net:Instance. ?net1 net:type net:state_property. ?net1 net:has_structure ?req. ?net1 net:has_verb ?verbObject1. ?verbObject1 net:verbClass ?verbClass. - ?verbObject1 net:concept ?verbConcept. + ?verbObject1 net:has_concept ?verbConcept. ?net1 net:has_actor ?actorObject1. - ?actorObject1 net:entityClass ?actorClass. - ?actorObject1 net:concept ?actorConcept. - ?actorObject1 net:entityInstance ?actorInstance. + ?actorObject1 net:has_parent_class ?actorClass. + ?actorObject1 net:has_concept ?actorConcept. + ?actorObject1 net:has_instance ?actorInstance. ?actorObject1 net:instanceUri ?actorInstanceUri. ?net1 net:has_target ?targetObject1. - ?targetObject1 net:entityClass ?targetClass. - ?targetObject1 net:concept ?targetConcept. - ?targetObject1 net:entityInstance ?targetInstance. + ?targetObject1 net:has_parent_class ?targetClass. + ?targetObject1 net:has_concept ?targetConcept. + ?targetObject1 net:has_instance ?targetInstance. ?targetObject1 net:instanceUri ?targetInstanceUri. # Label: event BIND (concat(?actorConcept, '-', ?verbConcept) AS ?e1). @@ -576,8 +547,8 @@ WHERE { ?net1 net:has_structure ?req. ?net1 net:has_verb ?verbObject1. ?verbObject1 net:verbClass ?verbClass. - ?verbObject1 net:concept ?verbConcept. - # -- old --- ?verbObject1 net:entityInstance ?mainInstance. + ?verbObject1 net:has_concept ?verbConcept. + # -- old --- ?verbObject1 net:has_instance ?mainInstance. # Filter: entity not present in a class list FILTER NOT EXISTS { ?net2 net:has_subClass ?verbConcept} # URI (for classes) @@ -686,14 +657,14 @@ WHERE { ?net1 net:type net:entity_class_list. ?net1 net:entityClass ?entityClass. ?net1 net:has_subClass ?subEntityObject. - ?subEntityObject net:concept ?subEntity. + ?subEntityObject net:has_concept ?subEntity. ?subEntityObject net:has_feature ?featureObject. # object: feature ?featureObject a net:Object. ?featureObject net:objectType sys:Feature. ?featureObject net:has_node ?FeatureUW. - ?featureObject net:featureClass ?featureClass. - ?featureObject net:concept ?featureConcept. + ?featureObject net:has_parent_class ?featureClass. + ?featureObject net:has_concept ?featureConcept. # URI: entity class fprm:System_Ontology fprm:frameURI ?frameURI. fprm:System_Entity rdfs:label ?entityLabel. @@ -742,13 +713,15 @@ WHERE { ?net1 net:has_verb ?verbObject. # net2: entity (actor) ?net2 a net:Instance. - ?net2 net:type net:entity. + ?net2 net:type net:atom. + ?net2 net:atomOf sys:Entity. ?net2 net:has_structure ?req. ?net2 net:has_node ?uw2. ?net2 net:has_atom ?actorObject. # net3: entity (target) ?net3 a net:Instance. - ?net3 net:type net:entity. + ?net3 net:type net:atom. + ?net3 net:atomOf sys:Entity. ?net3 net:has_structure ?req. ?net3 net:has_node ?uw3. ?net3 net:has_atom ?targetObject. @@ -760,12 +733,12 @@ WHERE { ?uw2 unl:has_id ?uw2Id. ?uw3 unl:has_id ?uw3Id. # Possible domain/range - ?actorObject net:entityInstance ?actorObjectInstance. - ?allActorObject net:entityInstance ?actorObjectInstance. - ?allActorObject net:concept ?domainClass. - ?targetObject net:entityInstance ?targetObjectInstance. - ?allTargetObject net:entityInstance ?targetObjectInstance. - ?allTargetObject net:concept ?rangeClass. + ?actorObject net:has_instance ?actorObjectInstance. + ?allActorObject net:has_instance ?actorObjectInstance. + ?allActorObject net:has_concept ?domainClass. + ?targetObject net:has_instance ?targetObjectInstance. + ?allTargetObject net:has_instance ?targetObjectInstance. + ?allTargetObject net:has_concept ?rangeClass. # URI (for Event Net) cprm:Config_Parameters cprm:netURI ?netURI. net:event rdfs:label ?eventLabel. @@ -810,13 +783,15 @@ WHERE { ?net1 net:has_verb ?verbObject. # net2: entity (actor) ?net2 a net:Instance. - ?net2 net:type net:entity. + ?net2 net:type net:atom. + ?net2 net:atomOf sys:Entity. ?net2 net:has_structure ?req. ?net2 net:has_node ?uw2. ?net2 net:has_atom ?actorObject. # net3: entity (target) ?net3 a net:Instance. - ?net3 net:type net:entity. + ?net3 net:type net:atom. + ?net3 net:atomOf sys:Entity. ?net3 net:has_structure ?req. ?net3 net:has_node ?uw3. ?net3 net:has_atom ?targetObject. @@ -828,12 +803,12 @@ WHERE { ?uw2 unl:has_id ?uw2Id. ?uw3 unl:has_id ?uw3Id. # Possible domain/range - ?actorObject net:entityInstance ?actorObjectInstance. - ?allActorObject net:entityInstance ?actorObjectInstance. - ?allActorObject net:concept ?domainClass. - ?targetObject net:entityInstance ?targetObjectInstance. - ?allTargetObject net:entityInstance ?targetObjectInstance. - ?allTargetObject net:concept ?rangeClass. + ?actorObject net:has_instance ?actorObjectInstance. + ?allActorObject net:has_instance ?actorObjectInstance. + ?allActorObject net:has_concept ?domainClass. + ?targetObject net:has_instance ?targetObjectInstance. + ?allTargetObject net:has_instance ?targetObjectInstance. + ?allTargetObject net:has_concept ?rangeClass. # URI (for State Property Net) cprm:Config_Parameters cprm:netURI ?netURI. net:state_property rdfs:label ?statePropertyLabel. @@ -860,29 +835,29 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> CONSTRUCT { # Object: feature 2 ?newFeature2 a net:Object. - ?newFeature2 net:objectType sys:Feature. + ?newFeature2 net:objectType \"Feature\". ?newFeature2 net:has_node ?uw2. - ?newFeature2 net:featureClass ?featureClass. - ?newFeature2 net:concept ?concept2. + ?newFeature2 net:has_parent_class ?featureClass. + ?newFeature2 net:has_concept ?concept2. # Object: feature 3 ?newFeature3 a net:Object. - ?newFeature3 net:objectType sys:Feature. + ?newFeature3 net:objectType \"Feature\". ?newFeature3 net:has_node ?uw3. - ?newFeature3 net:featureClass ?featureClass. - ?newFeature3 net:concept ?concept3. + ?newFeature3 net:has_parent_class ?featureClass. + ?newFeature3 net:has_concept ?concept3. # Object: entity 2 ?newEntity2 a net:Object. - ?newEntity2 net:objectType sys:Entity. + ?newEntity2 net:objectType \"Entity\". ?newEntity2 net:has_node ?uw2. - ?newEntity2 net:entityClass ?entityClass. - ?newEntity2 net:concept ?subEntity2. + ?newEntity2 net:has_parent_class ?entityClass. + ?newEntity2 net:has_concept ?subEntity2. ?newEntity2 net:has_feature ?newFeature2. # Object: entity 3 ?newEntity3 a net:Object. - ?newEntity3 net:objectType sys:Entity. + ?newEntity3 net:objectType \"Entity\". ?newEntity3 net:has_node ?uw3. - ?newEntity3 net:entityClass ?entityClass. - ?newEntity3 net:concept ?subEntity3. + ?newEntity3 net:has_parent_class ?entityClass. + ?newEntity3 net:has_concept ?subEntity3. ?newEntity3 net:has_feature ?newFeature3. # Net: Entity ClassList ?newNet a net:Instance. @@ -897,12 +872,13 @@ CONSTRUCT { WHERE { # net1: entity ?net1 a net:Instance. - ?net1 net:type net:entity. + ?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:parentClass ?entityClass. - ?atomObject1 net:concept ?mainEntity. + ?atomObject1 net:has_parent_class ?entityClass. + ?atomObject1 net:has_concept ?mainEntity. # condition: mod(net1, net2) ?uw1 unl:mod ?uw2. # net2: complement modList @@ -970,29 +946,29 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> CONSTRUCT { # Object: feature 2 ?newFeature2 a net:Object. - ?newFeature2 net:objectType sys:Feature. + ?newFeature2 net:objectType \"Feature\". ?newFeature2 net:has_node ?uw2. - ?newFeature2 net:featureClass ?entityClass2. - ?newFeature2 net:concept ?concept2. + ?newFeature2 net:has_parent_class ?entityClass2. + ?newFeature2 net:has_concept ?concept2. # Object: feature 3 ?newFeature3 a net:Object. - ?newFeature3 net:objectType sys:Feature. + ?newFeature3 net:objectType \"Feature\". ?newFeature3 net:has_node ?uw3. - ?newFeature3 net:featureClass ?entityClass2. - ?newFeature3 net:concept ?concept3. + ?newFeature3 net:has_parent_class ?entityClass2. + ?newFeature3 net:has_concept ?concept3. # Object: entity 2 ?newEntity2 a net:Object. - ?newEntity2 net:objectType sys:Entity. + ?newEntity2 net:objectType \"Entity\". ?newEntity2 net:has_node ?uw2. - ?newEntity2 net:entityClass ?entityClass2. - ?newEntity2 net:concept ?subEntity2. + ?newEntity2 net:has_parent_class ?entityClass2. + ?newEntity2 net:has_concept ?subEntity2. ?newEntity2 net:has_feature ?newFeature2. # Object: entity 3 ?newEntity3 a net:Object. - ?newEntity3 net:objectType sys:Entity. + ?newEntity3 net:objectType \"Entity\". ?newEntity3 net:has_node ?uw3. - ?newEntity3 net:entityClass ?entityClass2. - ?newEntity3 net:concept ?subEntity3. + ?newEntity3 net:has_parent_class ?entityClass2. + ?newEntity3 net:has_concept ?subEntity3. ?newEntity3 net:has_feature ?newFeature3. # Net: Entity ClassList ?newNet a net:Instance. @@ -1007,12 +983,13 @@ CONSTRUCT { WHERE { # net1: agent ?net1 a net:Instance. - ?net1 net:type net:entity. + ?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:parentClass ?entityClass1. - ?atomObject1 net:concept ?mainEntity. + ?atomObject1 net:has_parent_class ?entityClass1. + ?atomObject1 net:has_concept ?mainEntity. # condition: mod(net1, net2) ?uw1 unl:mod ?uw2. # net2: entity modList @@ -1081,16 +1058,16 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> CONSTRUCT { # Object: entity 2 ?newEntity2 a net:Object. - ?newEntity2 net:objectType sys:Entity. + ?newEntity2 net:objectType \"Entity\". ?newEntity2 net:has_node ?uw2. - ?newEntity2 net:entityClass ?entityClass2. - ?newEntity2 net:concept ?subEntity2. + ?newEntity2 net:has_parent_class ?entityClass2. + ?newEntity2 net:has_concept ?subEntity2. # Object: entity 3 ?newEntity3 a net:Object. - ?newEntity3 net:objectType sys:Entity. + ?newEntity3 net:objectType \"Entity\". ?newEntity3 net:has_node ?uw3. - ?newEntity3 net:entityClass ?entityClass2. - ?newEntity3 net:concept ?subEntity3. + ?newEntity3 net:has_parent_class ?entityClass2. + ?newEntity3 net:has_concept ?subEntity3. # Net: Entity ClassList ?newNet a net:Instance. ?newNet net:type net:entity_class_list. @@ -1103,12 +1080,13 @@ CONSTRUCT { WHERE { # net1: agent ?net1 a net:Instance. - ?net1 net:type net:entity. + ?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:parentClass ?entityClass1. - ?atomObject1 net:concept ?mainEntity. + ?atomObject1 net:has_parent_class ?entityClass1. + ?atomObject1 net:has_concept ?mainEntity. # condition: mod(net1, net2) ?uw1 unl:mod ?uw2. # net2: entity modList @@ -1178,8 +1156,8 @@ CONSTRUCT { WHERE { # net1: entity ?object a net:Object. - ?object net:parentClass ?objectClass. - ?object net:concept ?objectConcept. + ?object net:has_parent_class ?objectClass. + ?object net:has_concept ?objectConcept. # URI (for classes and instance) fprm:System_Ontology fprm:frameURI ?frameURI. BIND (concat( ?frameURI, ?objectClass) AS ?s1). @@ -1216,7 +1194,7 @@ WHERE { ?net1 net:type net:event. ?net1 net:has_structure ?req. ?net1 net:has_verb ?verbObject1. - ?verbObject1 net:concept ?verbConcept. + ?verbObject1 net:has_concept ?verbConcept. # domain ?net1 net:has_possible_domain ?possibleDomainLabel1. ?domainClass rdfs:label ?possibleDomainLabel1 . @@ -1273,7 +1251,7 @@ WHERE { ?net1 net:type net:state_property. ?net1 net:has_structure ?req. ?net1 net:has_verb ?verbObject1. - ?verbObject1 net:concept ?verbConcept. + ?verbObject1 net:has_concept ?verbConcept. # domain ?net1 net:has_possible_domain ?possibleDomainLabel1. ?domainClass rdfs:label ?possibleDomainLabel1 . @@ -1325,8 +1303,8 @@ CONSTRUCT { WHERE { # net1: entity ?object a net:Object. - ?object net:parentClass ?objectClass. - ?object net:entityInstance ?objectInstance. + ?object net:has_parent_class ?objectClass. + ?object net:has_instance ?objectInstance. # URI (for classes and instance) fprm:System_Ontology fprm:frameURI ?frameURI. BIND (concat( ?frameURI, ?objectClass) AS ?s1). @@ -1355,7 +1333,7 @@ CONSTRUCT { ?newNet net:has_structure ?req. ?newNet net:has_node ?uw1. ?newNet net:abstractionClass ?abstractionClass. - ?newNet net:concept ?concept1. + ?newNet net:has_concept ?concept1. } WHERE { # Absraction (from System Ontology) @@ -1392,18 +1370,19 @@ 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#> -# -- Create Entity net +# -- Create Atom Net (entity) CONSTRUCT { # Object: entity ?newObject a net:Object. - ?newObject net:objectType net:atom. - ?newObject net:atomType ?atomType. - ?newObject net:node ?uw1. - ?newObject net:parentClass ?atomClass. - ?newObject net:concept ?concept1. + ?newObject net:objectType ?atomMother. + ?newObject net:has_node ?uw1. + ?newObject net:has_mother_class ?atomMother. + ?newObject net:has_parent_class ?atomClass. + ?newObject net:has_concept ?concept1. # Net: Entity ?newNet a net:Instance. - ?newNet net:type net:entity. + ?newNet net:type net:atom. + ?newNet net:atomOf ?atomMother. ?newNet net:has_structure ?req. ?newNet net:has_node ?uw1. ?newNet net:has_atom ?newObject. @@ -1411,13 +1390,9 @@ CONSTRUCT { WHERE { # Atom Description (from System Ontology) ?targetClass rdfs:subClassOf sys:Entity. - ?targetClass sys:has_mother_class ?atomType. + ?targetClass sys:has_mother_class ?atomMother. ?targetClass sys:is_class ?atomClass. ?targetClass sys:has_restriction ?restriction. - # -- old --- fprm:System_Entity fprm:class ?atomType. - # -- old --- ?entity rdf:type fprm:System_Entity. - # -- old --- ?entity fprm:class ?entityClass. - # -- old --- ?entity fprm:restriction ?entityRestriction. # UW: type UW-Occurrence and substructure of req sentence ?uw1 rdf:type unl:UW_Occurrence. ?uw1 unl:is_substructure_of ?req. @@ -1458,34 +1433,33 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> # -- Create Feature net CONSTRUCT { # Object: atom (feature) - ?newAtom a net:Object. - ?newAtom net:objectType net:atom. - ?newAtom net:atomType ?atomType. - ?newAtom net:node ?uw1. - ?newAtom net:parentClass ?featureClass. - ?newAtom net:concept ?concept1. + ?newObject a net:Object. + ?newObject net:objectType ?atomMother. + ?newObject net:has_node ?uw1. + ?newObject net:has_mother_class ?atomMother. + ?newObject net:has_parent_class ?featureClass. + ?newObject net:concept ?concept1. # Net: Feature ?newNet a net:Instance. - ?newNet net:type net:feature. + ?newNet net:type net:atom. + ?newNet net:atomOf ?atomMother. ?newNet net:has_structure ?req. ?newNet net:has_node ?uw1. - # -- old --- ?newNet net:featureClass ?featureClass. - # -- old --- ?newNet net:concept ?concept1. - ?newNet net:has_atom ?newAtom. + ?newNet net:has_atom ?newObject. } WHERE { # Atom Description (from System Ontology) - fprm:System_Feature fprm:class ?atomType. - ?atomDescription rdf:type fprm:System_Feature. - ?atomDescription fprm:class ?featureClass. - ?atomDescription fprm:restriction ?featureRestriction. + ?targetClass rdfs:subClassOf sys:Feature. + ?targetClass sys:has_mother_class ?atomMother. + ?targetClass sys:is_class ?atomClass. + ?targetClass sys:has_restriction ?restriction. # UW: type UW-Occurrence and substructure of req sentence ?uw1 rdf:type unl:UW_Occurrence. ?uw1 unl:is_substructure_of ?req. # ------ ?uw1 unl:is_occurrence_of ?lexTrg. # Filter on label ?uw1 rdfs:label ?uw1Label. - FILTER ( regex(str(?uw1Label),str(?featureRestriction)) ). + FILTER ( regex(str(?uw1Label),str(?restriction)) ). # Label: Id, concept ?uw1 unl:has_id ?uw1Id. BIND (strbefore(?uw1Label, '(') AS ?concept1). @@ -1494,10 +1468,10 @@ WHERE { cprm:Config_Parameters cprm:objectRef ?objectRef. BIND (concat( ?netURI, ?objectRef) AS ?a1). BIND (concat(?a1, ?uw1Id) AS ?a2). - BIND (uri(?a2) AS ?newAtom). + BIND (uri(?a2) AS ?newObject). # URI (for Entity Net) cprm:Config_Parameters cprm:netURI ?netURI. - BIND (concat( ?netURI, ?featureClass, '_') AS ?n1). + BIND (concat( ?netURI, ?atomClass, '_') AS ?n1). BIND (concat(?n1, ?uw1Id) AS ?n2). BIND (uri(?n2) AS ?newNet). }""" ; @@ -1521,9 +1495,9 @@ CONSTRUCT { # Object: entity ?newVerb a net:Object. ?newVerb net:objectType sys:Verb. - ?newVerb net:node ?uw1. + ?newVerb net:has_node ?uw1. ?newVerb net:verbClass ?verbClass. - ?newVerb net:concept ?concept1. + ?newVerb net:has_concept ?concept1. # Net: Entity ?newNet a net:Instance. ?newNet net:type net:verb. @@ -1636,7 +1610,7 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> # -- Extend a ModList net CONSTRUCT { ?semNet net:has_node ?uw2. - ?semNet net:concept ?concept2. + ?semNet net:has_concept ?concept2. } WHERE { # selection: modList net @@ -1704,7 +1678,7 @@ CONSTRUCT { ?semNet net:type net:mod_list. ?semNet net:has_structure ?req. ?semNet net:has_node ?uw1. - ?semNet net:concept ?concept1. + ?semNet net:has_concept ?concept1. } WHERE { # UW: type UW-Occurrence and substructure of req sentence @@ -1743,17 +1717,16 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> # -- Instantiate entities in class list by extension of instances (2) CONSTRUCT { - ?subObject2 net:entityInstance ?instanceName1. + ?subObject2 net:has_instance ?instanceName1. } WHERE { # net1: entity with instance ?net1 a net:Instance. - ?net1 net:type net:entity. + ?net1 net:type net:atom. + ?net1 net:atomOf sys:Entity. ?net1 net:has_structure ?sameReq. ?net1 net:has_atom ?sameObject1. - # -- old --- ?entityObject1 net:parentClass ?sameClass. - # -- old --- ?entityObject1 net:concept ?sameEntity. - ?sameObject1 net:entityInstance ?instanceName1. + ?sameObject1 net:has_instance ?instanceName1. # net2: entity classList ?net2 a net:Instance. ?net2 net:type net:entity_class_list. @@ -1763,7 +1736,7 @@ WHERE { # -- old --- ?net2 net:has_mainClass ?sameEntity. ?net2 net:has_subClass ?subObject2. # Filter - FILTER NOT EXISTS { ?subObject2 net:entityInstance ?instanceName2 } . + FILTER NOT EXISTS { ?subObject2 net:has_instance ?instanceName2 } . }""" ; sh:order 2.7 ; . @@ -1782,7 +1755,7 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> # -- Instantiate entities in class list by extension of instances (2) CONSTRUCT { - ?subObject2 net:entityInstance ?instanceName1. + ?subObject2 net:has_instance ?instanceName1. } WHERE { # net2: entity classList with instance @@ -1791,18 +1764,18 @@ WHERE { ?net1 net:entityClass ?sameClass. ?net1 net:has_structure ?sameReq. ?net1 net:has_subClass ?entityObject1. - ?entityObject1 net:concept ?sameEntity. - ?entityObject1 net:entityInstance ?instanceName1. + ?entityObject1 net:has_concept ?sameEntity. + ?entityObject1 net:has_instance ?instanceName1. # net2: another entity classList ?net2 a net:Instance. ?net2 net:type net:entity_class_list. ?net2 net:entityClass ?sameClass. ?net2 net:has_structure ?sameReq. ?net2 net:has_mainClass ?entityObject2. - ?entityObject2 net:concept ?sameEntity. + ?entityObject2 net:has_concept ?sameEntity. ?net2 net:has_subClass ?subObject2. # Filter - FILTER NOT EXISTS { ?subObject2 net:entityInstance ?instanceName2 } . + FILTER NOT EXISTS { ?subObject2 net:has_instance ?instanceName2 } . }""" ; sh:order 2.8 ; . @@ -1822,12 +1795,13 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#> # -- Create Entity net CONSTRUCT { # Object: entity - ?atomObject1 net:entityInstance ?instanceName. + ?atomObject1 net:has_instance ?instanceName. } WHERE { # net1: entity (with entity object) ?net1 a net:Instance. - ?net1 net:type net:entity. + ?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. diff --git a/frame/system-ontology.ttl b/frame/system-ontology.ttl index f39a2539dfb3152bf11388ed7197e4871e7fb580..730140b07103088695196379c9c7991f92e32960 100644 --- a/frame/system-ontology.ttl +++ b/frame/system-ontology.ttl @@ -30,7 +30,7 @@ sys:Entity rdfs:label "entity"@en ; rdfs:label "entité"@fr ; rdfs:subClassOf sys:Structure ; - sys:is_class "Entity" ; + sys:is_class "sys:Entity" ; . sys:Event rdf:type owl:Class ; @@ -66,7 +66,7 @@ sys:abstract_thing rdfs:label "abstract thing"@en ; rdfs:label "élément abstrait"@fr ; rdfs:subClassOf sys:Abstraction ; - sys:has_mother_class "Abstraction" ; + sys:has_mother_class sys:Abstraction ; sys:has_restriction "icl>abstract_thing" ; sys:is_class "abstract_thing" ; . @@ -74,7 +74,7 @@ sys:action_verb rdf:type owl:Class ; rdfs:label "action verb" ; rdfs:subClassOf sys:Verb ; - sys:has_mother_class "Verb" ; + sys:has_mother_class sys:Verb ; sys:has_restriction "icl>do" ; sys:is_class "action_verb" ; . @@ -83,7 +83,7 @@ sys:agent rdfs:label "agent"@en ; rdfs:label "agent"@fr ; rdfs:subClassOf sys:Entity ; - sys:has_mother_class "Entity" ; + sys:has_mother_class sys:Entity ; sys:has_restriction "icl>administrator" ; sys:has_restriction "icl>operator" ; sys:has_restriction "icl>person" ; @@ -93,7 +93,7 @@ sys:attributive_verb rdf:type owl:Class ; rdfs:label "attributive verb" ; rdfs:subClassOf sys:Verb ; - sys:has_mother_class "Verb" ; + sys:has_mother_class sys:Verb ; sys:has_restriction "icl>be" ; sys:is_class "attributive_verb" ; . @@ -106,7 +106,7 @@ sys:component rdfs:label "component"@en ; rdfs:label "composant"@fr ; rdfs:subClassOf sys:Entity ; - sys:has_mother_class "Entity" ; + sys:has_mother_class sys:Entity ; sys:has_restriction "icl>device" ; sys:has_restriction "icl>electronic_device" ; sys:has_restriction "icl>instrumentality" ; @@ -153,6 +153,7 @@ sys:has_frame_base_uri sys:has_mother_class rdf:type rdf:Property ; rdfs:label "has mother class" ; + rdfs:range owl:Thing ; rdfs:subPropertyOf sys:seedProperty ; sys:has_mother_class "Entity" ; sys:has_restriction "icl>administrator" ; @@ -194,7 +195,7 @@ sys:message rdfs:label "message"@en ; rdfs:label "message"@fr ; rdfs:subClassOf sys:Entity ; - sys:has_mother_class "Entity" ; + sys:has_mother_class sys:Entity ; sys:has_restriction "icl>assignment" ; sys:has_restriction "icl>communication" ; sys:is_class "message" ; @@ -208,7 +209,7 @@ sys:place rdfs:label "lieu"@fr ; rdfs:label "place"@en ; rdfs:subClassOf sys:Feature ; - sys:has_mother_class "Feature" ; + sys:has_mother_class sys:Feature ; sys:has_restriction "icl>air_base_installation" ; sys:has_restriction "icl>place" ; sys:is_class "place" ;