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

Refinement Management Without Parent Found

parent 3cf22088
No related branches found
No related tags found
No related merge requests found
...@@ -90,9 +90,14 @@ def refine_mother_relation(graph): ...@@ -90,9 +90,14 @@ def refine_mother_relation(graph):
for row in parent_class_set: for row in parent_class_set:
if pattern.target_class_net != row.parent_class_net: if pattern.target_class_net != row.parent_class_net:
# Associate mother relation between class nets # Associate mother relation between target and found parent
new_triples = __associate_mother_relation(graph, pattern.target_class_net, row.parent_class_net) new_triples = __associate_mother_relation(graph, pattern.target_class_net, row.parent_class_net)
rule_triple_list.extend(new_triples) rule_triple_list.extend(new_triples)
if len(parent_class_set) == 0: # no parent found
# Associate mother relation between target and origin mother
new_triples = __associate_mother_relation(graph, pattern.target_class_net, pattern.mother_class_net)
rule_triple_list.extend(new_triples)
return rule_label, rule_triple_list return rule_label, rule_triple_list
...@@ -56,7 +56,7 @@ test_data_dir = f'{INPUT_DIR_PATH}amrDocuments/' ...@@ -56,7 +56,7 @@ test_data_dir = f'{INPUT_DIR_PATH}amrDocuments/'
# onto_prefix = f'SimpleTest' # onto_prefix = f'SimpleTest'
# base_output_name = f'SimpleTest' # base_output_name = f'SimpleTest'
uuid_num = '01' uuid_num = '02'
amrld_dir_path = f'{test_data_dir}dev/solar-system-{uuid_num}/' amrld_dir_path = f'{test_data_dir}dev/solar-system-{uuid_num}/'
amrld_file_path = f'{amrld_dir_path}SSC-{uuid_num}-01.stog.amr.ttl' amrld_file_path = f'{amrld_dir_path}SSC-{uuid_num}-01.stog.amr.ttl'
base_output_name = f'SolarSystemDev{uuid_num}' base_output_name = f'SolarSystemDev{uuid_num}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment