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

Minimal event extraction

parent 41a5ad97
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,16 @@ net:Type ...@@ -30,6 +30,16 @@ 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
rdf:type rdf:Property ;
rdfs:label "abstraction class" ;
rdfs:subPropertyOf net:objectValue ;
.
net:class net:class
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:label "class" ; rdfs:label "class" ;
...@@ -80,11 +90,26 @@ net:entity_mod_list ...@@ -80,11 +90,26 @@ net:entity_mod_list
rdfs:label "entity mod list" ; rdfs:label "entity mod list" ;
rdfs:subClassOf net:mod_list ; rdfs:subClassOf net:mod_list ;
. .
net:event
rdf:type owl:Class ;
rdfs:label "event" ;
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" ;
rdfs:subPropertyOf net:objectValue ; rdfs:subPropertyOf net:objectValue ;
. .
net:has_actor
rdf:type rdf:Property ;
rdfs:label "has verb" ;
rdfs:subPropertyOf net:has_object ;
.
net:has_entity net:has_entity
rdf:type rdf:Property ; rdf:type rdf:Property ;
rdfs:label "has entity" ; rdfs:label "has entity" ;
...@@ -120,6 +145,16 @@ net:has_subClass ...@@ -120,6 +145,16 @@ net:has_subClass
rdfs:label "has sub class" ; rdfs:label "has sub class" ;
rdfs:subPropertyOf net:has_object ; rdfs:subPropertyOf net:has_object ;
. .
net:has_target
rdf:type rdf:Property ;
rdfs:label "has verb" ;
rdfs:subPropertyOf net:has_object ;
.
net:has_verb
rdf:type rdf:Property ;
rdfs:label "has verb" ;
rdfs:subPropertyOf net:has_object ;
.
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)" ;
...@@ -163,3 +198,13 @@ net:type ...@@ -163,3 +198,13 @@ net:type
rdfs:label "type "@fr ; rdfs:label "type "@fr ;
rdfs:subPropertyOf net:property ; rdfs:subPropertyOf net:property ;
. .
net:verb
rdf:type owl:Class ;
rdfs:label "verb" ;
rdfs:subClassOf net:Type ;
.
net:verbClass
rdf:type rdf:Property ;
rdfs:label "verb class" ;
rdfs:subPropertyOf net:objectValue ;
.
...@@ -24,6 +24,54 @@ cts:Transduction_Schemes ...@@ -24,6 +24,54 @@ cts:Transduction_Schemes
rdfs:label "Transduction Schemes" ; rdfs:label "Transduction Schemes" ;
rdfs:subClassOf owl:Thing ; rdfs:subClassOf owl:Thing ;
. .
cts:abstraction_extraction
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:label "abstraction extension" ;
rdfs:subClassOf cts:net_extension ;
sh:rule cts:create-abstraction-net ;
.
cts:add-abstraction-classes
rdf:type sh:SPARQLRule ;
rdfs:label "add abstraction classes" ;
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#>
# -- Add Entity class / instance in System Ontology
CONSTRUCT {
# Classification
?subAbstractionUri rdfs:subClassOf ?abstractionUri.
?subAbstractionUri rdfs:label ?abstractionConcept.
?subAbstractionUri sys:from_structure ?req.
# Instantiation: no instance for abstraction
}
WHERE {
# net1: feature
?net1 a net:Instance.
?net1 net:type net:abstraction.
?net1 net:has_structure ?req.
?net1 net:abstractionClass ?abstractionClass.
?net1 net:concept ?abstractionConcept.
# Filter: entity not present in a class list
FILTER NOT EXISTS { ?net2 net:class2 ?abstractionConcept}
# URI: class
cprm:Config_Parameters cprm:baseURI ?baseURI.
fprm:System_Ontology fprm:frameURI ?frameURI.
BIND (concat( ?frameURI, ?abstractionClass) AS ?s1).
BIND (concat(?s1, '_', ?abstractionConcept) AS ?s2).
BIND (uri( ?s1) AS ?abstractionUri).
BIND (uri(?s2) AS ?subAbstractionUri).
}""" ;
sh:order 3.1 ;
.
cts:add-conjunctive-entity-classes cts:add-conjunctive-entity-classes
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
rdfs:label "add-conjunctive-entity-classes" ; rdfs:label "add-conjunctive-entity-classes" ;
...@@ -222,6 +270,61 @@ WHERE { ...@@ -222,6 +270,61 @@ WHERE {
}""" ; }""" ;
sh:order 3.1 ; sh:order 3.1 ;
. .
cts:add-event-classes
rdf:type sh:SPARQLRule ;
rdfs:label "add-event-classes" ;
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#>
# -- Add Verb class / instance in System Ontology
CONSTRUCT {
# Classification
?newEventUri rdfs:subClassOf ?eventClassUri.
?newEventUri rdfs:label ?eventLabel.
?newEventUri sys:from_structure ?req.
# Instantiation !!! TODO !!!
# -- old --- ?mainInstanceUri a ?newEventUri.
# -- old --- ?mainInstanceUri rdfs:label ?mainInstance.
# -- old --- ?mainInstanceUri sys:from_structure ?req.
}
WHERE {
# net1: entity
?net1 a net:Instance.
?net1 net:type net:event.
?net1 net:has_structure ?req.
?net1 net:has_verb ?verbObject1.
?verbObject1 net:verbClass ?verbClass.
?verbObject1 net:concept ?verbConcept.
?net1 net:has_actor ?actorObject1.
?actorObject1 net:entityClass ?actorClass.
?actorObject1 net:concept ?actorConcept.
?net1 net:has_target ?targetObject1.
?targetObject1 net:entityClass ?targetClass.
?targetObject1 net:concept ?targetConcept.
# Label: event
BIND (concat(?actorConcept, '-', ?verbConcept) AS ?e1).
BIND (concat(?e1, '-', ?targetConcept) AS ?eventLabel).
# URI (for classes)
fprm:System_Ontology fprm:frameURI ?frameURI.
fprm:System_Event fprm:class ?eventClass.
BIND (concat( ?frameURI, ?eventClass) AS ?s1).
BIND (concat(?s1, '_', ?eventLabel) AS ?s2).
BIND (uri( ?s1) AS ?eventClassUri).
BIND (uri(?s2) AS ?newEventUri).
# URI (for instance)
# -- old --- BIND (concat(?s1, '_', ?mainInstance) AS ?s3).
# -- old --- BIND (uri(?s3) AS ?mainInstanceUri).
}""" ;
sh:order 3.1 ;
.
cts:add-feature-classes cts:add-feature-classes
rdf:type sh:SPARQLRule ; rdf:type sh:SPARQLRule ;
rdfs:label "add-entity-classes" ; rdfs:label "add-entity-classes" ;
...@@ -317,23 +420,80 @@ WHERE { ...@@ -317,23 +420,80 @@ WHERE {
}""" ; }""" ;
sh:order 3.2 ; sh:order 3.2 ;
. .
cts:add-verb-classes
rdf:type sh:SPARQLRule ;
rdfs:label "add-verb-classes" ;
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#>
# -- Add Verb class / instance in System Ontology
CONSTRUCT {
# Classification
?mainVerbUri rdfs:subClassOf ?verbUri.
?mainVerbUri rdfs:label ?mainEntity.
?mainVerbUri sys:from_structure ?req.
# Instantiation !!! TODO !!!
# -- old --- ?mainInstanceUri a ?mainVerbUri.
# -- old --- ?mainInstanceUri rdfs:label ?mainInstance.
# -- old --- ?mainInstanceUri sys:from_structure ?req.
}
WHERE {
# net1: entity
?net1 a net:Instance.
?net1 net:type net:verb.
?net1 net:has_structure ?req.
?net1 net:has_verb ?verbObject1.
?verbObject1 net:verbClass ?verbClass.
?verbObject1 net:concept ?mainVerb.
# -- old --- ?verbObject1 net:entityInstance ?mainInstance.
# Filter: entity not present in a class list
FILTER NOT EXISTS { ?net2 net:has_subClass ?mainVerb}
# URI (for classes)
cprm:Config_Parameters cprm:baseURI ?baseURI.
fprm:System_Ontology fprm:frameURI ?frameURI.
fprm:System_Event fprm:class ?eventURI.
# -- old --- fprm:System_Entity rdfs:label ?verbLabel.
BIND (concat( ?frameURI, ?verbClass) AS ?s1).
BIND (concat(?s1, '_', ?mainVerb) AS ?s2).
BIND (uri( ?s1) AS ?verbUri).
BIND (uri(?s2) AS ?mainVerbUri).
# URI (for instance)
# -- old --- BIND (concat(?s1, '_', ?mainInstance) AS ?s3).
# -- old --- BIND (uri(?s3) AS ?mainInstanceUri).
}""" ;
sh:order 3.1 ;
.
cts:batch_execution cts:batch_execution
rdf:type owl:Class ; rdf:type owl:Class ;
rdf:type sh:NodeShape ; rdf:type sh:NodeShape ;
rdfs:label "batch execution" ; rdfs:label "batch execution" ;
rdfs:subClassOf cts:Transduction_Schemes ; rdfs:subClassOf cts:Transduction_Schemes ;
sh:rule cts:add-abstraction-classes ;
sh:rule cts:add-conjunctive-entity-classes ; sh:rule cts:add-conjunctive-entity-classes ;
sh:rule cts:add-disjunctive-entity-classes ; sh:rule cts:add-disjunctive-entity-classes ;
sh:rule cts:add-entity-classes ; sh:rule cts:add-entity-classes ;
sh:rule cts:add-event-classes ;
sh:rule cts:add-feature-classes ; sh:rule cts:add-feature-classes ;
sh:rule cts:add-list-of-entity-classes ; sh:rule cts:add-list-of-entity-classes ;
sh:rule cts:add-verb-classes ;
sh:rule cts:bypass-reification ; sh:rule cts:bypass-reification ;
sh:rule cts:complement-list-of-entity-classes ; sh:rule cts:complement-list-of-entity-classes ;
sh:rule cts:compose-agt-verb-obj-as-event ;
sh:rule cts:compose-entity-modlist-1 ; sh:rule cts:compose-entity-modlist-1 ;
sh:rule cts:compose-entity-modlist-2 ; sh:rule cts:compose-entity-modlist-2 ;
sh:rule cts:compose-entity-modlist-3 ; sh:rule cts:compose-entity-modlist-3 ;
sh:rule cts:create-abstraction-net ;
sh:rule cts:create-entity-net ; sh:rule cts:create-entity-net ;
sh:rule cts:create-feature-net ; sh:rule cts:create-feature-net ;
sh:rule cts:create-verb-net ;
sh:rule cts:define-uw-id ; sh:rule cts:define-uw-id ;
sh:rule cts:extend-mod-list ; sh:rule cts:extend-mod-list ;
sh:rule cts:init-mod-list ; sh:rule cts:init-mod-list ;
...@@ -417,6 +577,65 @@ WHERE { ...@@ -417,6 +577,65 @@ WHERE {
}""" ; }""" ;
sh:order 3.3 ; sh:order 3.3 ;
. .
cts:compose-agt-verb-obj-as-event
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 a subject Entity (agt), an action Verb and an object Entity (obj) to obtain an event
CONSTRUCT {
# Net: Entity ClassList
?newNet a net:Instance.
?newNet net:type net:event.
?newNet net:has_structure ?req.
?newNet net:has_node ?uw1, ?uw2, ?uw3.
?newNet net:has_actor ?actorObject.
?newNet net:has_verb ?verbObject.
?newNet net:has_target ?targetObject.
}
WHERE {
# net1: verb
?net1 a net:Instance.
?net1 net:type net:verb.
?net1 net:has_structure ?req.
?net1 net:has_node ?uw1.
?net1 net:has_verb ?verbObject.
# net2: entity (actor)
?net2 a net:Instance.
?net2 net:type net:entity.
?net2 net:has_structure ?req.
?net2 net:has_node ?uw2.
?net2 net:has_entity ?actorObject.
# net3: entity (target)
?net3 a net:Instance.
?net3 net:type net:entity.
?net3 net:has_structure ?req.
?net3 net:has_node ?uw3.
?net3 net:has_entity ?targetObject.
# condition: agt(net1, net2) et obj(net1, net3)
?uw1 unl:agt ?uw2.
?uw1 unl:obj ?uw3.
# Label: Id
?uw1 unl:has_id ?uw1Id.
?uw2 unl:has_id ?uw2Id.
?uw3 unl:has_id ?uw3Id.
# URI (for Event Net)
cprm:Config_Parameters cprm:netURI ?netURI.
net:event rdfs:label ?eventLabel.
BIND (concat( ?netURI, ?eventLabel, '_') AS ?n1).
BIND (concat(?n1, ?uw1Id, '-', ?uw2Id, '-', ?uw3Id) AS ?n2).
BIND (uri(?n2) AS ?newNet).
}""" ;
sh:order 2.9 ;
.
cts:compose-entity-modlist-1 cts:compose-entity-modlist-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#>
...@@ -729,6 +948,50 @@ WHERE { ...@@ -729,6 +948,50 @@ WHERE {
}""" ; }""" ;
sh:order 2.6 ; sh:order 2.6 ;
. .
cts:create-abstraction-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#>
# -- Create Feature net
CONSTRUCT {
?newNet a net:Instance.
?newNet net:type net:abstraction.
?newNet net:has_structure ?req.
?newNet net:has_node ?uw1.
?newNet net:abstractionClass ?abstractionClass.
?newNet net:concept ?concept1.
}
WHERE {
# Absraction (from System Ontology)
?abstraction rdf:type fprm:System_Abstraction.
?abstraction fprm:class ?abstractionClass.
?abstraction fprm:restriction ?abstractionRestriction.
# 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.
# Label(s) / URI
?uw1 rdfs:label ?uw1Label.
?uw1 unl:has_id ?uw1Id.
cprm:Config_Parameters cprm:netURI ?netURI
BIND (strbefore(?uw1Label, '(') AS ?concept1).
BIND (concat( ?netURI, ?abstractionClass, '_') AS ?s1).
BIND (concat(?s1, ?uw1Id) AS ?s2).
BIND (uri(?s2) AS ?newNet).
# Filter
FILTER ( regex(str(?uw1Label),str(?abstractionRestriction)) ).
}""" ;
sh:order 2.1 ;
.
cts:create-entity-net cts:create-entity-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#>
...@@ -830,6 +1093,63 @@ WHERE { ...@@ -830,6 +1093,63 @@ WHERE {
}""" ; }""" ;
sh:order 2.1 ; sh:order 2.1 ;
. .
cts:create-verb-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#>
# -- Create Entity net
CONSTRUCT {
# Object: entity
?newVerb a net:Object.
?newVerb net:objectType sys:Verb.
?newVerb net:node ?uw1.
?newVerb net:verbClass ?verbClass.
?newVerb net:concept ?concept1.
# Net: Entity
?newNet a net:Instance.
?newNet net:type net:verb.
?newNet net:has_structure ?req.
?newNet net:has_node ?uw1.
?newNet net:has_verb ?newVerb.
}
WHERE {
# Verb (from System Ontology)
?verb rdf:type fprm:System_Verb.
?verb fprm:class ?verbClass.
?verb fprm:restriction ?verbRestriction.
# 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
?uw1 rdfs:label ?uw1Label.
FILTER ( regex(str(?uw1Label),str(?verbRestriction)) ).
# Label: Id, concept
?uw1 unl:has_id ?uw1Id.
BIND (strbefore(?uw1Label, '(') AS ?concept1).
# URI (for Entity Object)
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:objectRef ?objectRef.
BIND (concat( ?netURI, ?objectRef) AS ?e1).
BIND (concat(?e1, ?uw1Id) AS ?e2).
BIND (uri(?e2) AS ?newVerb).
# URI (for Entity Net)
cprm:Config_Parameters cprm:netURI ?netURI.
BIND (concat( ?netURI, ?verbClass, '_') AS ?n1).
BIND (concat(?n1, ?uw1Id) AS ?n2).
BIND (uri(?n2) AS ?newNet).
}""" ;
sh:order 2.1 ;
.
cts:define-uw-id cts:define-uw-id
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#>
...@@ -883,6 +1203,13 @@ cts:entity_extraction ...@@ -883,6 +1203,13 @@ cts:entity_extraction
sh:rule cts:typify-modlist-entity ; sh:rule cts:typify-modlist-entity ;
sh:rule cts:typify-modlist-feature ; sh:rule cts:typify-modlist-feature ;
. .
cts:event_extraction
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:label "property extraction" ;
rdfs:subClassOf cts:net_extension ;
sh:rule cts:compose-agt-verb-obj-as-event ;
.
cts:extend-mod-list cts:extend-mod-list
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#>
...@@ -933,11 +1260,14 @@ cts:generation ...@@ -933,11 +1260,14 @@ cts:generation
rdf:type sh:NodeShape ; rdf:type sh:NodeShape ;
rdfs:label "generation" ; rdfs:label "generation" ;
rdfs:subClassOf cts:Transduction_Schemes ; rdfs:subClassOf cts:Transduction_Schemes ;
sh:rule cts:add-abstraction-classes ;
sh:rule cts:add-conjunctive-entity-classes ; sh:rule cts:add-conjunctive-entity-classes ;
sh:rule cts:add-disjunctive-entity-classes ; sh:rule cts:add-disjunctive-entity-classes ;
sh:rule cts:add-entity-classes ; sh:rule cts:add-entity-classes ;
sh:rule cts:add-event-classes ;
sh:rule cts:add-feature-classes ; sh:rule cts:add-feature-classes ;
sh:rule cts:add-list-of-entity-classes ; sh:rule cts:add-list-of-entity-classes ;
sh:rule cts:add-verb-classes ;
sh:rule cts:complement-list-of-entity-classes ; sh:rule cts:complement-list-of-entity-classes ;
. .
cts:init-mod-list cts:init-mod-list
...@@ -1144,12 +1474,6 @@ cts:preprocessing ...@@ -1144,12 +1474,6 @@ 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:property_extraction
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:label "property extraction" ;
rdfs:subClassOf cts:net_extension ;
.
cts:typify-modlist-entity 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#>
...@@ -1226,3 +1550,10 @@ WHERE { ...@@ -1226,3 +1550,10 @@ WHERE {
}""" ; }""" ;
sh:order 2.5 ; sh:order 2.5 ;
. .
cts:verb_extraction
rdf:type owl:Class ;
rdf:type sh:NodeShape ;
rdfs:label "verb extraction" ;
rdfs:subClassOf cts:net_extension ;
sh:rule cts:add-verb-classes ;
.
...@@ -20,18 +20,28 @@ fprm:System_Abstraction ...@@ -20,18 +20,28 @@ fprm:System_Abstraction
rdfs:comment "Parameters related to Abstraction (System Ontology)." ; rdfs:comment "Parameters related to Abstraction (System Ontology)." ;
rdfs:label "Abstraction" ; rdfs:label "Abstraction" ;
rdfs:subClassOf fprm:System_Ontology ; rdfs:subClassOf fprm:System_Ontology ;
fprm:class "Abstraction" ;
. .
fprm:System_Entity fprm:System_Entity
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:comment "Parameters related to Entity (System Ontology)." ; rdfs:comment "Parameters related to Entity (System Ontology)." ;
rdfs:label "Entity" ; rdfs:label "Entity" ;
rdfs:subClassOf fprm:System_Ontology ; rdfs:subClassOf fprm:System_Ontology ;
fprm:class "Entity" ;
.
fprm:System_Event
rdf:type owl:Class ;
rdfs:comment "Parameters related to Event (System Ontology)." ;
rdfs:label "event" ;
rdfs:subClassOf fprm:System_Ontology ;
fprm:class "Event" ;
. .
fprm:System_Feature fprm:System_Feature
rdf:type owl:Class ; rdf:type owl:Class ;
rdfs:comment "Parameters related to Feature (System Ontology)." ; rdfs:comment "Parameters related to Feature (System Ontology)." ;
rdfs:label "feature" ; rdfs:label "feature" ;
rdfs:subClassOf fprm:System_Ontology ; rdfs:subClassOf fprm:System_Ontology ;
fprm:class "Feature" ;
. .
fprm:System_Ontology fprm:System_Ontology
rdf:type owl:Class ; rdf:type owl:Class ;
...@@ -45,10 +55,12 @@ fprm:System_Verb ...@@ -45,10 +55,12 @@ fprm:System_Verb
rdfs:comment "Parameters related to Verb (System Ontology)." ; rdfs:comment "Parameters related to Verb (System Ontology)." ;
rdfs:label "verb" ; rdfs:label "verb" ;
rdfs:subClassOf fprm:System_Ontology ; rdfs:subClassOf fprm:System_Ontology ;
fprm:class "Verb" ;
. .
fprm:abstract_thing fprm:abstract_thing
rdf:type fprm:System_Abstraction ; rdf:type fprm:System_Abstraction ;
rdfs:label "abstractThing" ; rdfs:label "abstractThing" ;
fprm:class "abstract_thing" ;
fprm:restriction "icl>abstract_thing" ; fprm:restriction "icl>abstract_thing" ;
. .
fprm:class fprm:class
...@@ -79,8 +91,8 @@ fprm:restriction ...@@ -79,8 +91,8 @@ fprm:restriction
fprm:system_action_verb fprm:system_action_verb
rdf:type fprm:System_Verb ; rdf:type fprm:System_Verb ;
rdfs:label "actionVerb" ; rdfs:label "actionVerb" ;
fprm:restriction "icl>make(icl>do)" ; fprm:class "action_verb" ;
fprm:restriction "icl>set(icl>do)" ; fprm:restriction "icl>do" ;
. .
fprm:system_agent fprm:system_agent
rdf:type fprm:System_Entity ; rdf:type fprm:System_Entity ;
...@@ -92,6 +104,7 @@ fprm:system_agent ...@@ -92,6 +104,7 @@ fprm:system_agent
fprm:system_attributive_verb fprm:system_attributive_verb
rdf:type fprm:System_Verb ; rdf:type fprm:System_Verb ;
rdfs:label "attributiveVerb" ; rdfs:label "attributiveVerb" ;
fprm:class "attrbutive_verb" ;
fprm:restriction "icl>be" ; fprm:restriction "icl>be" ;
. .
fprm:system_component fprm:system_component
......
...@@ -37,7 +37,8 @@ f_param_file = "ontology-parameters.ttl" ...@@ -37,7 +37,8 @@ f_param_file = "ontology-parameters.ttl"
# Dev Tests # Dev Tests
base_uri = "https://unsel.tetras-libre.fr/tenet/working" base_uri = "https://unsel.tetras-libre.fr/tenet/working"
corpus_1 = "CCTP-SRSA-IP-20210831-R300/" req_110 = "CCTP-SRSA-IP-20210831-R110/"
req_300 = "CCTP-SRSA-IP-20210831-R300/"
corpus_40 = "CCTP-SRSA-IP-20210831/" corpus_40 = "CCTP-SRSA-IP-20210831/"
...@@ -160,8 +161,9 @@ def run(corpus, output_ref, output_file): ...@@ -160,8 +161,9 @@ def run(corpus, output_ref, output_file):
#============================================================================== #==============================================================================
if __name__ == '__main__': if __name__ == '__main__':
run(corpus_1, 'CCTP1', 'output1.ttl') run(req_300, 'R300', 'output300.ttl')
run(corpus_40, 'CCTP40', 'output40.ttl') run(req_110, 'R110', 'output110.ttl')
run(corpus_40, 'CCTP-Corpus-40', 'output40.ttl')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment