diff --git a/tenet/scheme/amr_rule/__init__.py b/tenet/scheme/amr_rule/__init__.py index f1d7159345f671a3af73ca7cf0303618349241b9..5b457376e0b9b7596c305507b83b210ac05b8b34 100644 --- a/tenet/scheme/amr_rule/__init__.py +++ b/tenet/scheme/amr_rule/__init__.py @@ -2,6 +2,8 @@ from scheme.amr_rule.preprocessing.amr_reification import * from scheme.amr_rule.preprocessing.amrld_correcting import * from scheme.amr_rule.transduction.atomic_class_extractor import * +from scheme.amr_rule.transduction.atomic_individual_extractor import * +from scheme.amr_rule.transduction.atomic_property_extractor import * from scheme.amr_rule.transduction.composite_class_extractor_1 import * diff --git a/tenet/scheme/amr_rule/transduction/atomic_individual_extractor.py b/tenet/scheme/amr_rule/transduction/atomic_individual_extractor.py new file mode 100644 index 0000000000000000000000000000000000000000..54a181a705baf19ebe35ea2784d2783f9f4f64ef --- /dev/null +++ b/tenet/scheme/amr_rule/transduction/atomic_individual_extractor.py @@ -0,0 +1,127 @@ +#!/usr/bin/python3.10 +# -*-coding:Utf-8 -* + +#============================================================================== +# TENET: Rule to extract atomic individuals +#------------------------------------------------------------------------------ +# Net Expansion AMR rule to extract atomic individuals +# Rule: leaf{variable, concept} => atomicClass +#============================================================================== + +from rdflib import Graph + +import transduction +from transduction import net +from transduction.query_builder import generate_select_query +from transduction.naming_computer import define_composite_naming_1, define_restriction_naming + + +#============================================================================== +# Select Pattern: leaf{variable, concept} +#============================================================================== + +def __rule_pattern_query_code(graph): + select_data_list = ['?baseLeaf', '?conceptName', '?valueLabel', '?classNet'] + clause_list = [] + clause_list.append(f'?baseLeaf a amr:AMR_Leaf.') + clause_list.append(f'?baseLeaf amr:hasConcept ?leafConcept.') + clause_list.append(f'?baseLeaf ?edge ?value.') + clause_list.append(f'?edge amr:hasRoleID ?roleID.') + clause_list.append(f'VALUES ?roleID {{"name"}}') + clause_list.append(f'?value a amr:AMR_Value.') + clause_list.append(f'?value rdfs:label ?valueLabel.') + clause_list.append(f'?classNet a [rdfs:subClassOf* net:Class_Net].') + clause_list.append(f'?classNet net:coverBaseNode ?baseLeaf.') + clause_list.append(f'?classNet net:hasClassName ?conceptName.') + query_code = generate_select_query(graph, select_data_list, clause_list) + return query_code + + +def __search_pattern(graph): + query_code = __rule_pattern_query_code(graph) + rule_pattern_set = graph.query(query_code) + return rule_pattern_set + + + +#============================================================================== +# Relation Propagation +#============================================================================== + +def __filter_relation(relation_list): + result_list = [] + for relation in relation_list: + check = True + (s, p, o) = relation + if s == o: check = False + if check: result_list.append(relation) + return result_list + + +def __propagate_relation(target_net, leaf): + # TODO + #target_net.output_relation_list = None + pass + + + +#============================================================================== +# Construct Method(s) +#============================================================================== + +def __define_naming(todo): + pass + + +def __construct_individual_net( + graph, base_leaf, concept_name, value_label, mother_class_net): + + # -- Net Composition + individual_net = net.IndividualNet(graph) + + # -- Data Computation + individual_net.base_node = base_leaf + individual_net.node = base_leaf + individual_net.individual_label = value_label + individual_net.mother_class_net = mother_class_net + # TODO: individual_net.class_name = get_structure(graph) + + # -- Relation Propagation + __propagate_relation(individual_net, base_leaf) + + # -- Net Naming + individual_net.naming = concept_name + + # -- Finalization + individual_net.finalize() + triple_definition = individual_net.generate_triple_definition() + + return individual_net, triple_definition + + + +#============================================================================== +# Main Method +#============================================================================== + +def extract_atomic_individual(graph): + + # -- Rule Initialization + rule_label = 'extract atomic individuals [ leaf{variable, concept} ]' + + # -- Search for patterns + rule_pattern_set = __search_pattern(graph) + + # -- Selection Analyzing (1) + rule_triple_list = [] + for pattern in rule_pattern_set: + + # -- New Net Construction (from 3 nets) + new_class, triple_list = __construct_individual_net( + graph, pattern.baseLeaf, pattern.conceptName, pattern.valueLabel, pattern.classNet) + + # -- Resulting List Update + # class_net_list.append(new_class) + rule_triple_list += triple_list + + return rule_label, rule_triple_list \ No newline at end of file diff --git a/tenet/scheme/amr_rule/transduction/atomic_property_extractor.py b/tenet/scheme/amr_rule/transduction/atomic_property_extractor.py new file mode 100644 index 0000000000000000000000000000000000000000..1c45787547cabb2edddf6d3073261d43ac7b9ee5 --- /dev/null +++ b/tenet/scheme/amr_rule/transduction/atomic_property_extractor.py @@ -0,0 +1,119 @@ +#!/usr/bin/python3.10 +# -*-coding:Utf-8 -* + +#============================================================================== +# TENET: Rule to extract atomic properties +#------------------------------------------------------------------------------ +# Net Expansion AMR rule to extract atomic properties +# Rule: leaf{variable, amrTermConcept} => atomicProperty +#============================================================================== + +from rdflib import Graph + +import transduction +from transduction import net +from transduction.query_builder import generate_select_query +from transduction.naming_computer import define_composite_naming_1, define_restriction_naming + + +#============================================================================== +# Select Pattern: leaf{variable, amrTermConcept} +#============================================================================== + +def __rule_pattern_query_code(graph): + select_data_list = ['?leaf', '?conceptName'] + clause_list = [] + clause_list.append(f'?leaf a amr:AMR_Leaf.') + clause_list.append(f'?leaf amr:hasConcept ?leafConcept.') + clause_list.append(f'?leafConcept rdfs:subClassOf amr:AMR_Term_Concept.') + clause_list.append(f'?leafConcept amr:label ?conceptName.') + query_code = generate_select_query(graph, select_data_list, clause_list) + return query_code + + +def __search_pattern(graph): + query_code = __rule_pattern_query_code(graph) + rule_pattern_set = graph.query(query_code) + return rule_pattern_set + + + +#============================================================================== +# Relation Propagation +#============================================================================== + +def __filter_relation(relation_list): + result_list = [] + for relation in relation_list: + check = True + (s, p, o) = relation + if s == o: check = False + if check: result_list.append(relation) + return result_list + + +def __propagate_relation(target_net, leaf): + # TODO + #target_net.output_relation_list = None + pass + + + +#============================================================================== +# Construct Method(s) +#============================================================================== + +def __define_naming(todo): + pass + + +def __construct_atom_class_net(graph, leaf, concept_name): + + # -- Net Composition + atom_class_net = net.AtomClassNet(graph) + + # -- Data Computation + atom_class_net.base_node = leaf + atom_class_net.node = leaf + atom_class_net.class_name = concept_name + # TODO: atom_class_net.class_name = get_structure(graph) + + # -- Relation Propagation + __propagate_relation(atom_class_net, leaf) + + # -- Net Naming + atom_class_net.naming = concept_name + + # -- Finalization + atom_class_net.finalize() + triple_definition = atom_class_net.generate_triple_definition() + + return atom_class_net, triple_definition + + + +#============================================================================== +# Main Method +#============================================================================== + +def extract_atomic_property(graph): + + # -- Rule Initialization + rule_label = 'extract atomic properties [ leaf{variable, amrTermConcept} ]' + + # -- Search for patterns + rule_pattern_set = __search_pattern(graph) + + # -- Selection Analyzing (1) + rule_triple_list = [] + for pattern in rule_pattern_set: + + # -- New Net Construction (from 3 nets) + new_class, triple_list = __construct_atom_class_net( + graph, pattern.leaf, pattern.conceptName) + + # -- Resulting List Update + # class_net_list.append(new_class) + rule_triple_list += triple_list + + return rule_label, rule_triple_list \ No newline at end of file diff --git a/tenet/scheme/amr_scheme_1.py b/tenet/scheme/amr_scheme_1.py index 2c33d041b7618ac3d97651db091b754b35fb1dcd..535bb44e0f5503c8c9b5559a0cf3e04c930dfe1d 100644 --- a/tenet/scheme/amr_scheme_1.py +++ b/tenet/scheme/amr_scheme_1.py @@ -102,8 +102,8 @@ amr_reification_sequence = { # # Transduction Sequences # # --------------------------------------------- -atomic_extraction_sequence = { - 'label': 'atomic-extraction-sequence', +old_atomic_extraction_sequence = { + 'label': '(old) atomic-extraction-sequence', 'comment': 'creation of atom element nets (class, individual, property)', 'rule_key_list': ['create-atom-class-net', 'create-individual-net-1', @@ -226,6 +226,11 @@ classification_sequence = { 'reclassify-deprecated-net'] } +atomic_extraction_sequence = ['atomic-extraction-sequence', + rule.extract_atomic_class, + rule.extract_atomic_individual, + rule.extract_atomic_property] + phenomena_polarity_analyze_sequence = ['phenomena_polarity_analyze_sequence', rule.analyze_phenomena_polarity_1] @@ -292,8 +297,8 @@ scheme = { atomic_extraction_sequence], # 'transduction': [transduction_refinement_sequence, - # atomic_extraction_sequence, - # atomic_extraction_sequence, + # old_atomic_extraction_sequence, + # old_atomic_extraction_sequence, # # phenomena_application_polarity_sequence, # phenomena_polarity_analyze_sequence, # phenomena_application_mod_sequence, diff --git a/tests/dev_tests/test_data/atom-extraction-devGraph-1.result.ttl b/tests/dev_tests/test_data/atom-extraction-devGraph-1.result.ttl index 1243eeb71e45ad65cd172cd25df885cf9aca5723..180a9683afd98e2ec5fb03226af33fb3b5b677cf 100644 --- a/tests/dev_tests/test_data/atom-extraction-devGraph-1.result.ttl +++ b/tests/dev_tests/test_data/atom-extraction-devGraph-1.result.ttl @@ -440,9 +440,6 @@ net:Composite_Property_Net a owl:Class ; net:Deprecated_Net a owl:Class ; rdfs:subClassOf net:Net . -net:Individual_Net a owl:Class ; - rdfs:subClassOf net:Net . - net:Instance a owl:Class ; rdfs:label "Semantic Net Instance" ; rdfs:subClassOf net:Net_Structure . @@ -498,12 +495,6 @@ net:atomClass_sun_s2 a net:Atom_Class_Net ; net:hasClassName "sun" ; net:hasNaming "sun" . -net:atomClass_system_p a net:Atom_Class_Net ; - net:coverBaseNode :leaf_system_p ; - net:coverNode :leaf_system_p ; - net:hasClassName "system" ; - net:hasNaming "system" . - net:atomClass_system_s a net:Atom_Class_Net ; net:coverBaseNode :leaf_system_s ; net:coverNode :leaf_system_s ; @@ -637,6 +628,13 @@ net:has_target a owl:AnnotationProperty ; rdfs:label "has target" ; rdfs:subPropertyOf net:has_relation_value . +net:individual_system_p a net:Individual_Net ; + net:coverBaseNode :leaf_system_p ; + net:coverNode :leaf_system_p ; + net:hasIndividualLabel "Solar System" ; + net:hasMotherClassNet net:atomClass_system_p ; + net:hasNaming "system" . + net:inverse_direction a owl:NamedIndividual . net:listBy a owl:AnnotationProperty ; @@ -886,6 +884,15 @@ net:Axiom_Net a owl:Class ; net:Feature a owl:Class ; rdfs:subClassOf net:Net_Structure . +net:Individual_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:atomClass_system_p a net:Atom_Class_Net ; + net:coverBaseNode :leaf_system_p ; + net:coverNode :leaf_system_p ; + net:hasClassName "system" ; + net:hasNaming "system" . + net:class_list a owl:Class ; rdfs:label "classList" ; rdfs:subClassOf net:Type . @@ -1050,11 +1057,6 @@ ns2:Frame a ns2:Concept, :hasConcept :concept_gravitation ; :hasVariable :variable_g . -:leaf_system_p a :AMR_Leaf ; - :edge_p_name_SolarSystem :value_SolarSystem ; - :hasConcept :concept_system ; - :hasVariable :variable_p . - :toReify a owl:AnnotationProperty ; rdfs:subPropertyOf :AMR_AnnotationProperty . @@ -1106,6 +1108,11 @@ net:typeProperty a owl:AnnotationProperty ; :AMR_Role a owl:Class ; rdfs:subClassOf :AMR_Element . +:leaf_system_p a :AMR_Leaf ; + :edge_p_name_SolarSystem :value_SolarSystem ; + :hasConcept :concept_system ; + :hasVariable :variable_p . + :leaf_system_s a :AMR_Leaf ; :edge_s_domain_p :leaf_system_p ; :hasConcept :concept_system ; diff --git a/tests/dev_tests/test_data/atom-extraction-devGraph-2.ttl b/tests/dev_tests/test_data/atom-extraction-devGraph-2.ttl new file mode 100644 index 0000000000000000000000000000000000000000..180a9683afd98e2ec5fb03226af33fb3b5b677cf --- /dev/null +++ b/tests/dev_tests/test_data/atom-extraction-devGraph-2.ttl @@ -0,0 +1,1183 @@ +@base <https://amr.tetras-libre.fr/rdf/atom-extraction-devGraph-1/result> . +@prefix : <https://amr.tetras-libre.fr/rdf/schema#> . +@prefix cprm: <https://tenet.tetras-libre.fr/config/parameters#> . +@prefix net: <https://tenet.tetras-libre.fr/semantic-net#> . +@prefix ns11: <http://amr.isi.edu/rdf/amr-terms#> . +@prefix ns2: <http://amr.isi.edu/rdf/core-amr#> . +@prefix ns3: <http://amr.isi.edu/frames/ld/v1.2.2/> . +@prefix ns4: <http://amr.isi.edu/entity-types#> . +@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 sys: <https://tenet.tetras-libre.fr/base-ontology#> . +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . + +ns2:Concept a rdfs:Class, + owl:Class ; + rdfs:label "AMR-Concept" ; + rdfs:subClassOf :AMR_Linked_Data . + +ns2:Role a rdfs:Class, + owl:Class ; + rdfs:label "AMR-Role" ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/test-1#root01> ns2:hasID "test-1" ; + ns2:hasSentence "The sun is a star." ; + ns2:root <http://amr.isi.edu/amr_data/test-1#s> . + +<http://amr.isi.edu/amr_data/test-2#root01> ns2:hasID "test-2" ; + ns2:hasSentence "Earth is a planet." ; + ns2:root <http://amr.isi.edu/amr_data/test-2#p> . + +ns3:bind-01.ARG0 a ns3:FrameRole . + +ns3:bind-01.ARG1 a ns3:FrameRole . + +ns3:orbit-01.ARG0 a ns3:FrameRole . + +ns3:orbit-01.ARG1 a ns3:FrameRole . + +ns11:domain a ns2:Role, + owl:AnnotationProperty, + owl:NamedIndividual . + +ns11:op1 a ns2:Role . + +ns11:op2 a ns2:Role . + +ns2:hasID a owl:AnnotationProperty . + +ns2:hasSentence a owl:AnnotationProperty . + +ns2:root a owl:AnnotationProperty . + +<https://amr.tetras-libre.fr/rdf/schema> a owl:Ontology ; + owl:versionIRI :0.1 . + +:AMR_DataProperty a owl:DatatypeProperty . + +:AMR_Prep_Role a owl:Class ; + rdfs:subClassOf :AMR_Role . + +:edge_a_op1_s2 a :AMR_Edge ; + :hasAmrRole :role_op1 ; + :hasRoleID "op1" . + +:edge_a_op2_o a :AMR_Edge ; + :hasAmrRole :role_op2 ; + :hasRoleID "op2" . + +:edge_b_ARG0_g a :AMR_Edge ; + :hasAmrRole :role_ARG0 ; + :hasRoleID "ARG0" . + +:edge_b_ARG1_s a :AMR_Edge ; + :hasAmrRole :role_ARG1 ; + :hasRoleID "ARG1" . + +:edge_d2_polarity_negative a :AMR_Edge ; + :hasAmrRole :role_polarity ; + :hasRoleID "polarity" . + +:edge_m9_ARG0_o2 a :AMR_Edge ; + :hasAmrRole :role_ARG0 ; + :hasRoleID "ARG0" . + +:edge_m9_ARG1_o3 a :AMR_Edge ; + :hasAmrRole :role_ARG1 ; + :hasRoleID "ARG1" . + +:edge_o2_ARG0_o a :AMR_Edge ; + :hasAmrRole :role_ARG0 ; + :hasRoleID "ARG0" . + +:edge_o2_ARG1_s2 a :AMR_Edge ; + :hasAmrRole :role_ARG1 ; + :hasRoleID "ARG1" . + +:edge_o3_op1_d a :AMR_Edge ; + :hasAmrRole :role_op1 ; + :hasRoleID "op1" . + +:edge_o3_op2_d2 a :AMR_Edge ; + :hasAmrRole :role_op2 ; + :hasRoleID "op2" . + +:edge_p9_ARG0_s a :AMR_Edge ; + :hasAmrRole :role_ARG0 ; + :hasRoleID "ARG0" . + +:edge_p9_ARG1_a a :AMR_Edge ; + :hasAmrRole :role_ARG1 ; + :hasRoleID "ARG1" . + +:edge_p_name_SolarSystem a :AMR_Edge ; + :hasAmrRole :role_name ; + :hasRoleID "name" . + +:edge_s_domain_p a :AMR_Edge ; + :hasAmrRole :role_domain ; + :hasRoleID "domain" . + +:fromAmrLkFramerole a owl:AnnotationProperty ; + rdfs:subPropertyOf :fromAmrLk . + +:fromAmrLkRole a owl:AnnotationProperty ; + rdfs:subPropertyOf :fromAmrLk . + +:fromAmrLkRoot a owl:AnnotationProperty ; + rdfs:subPropertyOf :fromAmrLk . + +:getDirectPropertyName a owl:AnnotationProperty ; + rdfs:subPropertyOf :getProperty . + +:getInversePropertyName a owl:AnnotationProperty ; + rdfs:subPropertyOf :getProperty . + +:getPropertyType a owl:AnnotationProperty ; + rdfs:subPropertyOf :getProperty . + +:hasConcept a owl:ObjectProperty ; + rdfs:domain :AMR_Leaf ; + rdfs:subPropertyOf :AMR_ObjectProperty . + +:hasConceptLink a owl:AnnotationProperty ; + rdfs:subPropertyOf :hasLink . + +:hasEdgeLink a owl:AnnotationProperty ; + rdfs:subPropertyOf :hasLink . + +:hasReification a owl:AnnotationProperty ; + rdfs:range xsd:boolean ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:hasReificationConcept a owl:AnnotationProperty ; + rdfs:subPropertyOf :hasReificationDefinition . + +:hasReificationDomain a owl:AnnotationProperty ; + rdfs:subPropertyOf :hasReificationDefinition . + +:hasReificationRange a owl:AnnotationProperty ; + rdfs:subPropertyOf :hasReificationDefinition . + +:hasRelationName a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:hasRoleID a owl:ObjectProperty ; + rdfs:domain :AMR_Edge ; + rdfs:subPropertyOf :AMR_ObjectProperty . + +:hasRoleTag a owl:ObjectProperty ; + rdfs:domain :AMR_Edge ; + rdfs:subPropertyOf :AMR_ObjectProperty . + +:hasRolesetID a owl:ObjectProperty ; + rdfs:domain :AMR_Edge ; + rdfs:subPropertyOf :AMR_ObjectProperty . + +:hasRootLeaf a owl:ObjectProperty ; + rdfs:subPropertyOf :AMR_ObjectProperty . + +:hasSentenceID a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:hasSentenceStatement a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:hasVariable a owl:ObjectProperty ; + rdfs:domain :AMR_Leaf ; + rdfs:subPropertyOf :AMR_ObjectProperty . + +:label a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:leaf_bind-01_b a :AMR_Leaf ; + :edge_b_ARG0_g :leaf_gravitation_g ; + :edge_b_ARG1_s :leaf_system_s ; + :hasConcept :concept_bind-01 ; + :hasVariable :variable_b . + +:leaf_hasManner_m9 a :AMR_Leaf ; + :edge_m9_ARG0_o2 :leaf_orbit-01_o2 ; + :edge_m9_ARG1_o3 :leaf_or_o3 ; + :hasConcept :concept_manner ; + :hasVariable :variable_m9 ; + :isReifiedLeaf true . + +:leaf_hasPart_p9 a :AMR_Leaf ; + :edge_p9_ARG0_s :leaf_system_s ; + :edge_p9_ARG1_a :leaf_and_a ; + :hasConcept :concept_part ; + :hasVariable :variable_p9 ; + :isReifiedLeaf true . + +:phenomena_degree a owl:Class ; + rdfs:subClassOf :AMR_Phenomena ; + :hasConceptLink "have-degree-91" ; + :label "degree" . + +:relation_domain a owl:Class ; + rdfs:subClassOf :AMR_Relation ; + :hasReification false ; + :hasRelationName "domain" . + +:relation_manner a owl:Class ; + rdfs:subClassOf :AMR_Relation ; + :hasReification true ; + :hasReificationConcept "hasManner" ; + :hasReificationDomain "ARG1" ; + :hasReificationRange "ARG2" ; + :hasRelationName "manner" . + +:relation_mod a owl:Class ; + rdfs:subClassOf :AMR_Relation ; + :hasReification false ; + :hasRelationName "mod" . + +:relation_name a owl:Class ; + rdfs:subClassOf :AMR_Relation ; + :hasReification false ; + :hasRelationName "name" . + +:relation_part a owl:Class ; + rdfs:subClassOf :AMR_Relation ; + :hasReification true ; + :hasReificationConcept "hasPart" ; + :hasReificationDomain "ARG1" ; + :hasReificationRange "ARG2" ; + :hasRelationName "part" . + +:relation_polarity a owl:Class ; + rdfs:subClassOf :AMR_Relation ; + :hasReification false ; + :hasRelationName "polarity" . + +:relation_quant a owl:Class ; + rdfs:subClassOf :AMR_Relation ; + :hasReification false ; + :hasRelationName "quant" . + +:role_ARG2 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG2" . + +:role_ARG3 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG3" . + +:role_ARG4 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG4" . + +:role_ARG5 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG5" . + +:role_ARG6 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG6" . + +:role_ARG7 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG7" . + +:role_ARG8 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG8" . + +:role_ARG9 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG9" . + +:role_have-degree-91 a owl:Class ; + rdfs:subClassOf :AMR_Specific_Role ; + :getPropertyType <net:specificProperty> . + +:role_manner a owl:Class ; + rdfs:subClassOf :AMR_NonCore_Role ; + :getDirectPropertyName "manner" ; + :getPropertyType owl:DataProperty ; + :label "manner" ; + :toReifyAsConcept "manner" ; + :toReifyWithBaseEdge "ARG0" ; + :toReifyWithHeadEdge "ARG1" . + +:role_mod a owl:Class ; + rdfs:subClassOf :AMR_NonCore_Role ; + :getDirectPropertyName "hasFeature"^^xsd:string ; + :getPropertyType rdfs:subClassOf, + owl:ObjectProperty ; + :label "mod" ; + :toReifyAsConcept "mod" ; + :toReifyWithBaseEdge "ARG0" ; + :toReifyWithHeadEdge "ARG1" . + +:role_op3 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op3" . + +:role_op4 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op4" . + +:role_op5 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op5" . + +:role_op6 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op6" . + +:role_op7 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op7" . + +:role_op8 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op8" . + +:role_op9 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op9" . + +:role_part a owl:Class ; + rdfs:subClassOf :AMR_NonCore_Role ; + :getDirectPropertyName "hasPart"^^xsd:string ; + :getInversePropertyName "partOf"^^xsd:string ; + :getPropertyType owl:ObjectProperty ; + :toReifyAsConcept "part" ; + :toReifyWithBaseEdge "ARG0" ; + :toReifyWithHeadEdge "ARG1" . + +:role_quant a owl:Class ; + rdfs:subClassOf :AMR_Specific_Role ; + :label "quant" . + +:root_SSC-01-01 a :AMR_Root ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#root01> ; + :hasRootLeaf :leaf_system_s ; + :hasSentenceID "SSC-01-01" ; + :hasSentenceStatement "The Solar System is the gravitationally bound system of the Sun and the objects that orbit it, either directly or indirectly." . + +:toReifyAsConcept a owl:AnnotationProperty ; + rdfs:subPropertyOf :toReify . + +:toReifyWithBaseEdge a owl:AnnotationProperty ; + rdfs:subPropertyOf :toReify . + +:toReifyWithHeadEdge a owl:AnnotationProperty ; + rdfs:subPropertyOf :toReify . + +<https://tenet.tetras-libre.fr/base-ontology> a owl:Ontology . + +sys:Event a owl:Class ; + rdfs:subClassOf sys:Out_Structure . + +sys:Undetermined_Thing a owl:Class ; + rdfs:subClassOf sys:Out_Structure . + +sys:fromStructure a owl:AnnotationProperty ; + rdfs:subPropertyOf sys:Out_AnnotationProperty . + +sys:hasDegree a owl:ObjectProperty ; + rdfs:subPropertyOf sys:Out_ObjectProperty . + +sys:hasFeature a owl:ObjectProperty ; + rdfs:subPropertyOf sys:Out_ObjectProperty . + +<https://tenet.tetras-libre.fr/config/parameters> a owl:Ontology . + +cprm:Config_Parameters a owl:Class ; + cprm:baseURI "https://tenet.tetras-libre.fr/" ; + cprm:netURI "https://tenet.tetras-libre.fr/semantic-net#" ; + cprm:newClassRef "new-class#" ; + cprm:newPropertyRef "new-relation#" ; + cprm:objectRef "object_" ; + cprm:targetOntologyURI "https://tenet.tetras-libre.fr/base-ontology/" . + +cprm:baseURI a rdf:Property ; + rdfs:label "Base URI" ; + rdfs:domain cprm:Frame ; + rdfs:range xsd:string ; + rdfs:subPropertyOf cprm:configParamProperty . + +cprm:netURI a rdf:Property ; + rdfs:label "Net URI" ; + rdfs:domain cprm:Frame ; + rdfs:range xsd:string ; + rdfs:subPropertyOf cprm:configParamProperty . + +cprm:newClassRef a rdf:Property ; + rdfs:label "Reference for a new class" ; + rdfs:subPropertyOf cprm:configParamProperty . + +cprm:newPropertyRef a rdf:Property ; + rdfs:label "Reference for a new property" ; + rdfs:subPropertyOf cprm:configParamProperty . + +cprm:objectRef a rdf:Property ; + rdfs:label "Object Reference" ; + rdfs:subPropertyOf cprm:configParamProperty . + +cprm:targetOntologyURI a rdf:Property ; + rdfs:label "URI of classes in target ontology" ; + rdfs:domain cprm:Frame ; + rdfs:range xsd:string ; + rdfs:subPropertyOf cprm:configParamProperty . + +<https://tenet.tetras-libre.fr/semantic-net> a owl:Ontology . + +net:Atom_Property_Net a owl:Class ; + rdfs:subClassOf net:Property_Net . + +net:Composite_Class_Net a owl:Class ; + rdfs:subClassOf net:Class_Net . + +net:Composite_Property_Net a owl:Class ; + rdfs:subClassOf net:Property_Net . + +net:Deprecated_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:Instance a owl:Class ; + rdfs:label "Semantic Net Instance" ; + rdfs:subClassOf net:Net_Structure . + +net:Logical_Set_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:Object a owl:Class ; + rdfs:label "Object using in semantic net instance" ; + rdfs:subClassOf net:Net_Structure . + +net:Phenomena_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:Property_Axiom_Net a owl:Class ; + rdfs:subClassOf net:Axiom_Net . + +net:Property_Direction a owl:Class ; + rdfs:subClassOf net:Feature . + +net:Relation a owl:Class ; + rdfs:subClassOf net:Net_Structure . + +net:Restriction_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:Value_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:abstractionClass a owl:AnnotationProperty ; + rdfs:label "abstraction class" ; + rdfs:subPropertyOf net:objectValue . + +net:atom a owl:Class ; + rdfs:label "atom" ; + rdfs:subClassOf net:Type . + +net:atomClass_gravitation_g a net:Atom_Class_Net ; + net:coverBaseNode :leaf_gravitation_g ; + net:coverNode :leaf_gravitation_g ; + net:hasClassName "gravitation" ; + net:hasNaming "gravitation" . + +net:atomClass_object_o a net:Atom_Class_Net ; + net:coverBaseNode :leaf_object_o ; + net:coverNode :leaf_object_o ; + net:hasClassName "object" ; + net:hasNaming "object" . + +net:atomClass_sun_s2 a net:Atom_Class_Net ; + net:coverBaseNode :leaf_sun_s2 ; + net:coverNode :leaf_sun_s2 ; + net:hasClassName "sun" ; + net:hasNaming "sun" . + +net:atomClass_system_s a net:Atom_Class_Net ; + net:coverBaseNode :leaf_system_s ; + net:coverNode :leaf_system_s ; + net:hasClassName "system" ; + net:hasNaming "system" . + +net:atomOf a owl:AnnotationProperty ; + rdfs:label "atom of" ; + rdfs:subPropertyOf net:typeProperty . + +net:atomType a owl:AnnotationProperty ; + rdfs:label "atom type" ; + rdfs:subPropertyOf net:objectType . + +net:class a owl:Class ; + rdfs:label "class" ; + rdfs:subClassOf net:Type . + +net:composite a owl:Class ; + rdfs:label "composite" ; + rdfs:subClassOf net:Type . + +net:conjunctive_list a owl:Class ; + rdfs:label "conjunctive-list" ; + rdfs:subClassOf net:list . + +net:disjunctive_list a owl:Class ; + rdfs:label "disjunctive-list" ; + rdfs:subClassOf net:list . + +net:entityClass a owl:AnnotationProperty ; + rdfs:label "entity class" ; + rdfs:subPropertyOf net:objectValue . + +net:entity_class_list a owl:Class ; + rdfs:label "entityClassList" ; + rdfs:subClassOf net:class_list . + +net:event a owl:Class ; + rdfs:label "event" ; + rdfs:subClassOf net:Type . + +net:featureClass a owl:AnnotationProperty ; + rdfs:label "feature class" ; + rdfs:subPropertyOf net:objectValue . + +net:has_atom a owl:AnnotationProperty ; + rdfs:label "has atom" ; + rdfs:subPropertyOf net:has_object . + +net:has_class a owl:AnnotationProperty ; + rdfs:label "is class" ; + rdfs:subPropertyOf net:objectValue . + +net:has_class_name a owl:AnnotationProperty ; + rdfs:subPropertyOf net:has_value . + +net:has_class_uri a owl:AnnotationProperty ; + rdfs:label "class uri" ; + rdfs:subPropertyOf net:objectValue . + +net:has_concept a owl:AnnotationProperty ; + rdfs:label "concept "@fr ; + rdfs:subPropertyOf net:objectValue . + +net:has_entity a owl:AnnotationProperty ; + rdfs:label "has entity" ; + rdfs:subPropertyOf net:has_object . + +net:has_feature a owl:AnnotationProperty ; + rdfs:label "has feature" ; + rdfs:subPropertyOf net:has_object . + +net:has_instance a owl:AnnotationProperty ; + rdfs:label "entity instance" ; + rdfs:subPropertyOf net:objectValue . + +net:has_instance_uri a owl:AnnotationProperty ; + rdfs:label "instance uri" ; + rdfs:subPropertyOf net:objectValue . + +net:has_item a owl:AnnotationProperty ; + rdfs:label "has item" ; + rdfs:subPropertyOf net:has_object . + +net:has_mother_class a owl:AnnotationProperty ; + rdfs:label "has mother class" ; + rdfs:subPropertyOf net:objectValue . + +net:has_mother_class_uri a owl:AnnotationProperty ; + rdfs:label "parent class uri" ; + rdfs:subPropertyOf net:objectValue . + +net:has_node a owl:AnnotationProperty ; + rdfs:label "UNL Node" ; + rdfs:subPropertyOf net:netProperty . + +net:has_parent a owl:AnnotationProperty ; + rdfs:label "has parent" ; + rdfs:subPropertyOf net:has_object . + +net:has_parent_class a owl:AnnotationProperty ; + rdfs:label "parent class" ; + rdfs:subPropertyOf net:objectValue . + +net:has_parent_class_uri a owl:AnnotationProperty ; + rdfs:label "parent class uri" ; + rdfs:subPropertyOf net:objectValue . + +net:has_possible_domain a owl:AnnotationProperty ; + rdfs:label "has possible domain" ; + rdfs:subPropertyOf net:has_object . + +net:has_possible_range a owl:AnnotationProperty ; + rdfs:label "has possible range" ; + rdfs:subPropertyOf net:has_object . + +net:has_relation a owl:AnnotationProperty ; + rdfs:label "has relation" ; + rdfs:subPropertyOf net:has_relation_value . + +net:has_source a owl:AnnotationProperty ; + rdfs:label "has source" ; + rdfs:subPropertyOf net:has_relation_value . + +net:has_structure a owl:AnnotationProperty ; + rdfs:label "Linguistic Structure (in UNL Document)" ; + rdfs:subPropertyOf net:netProperty . + +net:has_target a owl:AnnotationProperty ; + rdfs:label "has target" ; + rdfs:subPropertyOf net:has_relation_value . + +net:individual_system_p a net:Individual_Net ; + net:coverBaseNode :leaf_system_p ; + net:coverNode :leaf_system_p ; + net:hasIndividualLabel "Solar System" ; + net:hasMotherClassNet net:atomClass_system_p ; + net:hasNaming "system" . + +net:inverse_direction a owl:NamedIndividual . + +net:listBy a owl:AnnotationProperty ; + rdfs:label "list by" ; + rdfs:subPropertyOf net:typeProperty . + +net:listGuiding a owl:AnnotationProperty ; + rdfs:label "Guiding connector of a list (or, and)" ; + rdfs:subPropertyOf net:objectValue . + +net:listOf a owl:AnnotationProperty ; + rdfs:label "list of" ; + rdfs:subPropertyOf net:typeProperty . + +net:modCat1 a owl:AnnotationProperty ; + rdfs:label "Modality Category (level 1)" ; + rdfs:subPropertyOf net:objectValue . + +net:modCat2 a owl:AnnotationProperty ; + rdfs:label "Modality Category (level 2)" ; + rdfs:subPropertyOf net:objectValue . + +net:normal_direction a owl:NamedIndividual . + +net:relation a owl:Class ; + rdfs:label "relation" ; + rdfs:subClassOf net:Type . + +net:relationOf a owl:AnnotationProperty ; + rdfs:label "relation of" ; + rdfs:subPropertyOf net:typeProperty . + +net:state_property a owl:Class ; + rdfs:label "stateProperty" ; + rdfs:subClassOf net:Type . + +net:type a owl:AnnotationProperty ; + rdfs:label "type "@fr ; + rdfs:subPropertyOf net:netProperty . + +net:unary_list a owl:Class ; + rdfs:label "unary-list" ; + rdfs:subClassOf net:list . + +net:verbClass a owl:AnnotationProperty ; + rdfs:label "verb class" ; + rdfs:subPropertyOf net:objectValue . + +<http://amr.isi.edu/amr_data/SSC-01-01#b> a ns3:bind-01 ; + ns3:bind-01.ARG0 <http://amr.isi.edu/amr_data/SSC-01-01#g> ; + ns3:bind-01.ARG1 <http://amr.isi.edu/amr_data/SSC-01-01#s> ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#o2> a ns3:orbit-01 ; + ns3:orbit-01.ARG0 <http://amr.isi.edu/amr_data/SSC-01-01#o> ; + ns3:orbit-01.ARG1 <http://amr.isi.edu/amr_data/SSC-01-01#s2> ; + ns11:manner <http://amr.isi.edu/amr_data/SSC-01-01#o3> ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#root01> a ns2:AMR ; + ns2:has-id "SSC-01-01" ; + ns2:has-sentence "The Solar System is the gravitationally bound system of the Sun and the objects that orbit it, either directly or indirectly." ; + ns2:root <http://amr.isi.edu/amr_data/SSC-01-01#s> . + +<http://amr.isi.edu/amr_data/test-1#s> ns11:domain <http://amr.isi.edu/amr_data/test-1#s2> . + +<http://amr.isi.edu/amr_data/test-2#p> rdfs:label "Earth" . + +ns4:planet a ns2:NamedEntity ; + rdfs:comment "bug" ; + rdfs:subClassOf :AMR_Linked_Data . + +ns2:AMR a owl:Class ; + rdfs:subClassOf :AMR_Linked_Data . + +:AMR_Root a owl:Class ; + rdfs:subClassOf :AMR_Structure . + +:concept_and rdfs:subClassOf :AMR_Relation_Concept ; + :fromAmrLk ns2:and ; + :hasPhenomenaLink :phenomena_conjunction_and ; + :label "and" . + +:concept_bind-01 rdfs:subClassOf :AMR_Predicat_Concept ; + :fromAmrLk ns3:bind-01 ; + :label "bind-01" . + +:concept_gravitation rdfs:subClassOf :AMR_Term_Concept ; + :fromAmrLk ns11:gravitation ; + :label "gravitation" . + +:concept_manner rdfs:subClassOf :AMR_Predicat_Concept ; + :fromAmrLk ns11:manner ; + :isReifiedConcept true ; + :label "hasManner" . + +:concept_object rdfs:subClassOf :AMR_Term_Concept ; + :fromAmrLk ns11:object ; + :label "object" . + +:concept_or rdfs:subClassOf :AMR_Relation_Concept ; + :fromAmrLk ns2:or ; + :hasPhenomenaLink :phenomena_conjunction_or ; + :label "or" . + +:concept_orbit-01 rdfs:subClassOf :AMR_Predicat_Concept ; + :fromAmrLk ns3:orbit-01 ; + :label "orbit-01" . + +:concept_part rdfs:subClassOf :AMR_Predicat_Concept ; + :fromAmrLk ns11:part ; + :isReifiedConcept true ; + :label "hasPart" . + +:concept_sun rdfs:subClassOf :AMR_Term_Concept ; + :fromAmrLk ns11:sun ; + :label "sun" . + +:leaf_and_a a :AMR_Leaf ; + :edge_a_op1_s2 :leaf_sun_s2 ; + :edge_a_op2_o :leaf_object_o ; + :hasConcept :concept_and ; + :hasVariable :variable_a . + +:leaf_direct-02_d a :AMR_Leaf ; + :hasConcept :concept_direct-02 ; + :hasVariable :variable_d . + +:leaf_direct-02_d2 a :AMR_Leaf ; + :edge_d2_polarity_negative :value_negative ; + :hasConcept :concept_direct-02 ; + :hasVariable :variable_d2 . + +:leaf_or_o3 a :AMR_Leaf ; + :edge_o3_op1_d :leaf_direct-02_d ; + :edge_o3_op2_d2 :leaf_direct-02_d2 ; + :hasConcept :concept_or ; + :hasVariable :variable_o3 . + +:leaf_orbit-01_o2 a :AMR_Leaf ; + :edge_o2_ARG0_o :leaf_object_o ; + :edge_o2_ARG1_s2 :leaf_sun_s2 ; + :hasConcept :concept_orbit-01 ; + :hasVariable :variable_o2 . + +:phenomena_conjunction_and a owl:Class ; + rdfs:subClassOf :phenomena_conjunction ; + :hasConceptLink "and" ; + :label "conjunction-AND" . + +:phenomena_conjunction_or a owl:Class ; + rdfs:subClassOf :phenomena_conjunction ; + :hasConceptLink "or" ; + :label "conjunction-OR" . + +:role_domain a owl:Class ; + rdfs:subClassOf :AMR_NonCore_Role ; + :hasRelationName "domain" ; + :label "domain" ; + :toReifyAsConcept "domain" ; + :toReifyWithBaseEdge "ARG0" ; + :toReifyWithHeadEdge "ARG1" . + +:role_name a owl:Class ; + rdfs:subClassOf :AMR_NonCore_Role ; + :label "name" . + +:role_polarity a owl:Class ; + rdfs:subClassOf :AMR_Specific_Role ; + :label "polarity" . + +:value_SolarSystem a :AMR_Value ; + rdfs:label "Solar System" . + +:value_negative a :AMR_Value ; + rdfs:label "negative" . + +:variable_a a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#a> ; + :label "a" . + +:variable_b a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#b> ; + :label "b" . + +:variable_d a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#d> ; + :label "d" . + +:variable_d2 a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#d2> ; + :label "d2" . + +:variable_g a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#g> ; + :label "g" . + +:variable_m9 a ns11:manner, + :AMR_Variable ; + :isReifiedVariable true ; + :label "m9" . + +:variable_o a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#o> ; + :label "o" . + +:variable_o2 a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#o2> ; + :label "o2" . + +:variable_o3 a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#o3> ; + :label "o3" . + +:variable_p a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#p> ; + :label "p" ; + :name "Solar System" . + +:variable_p9 a ns11:part, + :AMR_Variable ; + :isReifiedVariable true ; + :label "p9" . + +:variable_s a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#s> ; + :label "s" . + +:variable_s2 a :AMR_Variable ; + :fromAmrLk <http://amr.isi.edu/amr_data/SSC-01-01#s2> ; + :label "s2" . + +sys:Degree a owl:Class ; + rdfs:subClassOf sys:Out_Structure . + +sys:Entity a owl:Class ; + rdfs:subClassOf sys:Out_Structure . + +sys:Feature a owl:Class ; + rdfs:subClassOf sys:Out_Structure . + +sys:Out_AnnotationProperty a owl:AnnotationProperty . + +net:Axiom_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:Feature a owl:Class ; + rdfs:subClassOf net:Net_Structure . + +net:Individual_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:atomClass_system_p a net:Atom_Class_Net ; + net:coverBaseNode :leaf_system_p ; + net:coverNode :leaf_system_p ; + net:hasClassName "system" ; + net:hasNaming "system" . + +net:class_list a owl:Class ; + rdfs:label "classList" ; + rdfs:subClassOf net:Type . + +net:has_value a owl:AnnotationProperty ; + rdfs:subPropertyOf net:netProperty . + +net:objectType a owl:AnnotationProperty ; + rdfs:label "object type" ; + rdfs:subPropertyOf net:objectProperty . + +<http://amr.isi.edu/amr_data/SSC-01-01#a> a ns2:and ; + ns11:op1 <http://amr.isi.edu/amr_data/SSC-01-01#s2> ; + ns11:op2 <http://amr.isi.edu/amr_data/SSC-01-01#o> ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#d> a ns3:direct-02 ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#d2> a ns3:direct-02 ; + ns11:polarity "-" ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#g> a ns11:gravitation ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#o3> a ns2:or ; + ns11:op1 <http://amr.isi.edu/amr_data/SSC-01-01#d> ; + ns11:op2 <http://amr.isi.edu/amr_data/SSC-01-01#d2> ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#p> a ns4:planet, + ns4:system ; + rdfs:label "Solar System" ; + rdfs:subClassOf :AMR_Linked_Data . + +ns4:system a ns2:NamedEntity ; + rdfs:label "system" ; + rdfs:subClassOf :AMR_Linked_Data . + +ns3:bind-01 a ns2:Frame ; + rdfs:subClassOf :AMR_Linked_Data . + +ns3:orbit-01 a ns2:Frame ; + rdfs:subClassOf :AMR_Linked_Data . + +ns11:gravitation a ns2:Concept ; + rdfs:subClassOf :AMR_Linked_Data . + +ns11:manner a ns2:Role ; + rdfs:subClassOf :AMR_Linked_Data . + +ns11:object a ns2:Concept ; + rdfs:subClassOf :AMR_Linked_Data . + +ns11:part a ns2:Role ; + rdfs:subClassOf :AMR_Linked_Data . + +ns11:sun a ns2:Concept ; + rdfs:subClassOf :AMR_Linked_Data . + +ns11:system a ns2:Concept ; + rdfs:subClassOf :AMR_Linked_Data . + +ns2:NamedEntity a ns2:Concept, + owl:Class, + owl:NamedIndividual ; + rdfs:label "AMR-EntityType", + "AMR-Term" ; + rdfs:subClassOf :AMR_Linked_Data . + +ns2:and a ns2:Concept ; + rdfs:subClassOf :AMR_Linked_Data . + +ns2:or a ns2:Concept ; + rdfs:subClassOf :AMR_Linked_Data . + +:AMR_Phenomena a owl:Class ; + rdfs:subClassOf :AMR_Structure . + +:AMR_Relation_Concept a owl:Class ; + rdfs:subClassOf :AMR_Concept . + +:AMR_Value a owl:Class ; + rdfs:subClassOf :AMR_Element . + +:concept_direct-02 rdfs:subClassOf :AMR_Predicat_Concept ; + :fromAmrLk ns3:direct-02 ; + :label "direct-02" . + +:concept_system rdfs:subClassOf :AMR_Term_Concept ; + :fromAmrLk ns4:system, + ns11:system ; + :label "system" . + +:hasLink a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:phenomena_conjunction a owl:Class ; + rdfs:subClassOf :AMR_Phenomena ; + :hasConceptLink "contrast-01", + "either", + "neither" ; + :label "conjunction" . + +:role_op1 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op1" . + +:role_op2 a owl:Class ; + rdfs:subClassOf :AMR_Op_Role ; + :label "op2" . + +sys:Out_ObjectProperty a owl:ObjectProperty . + +net:Class_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:Property_Net a owl:Class ; + rdfs:subClassOf net:Net . + +net:objectProperty a owl:AnnotationProperty ; + rdfs:label "object attribute" . + +<http://amr.isi.edu/amr_data/SSC-01-01#o> a ns11:object ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#s> a ns11:system ; + ns11:domain <http://amr.isi.edu/amr_data/SSC-01-01#p> ; + ns11:part <http://amr.isi.edu/amr_data/SSC-01-01#a> ; + rdfs:subClassOf :AMR_Linked_Data . + +<http://amr.isi.edu/amr_data/SSC-01-01#s2> a ns11:sun ; + rdfs:subClassOf :AMR_Linked_Data . + +ns3:direct-02 a ns2:Frame ; + rdfs:subClassOf :AMR_Linked_Data . + +ns2:Frame a ns2:Concept, + owl:Class, + owl:NamedIndividual ; + rdfs:label "AMR-PropBank-Frame" ; + rdfs:subClassOf :AMR_Linked_Data . + +:AMR_Concept a owl:Class ; + rdfs:subClassOf :AMR_Element . + +:AMR_Specific_Role a owl:Class ; + rdfs:subClassOf :AMR_Role . + +:fromAmrLk a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:getProperty a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:hasReificationDefinition a owl:AnnotationProperty ; + rdfs:range rdfs:Literal ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +:leaf_gravitation_g a :AMR_Leaf ; + :hasConcept :concept_gravitation ; + :hasVariable :variable_g . + +:toReify a owl:AnnotationProperty ; + rdfs:subPropertyOf :AMR_AnnotationProperty . + +net:has_relation_value a owl:AnnotationProperty ; + rdfs:label "has relation value" ; + rdfs:subPropertyOf net:has_object . + +net:list a owl:Class ; + rdfs:label "list" ; + rdfs:subClassOf net:Type . + +ns3:FrameRole a ns2:Role, + owl:Class, + owl:NamedIndividual ; + rdfs:label "AMR-PropBank-Role" ; + rdfs:subClassOf :AMR_Linked_Data . + +:AMR_Element a owl:Class ; + rdfs:subClassOf :AMR_Structure . + +:AMR_Term_Concept a owl:Class ; + rdfs:subClassOf :AMR_Concept . + +:leaf_object_o a :AMR_Leaf ; + :hasConcept :concept_object ; + :hasVariable :variable_o . + +:leaf_sun_s2 a :AMR_Leaf ; + :hasConcept :concept_sun ; + :hasVariable :variable_s2 . + +:role_ARG0 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG0" . + +:role_ARG1 a owl:Class ; + rdfs:subClassOf :AMR_Core_Role ; + :label "ARG1" . + +net:typeProperty a owl:AnnotationProperty ; + rdfs:label "type property" . + +:AMR_NonCore_Role a owl:Class ; + rdfs:subClassOf :AMR_Role . + +:AMR_Predicat_Concept a owl:Class ; + rdfs:subClassOf :AMR_Concept . + +:AMR_Role a owl:Class ; + rdfs:subClassOf :AMR_Element . + +:leaf_system_p a :AMR_Leaf ; + :edge_p_name_SolarSystem :value_SolarSystem ; + :hasConcept :concept_system ; + :hasVariable :variable_p . + +:leaf_system_s a :AMR_Leaf ; + :edge_s_domain_p :leaf_system_p ; + :hasConcept :concept_system ; + :hasVariable :variable_s . + +sys:Out_Structure a owl:Class ; + rdfs:label "Output Ontology Structure" . + +net:Atom_Class_Net a owl:Class ; + rdfs:subClassOf net:Class_Net . + +net:netProperty a owl:AnnotationProperty ; + rdfs:label "netProperty" . + +:AMR_ObjectProperty a owl:ObjectProperty ; + rdfs:subPropertyOf owl:topObjectProperty . + +:AMR_Structure a owl:Class . + +cprm:configParamProperty a rdf:Property ; + rdfs:label "Config Parameter Property" . + +net:Net_Structure a owl:Class ; + rdfs:label "Semantic Net Structure" ; + rdfs:comment "A semantic net captures a set of nodes, and associates this set with type(s) and value(s)." . + +rdf:Property a owl:Class . + +:AMR_Relation a owl:Class ; + rdfs:subClassOf :AMR_Structure . + +net:Type a owl:Class ; + rdfs:label "Semantic Net Type" ; + rdfs:subClassOf net:Net_Structure . + +net:has_object a owl:AnnotationProperty ; + rdfs:label "relation" ; + rdfs:subPropertyOf net:netProperty . + +:AMR_Op_Role a owl:Class ; + rdfs:subClassOf :AMR_Role . + +net:Net a owl:Class ; + rdfs:subClassOf net:Net_Structure . + +:AMR_AnnotationProperty a owl:AnnotationProperty . + +:AMR_Core_Role a owl:Class ; + rdfs:subClassOf :AMR_Role . + +:AMR_Variable a owl:Class ; + rdfs:subClassOf :AMR_Element . + +:AMR_Leaf a owl:Class ; + rdfs:subClassOf :AMR_Structure . + +net:objectValue a owl:AnnotationProperty ; + rdfs:label "valuations"@fr ; + rdfs:subPropertyOf net:objectProperty . + +:AMR_Edge a owl:Class ; + rdfs:subClassOf :AMR_Structure . + +:AMR_Linked_Data a owl:Class . + +[] a owl:AllDisjointClasses ; + owl:members ( sys:Degree sys:Entity sys:Feature ) . + diff --git a/tests/dev_tests/test_rule_atomic_extractor.py b/tests/dev_tests/test_rule_atomic_extractor.py index 07d4a516bd9e989c0f3fff49b75e64d23483588b..af118602b11184121ff64d2ea64abd6d8afecdc6 100644 --- a/tests/dev_tests/test_rule_atomic_extractor.py +++ b/tests/dev_tests/test_rule_atomic_extractor.py @@ -26,6 +26,7 @@ from tenet.transduction.rdfterm_computer import __update_uri_with_prefix from tenet.transduction import rdfterm_computer, prefix_handle from tenet.transduction import net from tenet.scheme.amr_rule.transduction import atomic_class_extractor as rule_1 +from tenet.scheme.amr_rule.transduction import atomic_individual_extractor as rule_2 from tenet.scheme import amr_rule @@ -86,6 +87,19 @@ def test_search_pattern_1(graph): result_str += f' {selection.conceptName.n3(graph.namespace_manager)}' print(result_str) return pattern_result_set + + +def test_search_pattern_2(graph): + pattern_result_set = rule_2.__search_pattern(graph) + print(f'\n ----- number of selection found: {len(pattern_result_set)}') + for selection in pattern_result_set: + result_str = f'>>> ' + result_str += f'{selection.baseLeaf.n3(graph.namespace_manager)}' + result_str += f' {selection.conceptName.n3(graph.namespace_manager)}' + result_str += f' {selection.valueLabel.n3(graph.namespace_manager)}' + result_str += f' {selection.classNet.n3(graph.namespace_manager)}' + print(result_str) + return pattern_result_set #============================================================================== @@ -113,6 +127,7 @@ if __name__ == '__main__': graph = load_test_graph() print('\n \n') + print('\n ///////////////////// Extraction Rule 1') print('\n *** Step Test ***') print('\n -- Step 1: Search Pattern') @@ -123,5 +138,17 @@ if __name__ == '__main__': print('\n *** Unit Test ***') test_rule_application(graph, rule_1.extract_atomic_class) print('\n \n') + + print('\n ///////////////////// Extraction Rule 2') + print('\n *** Step Test ***') + + print('\n -- Step 1: Search Pattern') + pattern_set = test_search_pattern_2(graph) + + print('\n \n') + + print('\n *** Unit Test ***') + test_rule_application(graph, rule_2.extract_atomic_individual) + print('\n \n') print('\n *** - ***') \ No newline at end of file