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

Freeze defaultdict

parent 9f4cf5ab
1 merge request!13Fix anonymizer errors
Pipeline #15185 passed with stages
in 1 minute and 35 seconds
......@@ -57,6 +57,9 @@ class NERFileMorphosyntacticDictionary(MorphosyntacticDictionary):
ner_tag, word, lemma, morpho_tag = line.split("\t")
replacement_dictionary[ner_tag][morpho_tag][lemma] = word
replacement_dictionary = {k: dict(v) for k, v
in replacement_dictionary.items()
if v} # freeze dict
return replacement_dictionary
def get_supported_detection_classes(self) -> List[Type[Detection]]:
......
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