diff --git a/common/management/commands/valunifier_tei.py b/common/management/commands/valunifier_tei.py index 9a0c56fc2b4b469e096a10de6c38f969a17988ce..b4ecf8ba7bbc731953beb1bfeb18b3badbed5d17 100644 --- a/common/management/commands/valunifier_tei.py +++ b/common/management/commands/valunifier_tei.py @@ -387,8 +387,17 @@ def valid_connection(lexical_unit, schema_hook, connections_info): if schema_id in lu_schema_connections[lexical_unit]: return True if connected_lu_count[schema_id] == 0: - # @TODO: check for "siÄ™" - return True + in_lemma = False + in_lemma |= (' siÄ™ ' in lexical_unit.base) + in_lemma |= (lexical_unit.base.endswith(' siÄ™')) + in_schema = False + in_schema |= (schema_hook.subentry.inherent_sie.name == 'true') + for position in schema_hook.schema.positions.all(): + if position.phrases_count == 1: + phrase_type = position.phrase_types.all()[0].main_type + in_schema |= (phrase_type == 'refl') + in_schema |= (phrase_type == 'recip') + return (in_lemma == in_schema) return False def write_phrases_coll(parent, phrases_list):