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
3e5dd397
Commit
3e5dd397
authored
3 years ago
by
Aurélien Lamercerie
Browse files
Options
Downloads
Patches
Plain Diff
harmonize CTS for abstraction
parent
ebaf1d51
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/transduction-schemes.ttl
+44
-22
44 additions, 22 deletions
config/transduction-schemes.ttl
prepare_work_data.py
+1
-1
1 addition, 1 deletion
prepare_work_data.py
with
45 additions
and
23 deletions
config/transduction-schemes.ttl
+
44
−
22
View file @
3e5dd397
...
@@ -57,10 +57,12 @@ CONSTRUCT {
...
@@ -57,10 +57,12 @@ CONSTRUCT {
WHERE {
WHERE {
# net1: feature
# net1: feature
?net1 a net:Instance.
?net1 a net:Instance.
?net1 net:type net:abstraction.
?net1 net:type net:atom.
?net1 net:atomOf sys:Abstraction.
?net1 net:has_structure ?req.
?net1 net:has_structure ?req.
?net1 net:abstractionClass ?abstractionClass.
?net1 net:has_atom ?atomObject1.
?net1 net:has_concept ?abstractionConcept.
?atomObject1 net:has_parent_class ?abstractionClass.
?atomObject1 net:has_concept ?abstractionConcept.
# Filter: entity not present in a class list
# Filter: entity not present in a class list
FILTER NOT EXISTS { ?net2 net:class2 ?abstractionConcept}
FILTER NOT EXISTS { ?net2 net:class2 ?abstractionConcept}
# URI: class
# URI: class
...
@@ -1328,14 +1330,27 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
...
@@ -1328,14 +1330,27 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Create Feature net
# -- Create Feature net
CONSTRUCT {
CONSTRUCT {
# Atom Object
?newObject a net:Object.
?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.
# Atom Net
?newNet a net:Instance.
?newNet a net:Instance.
?newNet net:type net:abstraction.
?newNet net:type net:atom.
?newNet net:atomOf ?atomMother.
?newNet net:has_structure ?req.
?newNet net:has_structure ?req.
?newNet net:has_node ?uw1.
?newNet net:has_node ?uw1.
?newNet net:abstractionClass ?abstractionClass.
?newNet net:has_atom ?newObject.
?newNet net:has_concept ?concept1.
}
}
WHERE {
WHERE {
# Atom Description (from System Ontology)
?targetClass rdfs:subClassOf sys:Abstraction.
?targetClass sys:has_mother_class ?atomMother.
?targetClass sys:is_class ?atomClass.
?targetClass sys:has_restriction ?restriction.
# Absraction (from System Ontology)
# Absraction (from System Ontology)
?abstraction rdf:type fprm:System_Abstraction.
?abstraction rdf:type fprm:System_Abstraction.
?abstraction fprm:class ?abstractionClass.
?abstraction fprm:class ?abstractionClass.
...
@@ -1344,16 +1359,23 @@ WHERE {
...
@@ -1344,16 +1359,23 @@ WHERE {
?uw1 rdf:type unl:UW_Occurrence.
?uw1 rdf:type unl:UW_Occurrence.
?uw1 unl:is_substructure_of ?req.
?uw1 unl:is_substructure_of ?req.
# ------ ?uw1 unl:is_occurrence_of ?lexTrg.
# ------ ?uw1 unl:is_occurrence_of ?lexTrg.
#
Label(s) / URI
#
Filter on label
?uw1 rdfs:label ?uw1Label.
?uw1 rdfs:label ?uw1Label.
FILTER ( regex(str(?uw1Label),str(?restriction)) ).
# Label: Id, concept
?uw1 unl:has_id ?uw1Id.
?uw1 unl:has_id ?uw1Id.
# URI (for Atom Object)
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:objectRef ?objectRef.
BIND (concat( ?netURI, ?objectRef) AS ?o1).
BIND (concat(?o1, ?uw1Id) AS ?o2).
BIND (uri(?o2) AS ?newObject).
# URI (for Atom Net)
cprm:Config_Parameters cprm:netURI ?netURI
cprm:Config_Parameters cprm:netURI ?netURI
BIND (strbefore(?uw1Label, '(') AS ?concept1).
BIND (strbefore(?uw1Label, '(') AS ?concept1).
BIND (concat( ?netURI, ?a
bstraction
Class, '_') AS ?s1).
BIND (concat( ?netURI, ?a
tom
Class, '_') AS ?s1).
BIND (concat(?s1, ?uw1Id) AS ?s2).
BIND (concat(?s1, ?uw1Id) AS ?s2).
BIND (uri(?s2) AS ?newNet).
BIND (uri(?s2) AS ?newNet).
# Filter
FILTER ( regex(str(?uw1Label),str(?abstractionRestriction)) ).
}"""
;
}"""
;
sh:
order
2.1
;
sh:
order
2.1
;
.
.
...
@@ -1406,10 +1428,10 @@ WHERE {
...
@@ -1406,10 +1428,10 @@ WHERE {
# URI (for Atom Object)
# URI (for Atom Object)
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:objectRef ?objectRef.
cprm:Config_Parameters cprm:objectRef ?objectRef.
BIND (concat( ?netURI, ?objectRef) AS ?
e
1).
BIND (concat( ?netURI, ?objectRef) AS ?
o
1).
BIND (concat(?
e
1, ?uw1Id) AS ?
e
2).
BIND (concat(?
o
1, ?uw1Id) AS ?
o
2).
BIND (uri(?
e
2) AS ?newObject).
BIND (uri(?
o
2) AS ?newObject).
# URI (for
Entity
Net)
# URI (for
Atom
Net)
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:netURI ?netURI.
BIND (concat( ?netURI, ?atomClass, '_') AS ?n1).
BIND (concat( ?netURI, ?atomClass, '_') AS ?n1).
BIND (concat(?n1, ?uw1Id) AS ?n2).
BIND (concat(?n1, ?uw1Id) AS ?n2).
...
@@ -1432,14 +1454,14 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
...
@@ -1432,14 +1454,14 @@ PREFIX fprm: <https://unsel.tetras-libre.fr/tenet/frame/parameters#>
# -- Create Feature net
# -- Create Feature net
CONSTRUCT {
CONSTRUCT {
# Object
: atom (feature)
#
Atom
Object
?newObject a net:Object.
?newObject a net:Object.
?newObject net:objectType ?atomMother.
?newObject net:objectType ?atomMother.
?newObject net:has_node ?uw1.
?newObject net:has_node ?uw1.
?newObject net:has_mother_class ?atomMother.
?newObject net:has_mother_class ?atomMother.
?newObject net:has_parent_class ?
feature
Class.
?newObject net:has_parent_class ?
atom
Class.
?newObject net:concept ?concept1.
?newObject net:
has_
concept ?concept1.
#
Net: Feature
#
Atom Net
?newNet a net:Instance.
?newNet a net:Instance.
?newNet net:type net:atom.
?newNet net:type net:atom.
?newNet net:atomOf ?atomMother.
?newNet net:atomOf ?atomMother.
...
@@ -1466,10 +1488,10 @@ WHERE {
...
@@ -1466,10 +1488,10 @@ WHERE {
# URI (for Atom Object)
# URI (for Atom Object)
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:objectRef ?objectRef.
cprm:Config_Parameters cprm:objectRef ?objectRef.
BIND (concat( ?netURI, ?objectRef) AS ?
a
1).
BIND (concat( ?netURI, ?objectRef) AS ?
o
1).
BIND (concat(?
a
1, ?uw1Id) AS ?
a
2).
BIND (concat(?
o
1, ?uw1Id) AS ?
o
2).
BIND (uri(?
a
2) AS ?newObject).
BIND (uri(?
o
2) AS ?newObject).
# URI (for
Entity
Net)
# URI (for
Atom
Net)
cprm:Config_Parameters cprm:netURI ?netURI.
cprm:Config_Parameters cprm:netURI ?netURI.
BIND (concat( ?netURI, ?atomClass, '_') AS ?n1).
BIND (concat( ?netURI, ?atomClass, '_') AS ?n1).
BIND (concat(?n1, ?uw1Id) AS ?n2).
BIND (concat(?n1, ?uw1Id) AS ?n2).
...
...
This diff is collapsed.
Click to expand it.
prepare_work_data.py
+
1
−
1
View file @
3e5dd397
...
@@ -203,7 +203,7 @@ if __name__ == '__main__':
...
@@ -203,7 +203,7 @@ if __name__ == '__main__':
#run(req_100, 'R100', 'output100.ttl')
#run(req_100, 'R100', 'output100.ttl')
#run(req_200, 'R200', 'output200.ttl')
#run(req_200, 'R200', 'output200.ttl')
run
(
req_300
,
'
R300b
'
,
'
output300b.ttl
'
)
run
(
req_300
,
'
R300b
'
,
'
output300b.ttl
'
)
#
run(corpus_40, 'Corpus-CCTP-40', 'outputCCTP40.ttl')
run
(
corpus_40
,
'
Corpus-CCTP-40
b
'
,
'
outputCCTP40
b
.ttl
'
)
#run(corpus_ERTMS, 'Corpus-ERTMS', 'outputERTMS.ttl')
#run(corpus_ERTMS, 'Corpus-ERTMS', 'outputERTMS.ttl')
...
...
This diff is collapsed.
Click to expand it.
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