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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tetras MARS
tenet
Commits
477b33c7
Commit
477b33c7
authored
3 years ago
by
Aurélien Lamercerie
Browse files
Options
Downloads
Patches
Plain Diff
Update CTS to improve instantiation of composite list
parent
04790189
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
config/transduction-schemes.ttl
+27
-36
27 additions, 36 deletions
config/transduction-schemes.ttl
with
27 additions
and
36 deletions
config/transduction-schemes.ttl
+
27
−
36
View file @
477b33c7
...
...
@@ -403,8 +403,8 @@ cts:batch_execution
sh:
rule
cts:
init-conjunctive-list-net
;
sh:
rule
cts:
init-disjunctive-list-net
;
sh:
rule
cts:
instantiate-atom-net
;
sh:
rule
cts:
instantiate-c
lass
list-by-extension-1
;
sh:
rule
cts:
instantiate-c
lass
list-by-extension-2
;
sh:
rule
cts:
instantiate-c
omposite-in-
list-by-extension-1
;
sh:
rule
cts:
instantiate-c
omposite-in-
list-by-extension-2
;
sh:
rule
cts:
link-to-scope-entry
;
sh:
rule
cts:
specify-axis-of-list-net
;
.
...
...
@@ -639,7 +639,7 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Compose an atom net and a list net (with distinct item classes)
CONSTRUCT {
# Object:
entity 2
# Object:
composite (A)
?newObject12 a net:Object.
?newObject12 net:objectType net:composite.
?newObject12 net:has_node ?uw1, ?uw2.
...
...
@@ -647,7 +647,7 @@ CONSTRUCT {
# -- TODO --- ?newObject12 net:has_parent_class ?net1Class.
?newObject12 net:has_concept ?subConceptA.
?newObject12 net:has_feature ?net2ItemA.
# Object:
entity 3
# Object:
composite (B)
?newObject13 a net:Object.
?newObject13 net:objectType net:composite.
?newObject13 net:has_node ?uw1, ?uw3.
...
...
@@ -1112,8 +1112,7 @@ cts:entity_extraction
sh:
rule
cts:
extend-list-net
;
sh:
rule
cts:
init-conjunctive-list-net
;
sh:
rule
cts:
instantiate-atom-net
;
sh:
rule
cts:
instantiate-classlist-by-extension-1
;
sh:
rule
cts:
instantiate-classlist-by-extension-2
;
sh:
rule
cts:
instantiate-composite-in-list-by-extension-2
;
.
cts:
event_extraction
rdf:
type
owl:
Class
;
...
...
@@ -1193,7 +1192,7 @@ WHERE {
?atomObject1 net:has_parent_class ?atomParentClass.
?atomObject1 net:has_concept ?atomConcept.
# Filter: entity not present in a class list
FILTER NOT EXISTS { ?net2 net:
c
lass
2
?atom
Concept
}
FILTER NOT EXISTS { ?net2 net:
has_subC
lass ?atom
Object1
}
# URI: class
sys:Structure sys:has_frame_uri ?frameURI.
BIND (concat( ?frameURI, ?atomParentClass) AS ?s1).
...
...
@@ -1402,7 +1401,7 @@ WHERE {
}"""
;
sh:
order
2.1
2
;
.
cts:
instantiate-c
lass
list-by-extension-1
cts:
instantiate-c
omposite-in-
list-by-extension-1
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#>
...
...
@@ -1415,30 +1414,23 @@ 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#>
# -- Instantiate
entities in class
list by extension of instances
(2)
# -- Instantiate
composite in
list by extension of instances
from parent element
CONSTRUCT {
?subObject2 net:has_instance ?
i
nstance
Name1
.
?subObject2 net:has_instance ?
parentI
nstance.
}
WHERE {
# net1: atom with instance
?net1 a net:Instance.
?net1 net:type net:atom.
?net1 net:has_structure ?sameReq.
?net1 net:has_atom ?sameObject1.
?sameObject1 net:has_instance ?instanceName1.
# net2: entity classList
# net2: list of composite items
?net2 a net:Instance.
?net2 net:type net:entity_class_list.
?net2 net:entityClass ?sameClass.
?net2 net:has_structure ?sameReq.
?net2 net:has_mainClass ?sameObject1.
?net2 net:has_mainClass ?parentObject.
?parentObject net:has_instance ?parentInstance.
?net2 net:has_subClass ?subObject2.
# Filter
FILTER NOT EXISTS { ?subObject2 net:has_instance ?
i
nstance
Name2
} .
FILTER NOT EXISTS { ?subObject2 net:has_instance ?
anyI
nstance } .
}"""
;
sh:
order
2.3
4
;
sh:
order
2.3
4
1
;
.
cts:
instantiate-c
lass
list-by-extension-2
cts:
instantiate-c
omposite-in-
list-by-extension-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#>
...
...
@@ -1453,29 +1445,28 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Instantiate entities in class list by extension of instances (2)
CONSTRUCT {
?
s
ubObject
2
net:has_instance ?
i
nstance
Name1
.
?
net2S
ubObject net:has_instance ?
parentI
nstance.
}
WHERE {
# net
2
:
entity classList w
it
h
i
nstance
# net
1
:
list of compos
it
e
i
tems
?net1 a net:Instance.
?net1 net:type net:entity_class_list.
?net1 net:entityClass ?sameClass.
?net1 net:has_structure ?sameReq.
?net1 net:has_subClass ?entityObject1.
?entityObject1 net:has_concept ?sameEntity.
?entityObject1 net:has_instance ?instanceName1.
# net2: another entity classList
?net1 net:has_mainClass ?parentObject.
?parentObject net:has_instance ?parentInstance.
?net1 net:has_subClass ?net1SubObject.
?net1SubObject net:has_concept ?sameEntity.
# net2: another list
?net2 a net:Instance.
?net2 net:type net:entity_class_list.
?net2 net:entityClass ?sameClass.
?net2 net:has_structure ?sameReq.
?net2 net:has_mainClass ?
entity
Object
2
.
?
entity
Object
2
net:has_concept ?sameEntity.
?net2 net:has_subClass ?
s
ubObject
2
.
?net2 net:has_mainClass ?
net2Main
Object.
?
net2Main
Object net:has_concept ?sameEntity.
?net2 net:has_subClass ?
net2S
ubObject.
# Filter
FILTER NOT EXISTS { ?
s
ubObject
2
net:has_instance ?
i
nstance
Name2
} .
FILTER NOT EXISTS { ?
net2S
ubObject net:has_instance ?
anyI
nstance } .
}"""
;
sh:
order
2.3
5
;
sh:
order
2.3
42
;
.
cts:
link-to-scope-entry
rdf:
type
sh:
SPARQLRule
;
...
...
This diff is collapsed.
Click to expand it.
Aurélien Lamercerie
@alam
mentioned in issue
#8 (closed)
·
3 years ago
mentioned in issue
#8 (closed)
mentioned in issue #8
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