diff --git a/importer/Example.py b/importer/Example.py index 9cd223324960c7f25c4de8c1e92b6b1743aa359e..bd93adba77a8cae466602ec042d40f55e6e1a7d3 100644 --- a/importer/Example.py +++ b/importer/Example.py @@ -81,9 +81,13 @@ class Example: note=self._note) example.save() if not self._phrases.exists(): + print(' STORING EXAMPLE:', self._sentence) + print(' example not connected to syntax') # example not connected to syntax pass elif self._arguments is None: + print(' STORING EXAMPLE:', self._sentence) + print(' example connected to syntax but not connected to semantics') # example connected to syntax but not connected to semantics connection = ExampleConnection(example=example) connection.save() @@ -102,6 +106,7 @@ class Example: hook.save() connection.schema_connections.add(hook) elif self._arguments.exists(): + #print(' example connected to both syntax and semantics and connection can be transfered') # example connected to both syntax and semantics # and connection can be transfered lemma, meaning = meanings[self._meaning] @@ -126,6 +131,8 @@ class Example: hook.save() connection.schema_connections.add(hook) else: + print(' STORING EXAMPLE:', self._sentence) + print(' example connected to both syntax and semantics but connection cannot be transfered or connected to schema but not to any phrases in it; treated as not connected to syntax') # example connected to both syntax and semantics # but connection cannot be transfered # or connected to schema but not to any phrases in it @@ -205,6 +212,8 @@ class IllustratesSemantics: lu = meanings.locate(meaning) misconnected.write('% ' + sentence + '\n') misconnected.write(base + '\t' + str(lu) + '\t' + str(illustrated_syntax._schema_key) + '\t' + str(eid) + '\n\n') + # KKK return None here to attach only to schema? (e.g. awaria) + return None else: max_args = max(possible_arguments.keys()) if len(possible_arguments[max_args]) > 1: @@ -224,13 +233,15 @@ class IllustratesSemantics: if argument_str not in l3s[0]: equal = False l3s.append('\t' + '\t'.join(roles)) - if equal: + #if equal: + if True: arguments = [] for role_illustrations, free in possible_arguments[max_args]: arguments += role_illustrations arguments += free print(('\n'.join(l3s) + '\n')) - else: + #else: + if not equal: out_file.write(l1) out_file.write(l2) out_file.write('\n'.join(l3s) + '\n')