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
11c98985
Commit
11c98985
authored
Dec 8, 2022
by
Aurélien Lamercerie
Browse files
Options
Downloads
Patches
Plain Diff
Update CTR to create atom property net (to deal with reification)
parent
1620a076
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
structure/cts/amr_ctr/transduction/atomic_extraction.py
+14
-4
14 additions, 4 deletions
structure/cts/amr_ctr/transduction/atomic_extraction.py
tenet.log
+27
-27
27 additions, 27 deletions
tenet.log
with
41 additions
and
31 deletions
structure/cts/amr_ctr/transduction/atomic_extraction.py
+
14
−
4
View file @
11c98985
...
...
@@ -250,11 +250,21 @@ rule_set['create-atom-property-net-1'] = {
?outRelationEdge amr:hasAmrRole ?outRelationRole.}
"""
,
'
binding
'
:
"""
BIND (STRBEFORE(?predicateLabel,
'
-
'
) AS ?pName1).
BIND (IF (STRLEN(?pName1) > 0,
?pName1, ?predicateLabel) AS ?propertyName)
BIND (IF (STRLEN(?pName1) > 0,
CONCAT(?propertyName,
'
ing
'
), ?predicateLabel) AS ?propertyName01)
BIND (IF (STRLEN(?pName1) > 0,
CONCAT(?propertyName,
'
-by
'
), ?predicateLabel) AS ?propertyName10)
BIND (IF (STRLEN(?pName1) > 0,
CONCAT(?propertyName,
'
-of
'
), ?predicateLabel) AS ?propertyName12)
# -- New Property Name
BIND (STRBEFORE(?predicateLabel,
'
-
'
) AS ?propertyName).
BIND (CONCAT(?propertyName,
'
ing
'
) AS ?propertyName01).
BIND (CONCAT(?propertyName,
'
-by
'
) AS ?propertyName10).
BIND (CONCAT(?propertyName,
'
-of
'
) AS ?propertyName12).
# -- old ---
BIND (STRBEFORE(?predicateLabel,
'
-
'
) AS ?propertyName).
# -- old ---
BIND (CONCAT(?propertyName,
'
ing
'
) AS ?propertyName01).
# -- old ---
BIND (CONCAT(?propertyName,
'
-by
'
) AS ?propertyName10).
# -- old ---
BIND (CONCAT(?propertyName,
'
-of
'
) AS ?propertyName12).
# -- New Property Net
BIND (CONCAT(str(net:),
'
atomProperty
'
) AS ?n1).
...
...
This diff is collapsed.
Click to expand it.
tenet.log
+
27
−
27
View file @
11c98985
...
...
@@ -23,8 +23,8 @@
----- CTS directory: ./structure/cts/
----- target frame directory: ./input/targetFrameStructure/
----- input document directory: ./input/amrDocuments/
----- output directory: ./output/SolarSystemDev1-2022120
7
/
----- sentence output directory: ./output/SolarSystemDev1-2022120
7
/
----- output directory: ./output/SolarSystemDev1-2022120
8
/
----- sentence output directory: ./output/SolarSystemDev1-2022120
8
/
----- SHACL binary directory: ./lib/shacl-1.3.2/bin
-- Config File Definition
----- schema file: ./structure/amr-rdf-schema.ttl
...
...
@@ -44,9 +44,9 @@
----- frame ontology seed file: ./input/targetFrameStructure/base-ontology-seed.ttl
-- Output
----- ontology namespace: https://tenet.tetras-libre.fr/base-ontology/
----- output file: ./output/SolarSystemDev1-2022120
7
/SolarSystemDev1.ttl
----- output file: ./output/SolarSystemDev1-2022120
8
/SolarSystemDev1.ttl
*** - ***
- INFO - -- Creating output target directory: ./output/SolarSystemDev1-2022120
7
/
- INFO - -- Creating output target directory: ./output/SolarSystemDev1-2022120
8
/
- DEBUG - -- Counting number of graph files (sentences)
- DEBUG - ----- Graph count: 1
- INFO - === Extraction Processing using New TENET Engine ===
...
...
@@ -64,9 +64,9 @@
- DEBUG - ----- Sentence Loading
- DEBUG - -------- ./input/amrDocuments/dev/solar-system-1/SSC-01-01.stog.amr.ttl (570)
- DEBUG - --- Export work graph as turtle
- DEBUG - ----- Work graph file: ./output/SolarSystemDev1-2022120
7
/SolarSystemDev1-1/SolarSystemDev1.ttl
- DEBUG - ----- Work graph file: ./output/SolarSystemDev1-2022120
8
/SolarSystemDev1-1/SolarSystemDev1.ttl
- DEBUG - --- Ending Structure Preparation
- DEBUG - ----- Total Execution Time = 0:00:00.1
27118
- DEBUG - ----- Total Execution Time = 0:00:00.1
16282
- INFO - -- Loading Extraction Scheme (amr_scheme_1)
- DEBUG - ----- Step number: 3
- INFO - -- Loading Extraction Rules (amr_ctr/*)
...
...
@@ -97,7 +97,7 @@
- DEBUG - --- Serializing graph to SolarSystemDev1_preprocessing
- DEBUG - ----- step: preprocessing
- DEBUG - ----- id: SolarSystemDev1
- DEBUG - ----- work_file: ./output/SolarSystemDev1-2022120
7
/SolarSystemDev1-1/SolarSystemDev1_preprocessing.ttl
- DEBUG - ----- work_file: ./output/SolarSystemDev1-2022120
8
/SolarSystemDev1-1/SolarSystemDev1_preprocessing.ttl
- DEBUG - ----- base: http://SolarSystemDev1/preprocessing
- INFO - ----- 243 triples extracted during preprocessing step
- INFO - -- Applying extraction step: transduction
...
...
@@ -180,7 +180,7 @@
- DEBUG - --- Serializing graph to SolarSystemDev1_transduction
- DEBUG - ----- step: transduction
- DEBUG - ----- id: SolarSystemDev1
- DEBUG - ----- work_file: ./output/SolarSystemDev1-2022120
7
/SolarSystemDev1-1/SolarSystemDev1_transduction.ttl
- DEBUG - ----- work_file: ./output/SolarSystemDev1-2022120
8
/SolarSystemDev1-1/SolarSystemDev1_transduction.ttl
- DEBUG - ----- base: http://SolarSystemDev1/transduction
- INFO - ----- 316 triples extracted during transduction step
- INFO - -- Applying extraction step: generation
...
...
@@ -195,37 +195,37 @@
- INFO - ----- classify-atom-class-2: 1/1 new triples (1173)
- INFO - ----- generate-individual: 3/3 new triples (1176)
- INFO - ----- classify-individual: 1/1 new triples (1177)
- INFO - ----- generate-atom-property-1: 2
4
/2
4
new triples (120
1
)
- INFO - ----- generate-atom-property-12: 1
6/16
new triples (121
7
)
- DEBUG - ----- generate-inverse-relation: 0/0 new triples (121
7
)
- INFO - ----- generate-composite-class: 20/20 new triples (123
7
)
- INFO - ----- add-restriction-to-class-1: 12/15 new triples (124
9
)
- DEBUG - ----- add-restriction-to-class-2: 0/0 new triples (124
9
)
- INFO - ----- add-restriction-to-class-3: 8/10 new triples (125
7
)
- DEBUG - ----- add-restriction-to-class-4: 0/0 new triples (125
7
)
- DEBUG - ----- add-restriction-to-class-5: 0/0 new triples (125
7
)
- DEBUG - ----- add-restriction-to-class-6: 0/0 new triples (125
7
)
- INFO - ----- generate-composite-property: 8/8 new triples (126
5
)
- INFO - ----- generate-atom-property-1: 2
5
/2
5
new triples (120
2
)
- INFO - ----- generate-atom-property-12: 1
2/20
new triples (121
4
)
- DEBUG - ----- generate-inverse-relation: 0/0 new triples (121
4
)
- INFO - ----- generate-composite-class: 20/20 new triples (123
4
)
- INFO - ----- add-restriction-to-class-1: 12/15 new triples (124
6
)
- DEBUG - ----- add-restriction-to-class-2: 0/0 new triples (124
6
)
- INFO - ----- add-restriction-to-class-3: 8/10 new triples (125
4
)
- DEBUG - ----- add-restriction-to-class-4: 0/0 new triples (125
4
)
- DEBUG - ----- add-restriction-to-class-5: 0/0 new triples (125
4
)
- DEBUG - ----- add-restriction-to-class-6: 0/0 new triples (125
4
)
- INFO - ----- generate-composite-property: 8/8 new triples (126
2
)
- DEBUG - --- Serializing graph to SolarSystemDev1_generation
- DEBUG - ----- step: generation
- DEBUG - ----- id: SolarSystemDev1
- DEBUG - ----- work_file: ./output/SolarSystemDev1-2022120
7
/SolarSystemDev1-1/SolarSystemDev1_generation.ttl
- DEBUG - ----- work_file: ./output/SolarSystemDev1-2022120
8
/SolarSystemDev1-1/SolarSystemDev1_generation.ttl
- DEBUG - ----- base: http://SolarSystemDev1/generation
- INFO - ----- 13
6
triples extracted during generation step
- INFO - ----- 13
3
triples extracted during generation step
- INFO - -- Result: file containing only the factoids
- DEBUG - --- Making factoid graph with the last step result
- DEBUG - ----- Number of factoids: 14
1
- DEBUG - ----- Number of factoids: 14
6
- DEBUG - ----- Graph base: http://SolarSystemDev1/factoid
- DEBUG - --- Serializing graph to factoid file (./output/SolarSystemDev1-2022120
7
/SolarSystemDev1-1/SolarSystemDev1_factoid.ttl)
- DEBUG - --- Serializing graph to factoid file (./output/SolarSystemDev1-2022120
8
/SolarSystemDev1-1/SolarSystemDev1_factoid.ttl)
- INFO -
*** Execution Time ***
----- Function: apply (lib.tenet_extraction)
----- Total Time: 0:00:0
6.833388
----- Process Time: 0:00:0
6.818924
----- Total Time: 0:00:0
7.096233
----- Process Time: 0:00:0
7.076402
*** - ***
- INFO - === Final Ontology Generation ===
- INFO - -- Making complete factoid graph by merging sentence factoid graphs
- INFO - ----- Total factoid number: 14
1
- INFO - ----- Total factoid number: 14
6
- INFO - ----- Graph base: http://SolarSystemDev1/factoid
- INFO - -- Serializing graph to factoid file (./output/SolarSystemDev1-2022120
7
/SolarSystemDev1_factoid.ttl)
- INFO - -- Serializing graph to factoid file (./output/SolarSystemDev1-2022120
8
/SolarSystemDev1_factoid.ttl)
- INFO - === Done ===
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