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

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
......@@ -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).
......
......@@ -23,8 +23,8 @@
----- CTS directory: ./structure/cts/
----- target frame directory: ./input/targetFrameStructure/
----- input document directory: ./input/amrDocuments/
----- output directory: ./output/SolarSystemDev1-20221207/
----- sentence output directory: ./output/SolarSystemDev1-20221207/
----- output directory: ./output/SolarSystemDev1-20221208/
----- sentence output directory: ./output/SolarSystemDev1-20221208/
----- 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-20221207/SolarSystemDev1.ttl
----- output file: ./output/SolarSystemDev1-20221208/SolarSystemDev1.ttl
*** - ***
- INFO - -- Creating output target directory: ./output/SolarSystemDev1-20221207/
- INFO - -- Creating output target directory: ./output/SolarSystemDev1-20221208/
- 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-20221207/SolarSystemDev1-1/SolarSystemDev1.ttl
- DEBUG - ----- Work graph file: ./output/SolarSystemDev1-20221208/SolarSystemDev1-1/SolarSystemDev1.ttl
- DEBUG - --- Ending Structure Preparation
- DEBUG - ----- Total Execution Time = 0:00:00.127118
- DEBUG - ----- Total Execution Time = 0:00:00.116282
- 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-20221207/SolarSystemDev1-1/SolarSystemDev1_preprocessing.ttl
- DEBUG - ----- work_file: ./output/SolarSystemDev1-20221208/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-20221207/SolarSystemDev1-1/SolarSystemDev1_transduction.ttl
- DEBUG - ----- work_file: ./output/SolarSystemDev1-20221208/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: 24/24 new triples (1201)
- INFO - ----- generate-atom-property-12: 16/16 new triples (1217)
- DEBUG - ----- generate-inverse-relation: 0/0 new triples (1217)
- INFO - ----- generate-composite-class: 20/20 new triples (1237)
- INFO - ----- add-restriction-to-class-1: 12/15 new triples (1249)
- DEBUG - ----- add-restriction-to-class-2: 0/0 new triples (1249)
- INFO - ----- add-restriction-to-class-3: 8/10 new triples (1257)
- DEBUG - ----- add-restriction-to-class-4: 0/0 new triples (1257)
- DEBUG - ----- add-restriction-to-class-5: 0/0 new triples (1257)
- DEBUG - ----- add-restriction-to-class-6: 0/0 new triples (1257)
- INFO - ----- generate-composite-property: 8/8 new triples (1265)
- INFO - ----- generate-atom-property-1: 25/25 new triples (1202)
- INFO - ----- generate-atom-property-12: 12/20 new triples (1214)
- DEBUG - ----- generate-inverse-relation: 0/0 new triples (1214)
- INFO - ----- generate-composite-class: 20/20 new triples (1234)
- INFO - ----- add-restriction-to-class-1: 12/15 new triples (1246)
- DEBUG - ----- add-restriction-to-class-2: 0/0 new triples (1246)
- INFO - ----- add-restriction-to-class-3: 8/10 new triples (1254)
- DEBUG - ----- add-restriction-to-class-4: 0/0 new triples (1254)
- DEBUG - ----- add-restriction-to-class-5: 0/0 new triples (1254)
- DEBUG - ----- add-restriction-to-class-6: 0/0 new triples (1254)
- INFO - ----- generate-composite-property: 8/8 new triples (1262)
- DEBUG - --- Serializing graph to SolarSystemDev1_generation
- DEBUG - ----- step: generation
- DEBUG - ----- id: SolarSystemDev1
- DEBUG - ----- work_file: ./output/SolarSystemDev1-20221207/SolarSystemDev1-1/SolarSystemDev1_generation.ttl
- DEBUG - ----- work_file: ./output/SolarSystemDev1-20221208/SolarSystemDev1-1/SolarSystemDev1_generation.ttl
- DEBUG - ----- base: http://SolarSystemDev1/generation
- INFO - ----- 136 triples extracted during generation step
- INFO - ----- 133 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: 141
- DEBUG - ----- Number of factoids: 146
- DEBUG - ----- Graph base: http://SolarSystemDev1/factoid
- DEBUG - --- Serializing graph to factoid file (./output/SolarSystemDev1-20221207/SolarSystemDev1-1/SolarSystemDev1_factoid.ttl)
- DEBUG - --- Serializing graph to factoid file (./output/SolarSystemDev1-20221208/SolarSystemDev1-1/SolarSystemDev1_factoid.ttl)
- INFO -
*** Execution Time ***
----- Function: apply (lib.tenet_extraction)
----- Total Time: 0:00:06.833388
----- Process Time: 0:00:06.818924
----- Total Time: 0:00:07.096233
----- Process Time: 0:00:07.076402
*** - ***
- INFO - === Final Ontology Generation ===
- INFO - -- Making complete factoid graph by merging sentence factoid graphs
- INFO - ----- Total factoid number: 141
- INFO - ----- Total factoid number: 146
- INFO - ----- Graph base: http://SolarSystemDev1/factoid
- INFO - -- Serializing graph to factoid file (./output/SolarSystemDev1-20221207/SolarSystemDev1_factoid.ttl)
- INFO - -- Serializing graph to factoid file (./output/SolarSystemDev1-20221208/SolarSystemDev1_factoid.ttl)
- INFO - === Done ===
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment