Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
tenet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tetras MARS
tenet
Commits
0e6aeed5
Commit
0e6aeed5
authored
3 years ago
by
Aurélien Lamercerie
Browse files
Options
Downloads
Patches
Plain Diff
Fix error with entity names
parent
2b1e1e56
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/semantic-net.ttl
+15
-0
15 additions, 0 deletions
config/semantic-net.ttl
config/transduction-schemes.ttl
+142
-64
142 additions, 64 deletions
config/transduction-schemes.ttl
with
157 additions
and
64 deletions
config/semantic-net.ttl
+
15
−
0
View file @
0e6aeed5
...
@@ -85,6 +85,21 @@ net:featureClass
...
@@ -85,6 +85,21 @@ net:featureClass
rdfs:
label
"feature class"
;
rdfs:
label
"feature class"
;
rdfs:
subPropertyOf
net:
value
;
rdfs:
subPropertyOf
net:
value
;
.
.
net:
listGuiding
rdf:
type
rdf:
Property
;
rdfs:
label
"Guiding connector of a list (or, and)"
;
rdfs:
subPropertyOf
net:
value
;
.
net:
modCat1
rdf:
type
rdf:
Property
;
rdfs:
label
"Modality Category (level 1)"
;
rdfs:
subPropertyOf
net:
value
;
.
net:
modCat2
rdf:
type
rdf:
Property
;
rdfs:
label
"Modality Category (level 2)"
;
rdfs:
subPropertyOf
net:
value
;
.
net:
mod_list
net:
mod_list
rdf:
type
owl:
Class
;
rdf:
type
owl:
Class
;
rdfs:
label
"modList"
;
rdfs:
label
"modList"
;
...
...
This diff is collapsed.
Click to expand it.
config/transduction-schemes.ttl
+
142
−
64
View file @
0e6aeed5
...
@@ -24,7 +24,7 @@ cts:Transduction_Schemes
...
@@ -24,7 +24,7 @@ cts:Transduction_Schemes
rdfs:
label
"Transduction Schemes"
;
rdfs:
label
"Transduction Schemes"
;
rdfs:
subClassOf
owl:
Thing
;
rdfs:
subClassOf
owl:
Thing
;
.
.
cts:
add-disjunctive-entity-classes
-1
cts:
add-disjunctive-entity-classes
rdf:
type
sh:
SPARQLRule
;
rdf:
type
sh:
SPARQLRule
;
rdfs:
label
"add-disjunctive-entity-classes"
;
rdfs:
label
"add-disjunctive-entity-classes"
;
sh:
construct
"""PREFIX owl: <http://www.w3.org/2002/07/owl#>
sh:
construct
"""PREFIX owl: <http://www.w3.org/2002/07/owl#>
...
@@ -54,6 +54,8 @@ WHERE {
...
@@ -54,6 +54,8 @@ WHERE {
?net1 net:node ?uw2.
?net1 net:node ?uw2.
?net1 net:node ?uw3.
?net1 net:node ?uw3.
?net1 net:class1 ?mainEntity.
?net1 net:class1 ?mainEntity.
?net1 net:class2 ?subEntity2.
?net1 net:class2 ?subEntity3.
# extension: disjunction of UW
# extension: disjunction of UW
?uw2 unl:or ?uw3.
?uw2 unl:or ?uw3.
# Label(s) / URI
# Label(s) / URI
...
@@ -62,8 +64,10 @@ WHERE {
...
@@ -62,8 +64,10 @@ WHERE {
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
BIND (concat(?concept2, '-or-', ?concept3) AS ?concept23)
BIND (concat(?concept2, '-or-', ?concept3) AS ?concept23)
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2).
FILTER ( STRSTARTS(?subEntity2, ?concept2) ).
BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3).
FILTER ( STRSTARTS(?subEntity3, ?concept3) ).
# -- old --- BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2).
# -- old --- BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3).
BIND (concat(?concept23, '_', ?mainEntity) AS ?subEntity23).
BIND (concat(?concept23, '_', ?mainEntity) AS ?subEntity23).
cprm:Config_Parameters cprm:baseURI ?baseURI.
cprm:Config_Parameters cprm:baseURI ?baseURI.
fprm:System_Ontology fprm:frameURI ?frameURI.
fprm:System_Ontology fprm:frameURI ?frameURI.
...
@@ -76,12 +80,12 @@ WHERE {
...
@@ -76,12 +80,12 @@ WHERE {
BIND (uri(?s3) AS ?subEntity2Uri).
BIND (uri(?s3) AS ?subEntity2Uri).
BIND (uri(?s4) AS ?subEntity3Uri).
BIND (uri(?s4) AS ?subEntity3Uri).
BIND (uri(?s5) AS ?subEntity23Uri).
BIND (uri(?s5) AS ?subEntity23Uri).
FILTER NOT EXISTS { ?net2 net:class2 ?mainEntity }.
# --old ---
FILTER NOT EXISTS { ?net2 net:class2 ?mainEntity }.
#FILTER NOT EXISTS { ?subEntity23Uri owl:equivalentClass ?c }.
#
--old ---
FILTER NOT EXISTS { ?subEntity23Uri owl:equivalentClass ?c }.
}"""
;
}"""
;
sh:
order
"20
4
"
^^
xsd:
decimal
;
sh:
order
"20
3
"
^^
xsd:
decimal
;
.
.
cts:
add-disjunctive-entity-classes-2
cts:
add-disjunctive-entity-classes-2
--old
rdf:
type
sh:
SPARQLRule
;
rdf:
type
sh:
SPARQLRule
;
rdfs:
label
"add-disjunctive-entity-classes"
;
rdfs:
label
"add-disjunctive-entity-classes"
;
sh:
construct
"""PREFIX owl: <http://www.w3.org/2002/07/owl#>
sh:
construct
"""PREFIX owl: <http://www.w3.org/2002/07/owl#>
...
@@ -110,28 +114,28 @@ WHERE {
...
@@ -110,28 +114,28 @@ WHERE {
?net1 net:node ?uw2.
?net1 net:node ?uw2.
?net1 net:node ?uw3.
?net1 net:node ?uw3.
?net1 net:class1 ?mainEntity1.
?net1 net:class1 ?mainEntity1.
?net1 net:class2 ?subEntity2.
?net1 net:class3 ?subEntity3.
# net2: entity class list
# net2: entity class list
?net2 a net:Instance.
?net2 a net:Instance.
?net2 net:type net:entity_class_list.
?net2 net:type net:entity_class_list.
?net2 net:entityClass ?entityClass.
?net2 net:entityClass ?entityClass.
?net2 net:class1 ?mainEntity2.
?net2 net:class1 ?mainEntity2.
?net2 net:class2 ?subEntity
Concep
t2.
?net2 net:class2 ?subEntity
Ne
t2.
# extension: disjunction of UW
# extension: disjunction of UW
?uw2 unl:or ?uw3.
?uw2 unl:or ?uw3.
# Label(s) / URI
# Label(s) / URI
BIND (concat(?mainEntity1, '_', ?mainEntity2) AS ?mainEntity).
?uw2 rdfs:label ?uw2Label.
?uw2 rdfs:label ?uw2Label.
?uw3 rdfs:label ?uw3Label.
?uw3 rdfs:label ?uw3Label.
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
BIND (concat(?concept2, '-or-', ?concept3) AS ?concept23)
BIND (concat(?subEntity2, '-or-', ?subEntity3) AS ?concept23).
BIND (concat(?concept2, '_', ?mainEntity1) AS ?subEntity2).
FILTER ( ?concept2 = ?subEntity2 )
BIND (concat(?concept3, '_', ?mainEntity1) AS ?subEntity3).
FILTER ( ?concep3 = ?subEntity3 )
# -- old --- BIND (concat(?concept2, '_', ?mainEntity1) AS ?subEntity2).
# -- old --- BIND (concat(?concept3, '_', ?mainEntity1) AS ?subEntity3).
BIND (concat(?concept23, '_', ?mainEntity1) AS ?subEntity23).
BIND (concat(?concept23, '_', ?mainEntity1) AS ?subEntity23).
cprm:Config_Parameters cprm:baseURI ?baseURI.
BIND (concat(?s1, '_', ?mainEntity1) AS ?s2).
fprm:System_Ontology fprm:frameURI ?frameURI.
BIND (concat( ?frameURI, ?entityClass) AS ?s1).
BIND (concat(?s1, '_', ?mainEntity) AS ?s2).
BIND (concat(?s1, '_', ?subEntity2) AS ?s3).
BIND (concat(?s1, '_', ?subEntity2) AS ?s3).
BIND (concat(?s1, '_', ?subEntity3) AS ?s4).
BIND (concat(?s1, '_', ?subEntity3) AS ?s4).
BIND (concat(?s1, '_', ?subEntity23) AS ?s5).
BIND (concat(?s1, '_', ?subEntity23) AS ?s5).
...
@@ -139,10 +143,9 @@ WHERE {
...
@@ -139,10 +143,9 @@ WHERE {
BIND (uri(?s3) AS ?subEntity2Uri).
BIND (uri(?s3) AS ?subEntity2Uri).
BIND (uri(?s4) AS ?subEntity3Uri).
BIND (uri(?s4) AS ?subEntity3Uri).
BIND (uri(?s5) AS ?subEntity23Uri).
BIND (uri(?s5) AS ?subEntity23Uri).
FILTER ( ?mainEntity1 = ?subEntityConcept2 ).
FILTER ( ?mainEntity1 = ?subEntityNet2).
#FILTER NOT EXISTS { ?subEntity23Uri owl:equivalentClass ?c }.
}"""
;
}"""
;
sh:
order
"
205
"
^^
xsd:
decimal
;
sh:
order
"
000
"
^^
xsd:
decimal
;
.
.
cts:
add-entity-classes
cts:
add-entity-classes
rdf:
type
sh:
SPARQLRule
;
rdf:
type
sh:
SPARQLRule
;
...
@@ -208,9 +211,9 @@ WHERE {
...
@@ -208,9 +211,9 @@ WHERE {
?net1 net:type net:entity_class_list.
?net1 net:type net:entity_class_list.
?net1 net:entityClass ?entityClass.
?net1 net:entityClass ?entityClass.
?net1 net:class1 ?mainEntity.
?net1 net:class1 ?mainEntity.
?net1 net:class2 ?
concept2
.
?net1 net:class2 ?
subEntity
.
# Label(s) / URI
# Label(s) / URI
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity).
# -- old ---
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity).
cprm:Config_Parameters cprm:baseURI ?baseURI.
cprm:Config_Parameters cprm:baseURI ?baseURI.
fprm:System_Ontology fprm:frameURI ?frameURI.
fprm:System_Ontology fprm:frameURI ?frameURI.
fprm:System_Entity rdfs:label ?entityLabel.
fprm:System_Entity rdfs:label ?entityLabel.
...
@@ -220,7 +223,7 @@ WHERE {
...
@@ -220,7 +223,7 @@ WHERE {
BIND (uri( ?s1) AS ?entityUri).
BIND (uri( ?s1) AS ?entityUri).
BIND (uri(?s2) AS ?mainEntityUri).
BIND (uri(?s2) AS ?mainEntityUri).
BIND (uri(?s3) AS ?subEntityUri).
BIND (uri(?s3) AS ?subEntityUri).
FILTER NOT EXISTS { ?net2 net:class2 ?mainEntity}
# -- old ---
FILTER NOT EXISTS { ?net2 net:class2 ?mainEntity}
}"""
;
}"""
;
sh:
order
"202"
^^
xsd:
decimal
;
sh:
order
"202"
^^
xsd:
decimal
;
.
.
...
@@ -271,8 +274,8 @@ CONSTRUCT {
...
@@ -271,8 +274,8 @@ CONSTRUCT {
?newNet net:entityClass ?entityClass.
?newNet net:entityClass ?entityClass.
?newNet net:featureClass ?featureClass.
?newNet net:featureClass ?featureClass.
?newNet net:class1 ?mainEntity.
?newNet net:class1 ?mainEntity.
?newNet net:class2 ?
concept
2.
?newNet net:class2 ?
subEntity
2.
?newNet net:class2 ?
concept
3.
?newNet net:class2 ?
subEntity
3.
}
}
WHERE {
WHERE {
# net1: entity
# net1: entity
...
@@ -286,26 +289,26 @@ WHERE {
...
@@ -286,26 +289,26 @@ WHERE {
?net2 net:type net:complement_mod_list.
?net2 net:type net:complement_mod_list.
?net2 net:node ?uw2.
?net2 net:node ?uw2.
?net2 net:node ?uw3.
?net2 net:node ?uw3.
?net2 net:
featureClass
?featureClass.
?net2 net:
modCat2
?featureClass.
?net2 net:concept ?subCo
mplemen
t.
# --old ---
?net2 net:concept ?subCo
ncep
t.
# Filter
# Filter
FILTER ( ?uw1 != ?uw3 ).
FILTER ( ?uw1 != ?uw3 ).
# condition: mod(net1, net2)
# condition: mod(net1, net2)
?uw1 unl:mod ?uw2.
?uw1 unl:mod ?uw2.
# UW: type UW-Occurrence and substructure of req sentence
# UW: type UW-Occurrence and substructure of req sentence
?uw1 rdf:type unl:UW_Occurrence.
# --old ---
?uw1 rdf:type unl:UW_Occurrence.
?uw2 rdf:type unl:UW_Occurrence.
# --old ---
?uw2 rdf:type unl:UW_Occurrence.
?uw3 rdf:type unl:UW_Occurrence.
# --old ---
?uw3 rdf:type unl:UW_Occurrence.
?uw1 unl:is_substructure_of ?req.
# --old ---
?uw1 unl:is_substructure_of ?req.
?uw2 unl:is_substructure_of ?req.
# --old ---
?uw2 unl:is_substructure_of ?req.
?uw3 unl:is_substructure_of ?req.
# --old ---
?uw3 unl:is_substructure_of ?req.
# Label(s) / URI
# Label(s) / URI
?uw2 rdfs:label ?uw2Label.
?uw2 rdfs:label ?uw2Label.
?uw3 rdfs:label ?uw3Label.
?uw3 rdfs:label ?uw3Label.
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
#
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2).
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2).
#
BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3).
BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3).
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:netURI ?netURI.
net:class_list rdfs:label ?classListLabel.
net:class_list rdfs:label ?classListLabel.
BIND (concat( ?netURI, ?classListLabel, '_') AS ?s1).
BIND (concat( ?netURI, ?classListLabel, '_') AS ?s1).
...
@@ -327,7 +330,7 @@ PREFIX req: <https://unsel.tetras-libre.fr/tenet/frame/requirement-ontology#>
...
@@ -327,7 +330,7 @@ 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
# -- Compose an Entity net and an Entity ModList net
(with distinct entity classes)
CONSTRUCT {
CONSTRUCT {
?newNet a net:Instance.
?newNet a net:Instance.
?newNet net:type net:entity_class_list.
?newNet net:type net:entity_class_list.
...
@@ -335,9 +338,10 @@ CONSTRUCT {
...
@@ -335,9 +338,10 @@ CONSTRUCT {
?newNet net:node ?uw2.
?newNet net:node ?uw2.
?newNet net:node ?uw3.
?newNet net:node ?uw3.
?newNet net:entityClass ?entityClass1.
?newNet net:entityClass ?entityClass1.
?newNet net:featureClass ?entityClass2.
?newNet net:class1 ?mainEntity.
?newNet net:class1 ?mainEntity.
?newNet net:class2 ?
concept
2.
?newNet net:class2 ?
subEntity
2.
?newNet net:class2 ?
concept
3.
?newNet net:class2 ?
subEntity
3.
}
}
WHERE {
WHERE {
# net1: agent
# net1: agent
...
@@ -346,38 +350,108 @@ WHERE {
...
@@ -346,38 +350,108 @@ WHERE {
?net1 net:node ?uw1.
?net1 net:node ?uw1.
?net1 net:entityClass ?entityClass1.
?net1 net:entityClass ?entityClass1.
?net1 net:concept ?mainEntity.
?net1 net:concept ?mainEntity.
# net2:
complem
ent modList
# net2: ent
ity
modList
?net2 a net:Instance.
?net2 a net:Instance.
?net2 net:type net:entity_mod_list.
?net2 net:type net:entity_mod_list.
?net2 net:modCat1 fprm:System_Entity.
?net2 net:modCat2 ?entityClass2.
?net2 net:node ?uw2.
?net2 net:node ?uw2.
?net2 net:node ?uw3.
?net2 net:node ?uw3.
?net2 net:entityClass ?entityClass2.
# --old --- ?net2 net:concept ?subConcept.
# -- old --- ?net2 net:entityClass ?entityClass2.
# Filter
# Filter
FILTER ( ?uw1 != ?uw3 ).
FILTER ( ?uw1 != ?uw3 ).
FILTER ( ?entityClass1 != ?entityClass2 ).
# condition: mod(net1, net2)
# condition: mod(net1, net2)
?uw1 unl:mod ?uw2.
?uw1 unl:mod ?uw2.
# UW: type UW-Occurrence and substructure of req sentence
# UW: type UW-Occurrence and substructure of req sentence
?uw1 rdf:type unl:UW_Occurrence.
# --old ---
?uw1 rdf:type unl:UW_Occurrence.
?uw2 rdf:type unl:UW_Occurrence.
# --old ---
?uw2 rdf:type unl:UW_Occurrence.
?uw3 rdf:type unl:UW_Occurrence.
# --old ---
?uw3 rdf:type unl:UW_Occurrence.
?uw1 unl:is_substructure_of ?req.
# --old ---
?uw1 unl:is_substructure_of ?req.
?uw2 unl:is_substructure_of ?req.
# --old ---
?uw2 unl:is_substructure_of ?req.
?uw3 unl:is_substructure_of ?req.
# --old ---
?uw3 unl:is_substructure_of ?req.
# Label(s) / URI
# Label(s) / URI
?uw2 rdfs:label ?uw2Label.
?uw2 rdfs:label ?uw2Label.
?uw3 rdfs:label ?uw3Label.
?uw3 rdfs:label ?uw3Label.
BIND (strbefore(?uw2Label, '(') AS ?concept2)
BIND (strbefore(?uw2Label, '(') AS ?concept2)
.
BIND (strbefore(?uw3Label, '(') AS ?concept3)
BIND (strbefore(?uw3Label, '(') AS ?concept3)
.
#
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2).
BIND (concat(?concept2, '_', ?mainEntity) AS ?subEntity2).
#
BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3).
BIND (concat(?concept3, '_', ?mainEntity) AS ?subEntity3).
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:netURI ?netURI.
net:class_list rdfs:label ?classListLabel.
net:class_list rdfs:label ?classListLabel.
BIND (concat( ?netURI, ?classListLabel, '_') AS ?s1).
BIND (concat( ?netURI, ?classListLabel, '_') AS ?s1).
BIND (concat(?s1, ?mainEntity, '-', ?
concept
2) AS ?s2).
BIND (concat(?s1, ?mainEntity, '-', ?
subEntity
2) AS ?s2).
BIND (uri(?s2) AS ?newNet).
BIND (uri(?s2) AS ?newNet).
}"""
;
}"""
;
sh:
order
"107"
^^
xsd:
decimal
;
sh:
order
"107"
^^
xsd:
decimal
;
.
.
cts:
compose-entity-modlist-3
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 same entity classes)
CONSTRUCT {
?newNet a net:Instance.
?newNet net:type net:entity_class_list.
?newNet net:node ?uw1.
?newNet net:node ?uw2.
?newNet net:node ?uw3.
?newNet net:entityClass ?entityClass1.
?newNet net:featureClass \"None\".
?newNet net:class1 ?mainEntity.
?newNet net:class2 ?subEntity2.
?newNet net:class2 ?subEntity3.
}
WHERE {
# net1: agent
?net1 a net:Instance.
?net1 net:type net:entity.
?net1 net:node ?uw1.
?net1 net:entityClass ?entityClass1.
?net1 net:concept ?mainEntity.
# net2: entity modList
?net2 a net:Instance.
?net2 net:type net:entity_mod_list.
?net2 net:modCat1 fprm:System_Entity.
?net2 net:modCat2 ?entityClass2.
?net2 net:node ?uw2.
?net2 net:node ?uw3.
# --old --- ?net2 net:concept ?subConcept.
# Filter
FILTER ( ?uw1 != ?uw3 ).
FILTER ( ?entityClass1 = ?entityClass2 ).
# condition: mod(net1, net2)
?uw1 unl:mod ?uw2.
# 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(s) / URI
?uw2 rdfs:label ?uw2Label.
?uw3 rdfs:label ?uw3Label.
BIND (strbefore(?uw2Label, '(') AS ?subEntity2)
BIND (strbefore(?uw3Label, '(') AS ?subEntity3)
cprm:Config_Parameters cprm:netURI ?netURI.
net:class_list rdfs:label ?classListLabel.
BIND (concat( ?netURI, ?classListLabel, '_') AS ?s1).
BIND (concat(?s1, ?mainEntity, '-', ?subEntity2) AS ?s2).
BIND (uri(?s2) AS ?newNet).
}"""
;
sh:
order
"108"
^^
xsd:
decimal
;
.
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#>
...
@@ -425,7 +499,8 @@ cts:dev_schemes
...
@@ -425,7 +499,8 @@ cts:dev_schemes
rdf:
type
sh:
NodeShape
;
rdf:
type
sh:
NodeShape
;
rdfs:
label
"dev schemes"
;
rdfs:
label
"dev schemes"
;
rdfs:
subClassOf
cts:
Transduction_Schemes
;
rdfs:
subClassOf
cts:
Transduction_Schemes
;
sh:
rule
cts:
test_1
;
sh:
rule
cts:
add-disjunctive-entity-classes-2--old
;
sh:
rule
cts:
extend-list-of-entity-classes--old
;
.
.
cts:
entity_extraction
cts:
entity_extraction
rdf:
type
owl:
Class
;
rdf:
type
owl:
Class
;
...
@@ -434,6 +509,7 @@ cts:entity_extraction
...
@@ -434,6 +509,7 @@ cts:entity_extraction
rdfs:
subClassOf
cts:
net_extension
;
rdfs:
subClassOf
cts:
net_extension
;
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:
create-entity-net
;
sh:
rule
cts:
create-entity-net
;
sh:
rule
cts:
extend-mod-list
;
sh:
rule
cts:
extend-mod-list
;
sh:
rule
cts:
init-mod-list
;
sh:
rule
cts:
init-mod-list
;
...
@@ -444,7 +520,7 @@ cts:entity_extraction_1
...
@@ -444,7 +520,7 @@ cts:entity_extraction_1
rdf:
type
cts:
entity_extraction
;
rdf:
type
cts:
entity_extraction
;
rdfs:
label
"entity extraction 1"
;
rdfs:
label
"entity extraction 1"
;
.
.
cts:
extend-list-of-entity-classes
cts:
extend-list-of-entity-classes
--old
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#>
...
@@ -468,12 +544,12 @@ WHERE {
...
@@ -468,12 +544,12 @@ WHERE {
?net1 net:type net:entity_class_list.
?net1 net:type net:entity_class_list.
?net1 net:entityClass ?entityClass.
?net1 net:entityClass ?entityClass.
?net1 net:class1 ?mainEntity1.
?net1 net:class1 ?mainEntity1.
?net1 net:class2 ?subEntity
Concept
1.
?net1 net:class2 ?subEntity1.
# net2: entity class list
# net2: entity class list
?net2 a net:Instance.
?net2 a net:Instance.
?net2 net:type net:entity_class_list.
?net2 net:type net:entity_class_list.
?net2 net:class1 ?mainEntity2.
?net2 net:class1 ?mainEntity2.
?net2 net:class2 ?subEntity
Concept
2.
?net2 net:class2 ?subEntity2.
# Label(s) / URI
# Label(s) / URI
BIND (concat(?mainEntity1, '_', ?mainEntity2) AS ?mainEntity).
BIND (concat(?mainEntity1, '_', ?mainEntity2) AS ?mainEntity).
BIND (concat(?subEntityConcept1, '_', ?mainEntity1) AS ?subEntity).
BIND (concat(?subEntityConcept1, '_', ?mainEntity1) AS ?subEntity).
...
@@ -486,9 +562,10 @@ WHERE {
...
@@ -486,9 +562,10 @@ WHERE {
BIND (uri( ?s1) AS ?entityUri).
BIND (uri( ?s1) AS ?entityUri).
BIND (uri(?s2) AS ?mainEntityUri).
BIND (uri(?s2) AS ?mainEntityUri).
BIND (uri(?s3) AS ?subEntityUri).
BIND (uri(?s3) AS ?subEntityUri).
FILTER ( ?mainEntity1 = ?subEntityConcept2 ).
# -- old --- FILTER ( ?mainEntity1 = ?subEntity2 ).
# -- old --- FILTER ( ?mainEntity1 != ?subEntity2 ).
}"""
;
}"""
;
sh:
order
"
203
"
^^
xsd:
decimal
;
sh:
order
"
000
"
^^
xsd:
decimal
;
.
.
cts:
extend-mod-list
cts:
extend-mod-list
rdf:
type
sh:
SPARQLRule
;
rdf:
type
sh:
SPARQLRule
;
...
@@ -506,7 +583,6 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
...
@@ -506,7 +583,6 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Extend a ModList net
# -- Extend a ModList net
CONSTRUCT {
CONSTRUCT {
?semNet net:node ?uw2.
?semNet net:node ?uw2.
?semNet net:concept ?concept1.
?semNet net:concept ?concept2.
?semNet net:concept ?concept2.
}
}
WHERE {
WHERE {
...
@@ -534,11 +610,10 @@ cts:generation
...
@@ -534,11 +610,10 @@ 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-disjunctive-entity-classes
-1
;
sh:
rule
cts:
add-disjunctive-entity-classes
;
sh:
rule
cts:
add-disjunctive-entity-classes-2
;
sh:
rule
cts:
add-disjunctive-entity-classes-2
--old
;
sh:
rule
cts:
add-entity-classes
;
sh:
rule
cts:
add-entity-classes
;
sh:
rule
cts:
add-list-of-entity-classes
;
sh:
rule
cts:
add-list-of-entity-classes
;
sh:
rule
cts:
extend-list-of-entity-classes
;
.
.
cts:
generation_1
cts:
generation_1
rdf:
type
cts:
generation
;
rdf:
type
cts:
generation
;
...
@@ -562,6 +637,7 @@ CONSTRUCT {
...
@@ -562,6 +637,7 @@ CONSTRUCT {
?semNet a net:Instance.
?semNet a net:Instance.
?semNet net:type net:mod_list.
?semNet net:type net:mod_list.
?semNet net:node ?uw1.
?semNet net:node ?uw1.
?semNet net:concept ?concept1.
}
}
WHERE {
WHERE {
# UW: type UW-Occurrence and substructure of req sentence
# UW: type UW-Occurrence and substructure of req sentence
...
@@ -668,7 +744,8 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
...
@@ -668,7 +744,8 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Typify a ModList net as Entity ModList
# -- Typify a ModList net as Entity ModList
CONSTRUCT {
CONSTRUCT {
?semNet net:type net:entity_mod_list.
?semNet net:type net:entity_mod_list.
?semNet net:entityClass ?entityClass.
?semNet net:modCat1 fprm:System_Entity.
?semNet net:modCat2 ?entityClass.
}
}
WHERE {
WHERE {
# Entity (from System Ontology)
# Entity (from System Ontology)
...
@@ -705,7 +782,8 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
...
@@ -705,7 +782,8 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Typify a ModList net as Feature ModList
# -- Typify a ModList net as Feature ModList
CONSTRUCT {
CONSTRUCT {
?semNet net:type net:complement_mod_list.
?semNet net:type net:complement_mod_list.
?semNet net:featureClass ?featureClass.
?semNet net:modCat1 fprm:System_Feature.
?semNet net:modCat2 ?featureClass.
}
}
WHERE {
WHERE {
# Entity Feature (from System Ontology)
# Entity Feature (from System Ontology)
...
...
This diff is collapsed.
Click to expand it.
Aurélien Lamercerie
@alam
mentioned in issue
#2 (closed)
·
3 years ago
mentioned in issue
#2 (closed)
mentioned in issue #2
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment