Skip to content
Snippets Groups Projects
Commit 41549002 authored by Paweł Walkowiak's avatar Paweł Walkowiak
Browse files

Add case

parent 4c9a546b
Branches
Tags
1 merge request!13Fix anonymizer errors
Pipeline #15172 passed with stages
in 1 minute and 37 seconds
...@@ -96,8 +96,7 @@ class NERFileMorphosyntacticDictionary(MorphosyntacticDictionary): ...@@ -96,8 +96,7 @@ class NERFileMorphosyntacticDictionary(MorphosyntacticDictionary):
if original_entry_type_name in self._dictionary: if original_entry_type_name in self._dictionary:
entry_type = original_entry_type_name entry_type = original_entry_type_name
_log.info(f"IndexError entry_type " _log.info(f"entry_type {entry_type} morpho_tag {morpho_tag}")
f"{entry_type} morpho_tag {morpho_tag}")
if entry_type in self._dictionary: if entry_type in self._dictionary:
_log.info( _log.info(
f"Dictionary\ f"Dictionary\
...@@ -115,6 +114,9 @@ class NERFileMorphosyntacticDictionary(MorphosyntacticDictionary): ...@@ -115,6 +114,9 @@ class NERFileMorphosyntacticDictionary(MorphosyntacticDictionary):
) )
word = self._dictionary[entry_type][morpho_tag][lemma] word = self._dictionary[entry_type][morpho_tag][lemma]
elif morpho_tag == "ign": # unknown form
lemma = "ABC"
word = lemma
else: else:
morpho_tag = random.choice( morpho_tag = random.choice(
list(self._dictionary[entry_type].keys()) list(self._dictionary[entry_type].keys())
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment