Commit 31199ab8 authored by Raul Sirel's avatar Raul Sirel
Browse files

change lang field name

parent 5082f4ef
Pipeline #4882 canceled with stages
in 3 minutes and 18 seconds
......@@ -37,13 +37,13 @@ def test_mlp_process(mlp: MLP):
assert "lemmas" in mlp_text
assert isinstance(mlp_text["lemmas"], str) is True
assert "lang" in mlp_text
assert isinstance(mlp_text["lang"], dict) is True
assert "language" in mlp_text
assert isinstance(mlp_text["language"], dict) is True
assert "texta_facts" in result
assert isinstance(result["texta_facts"], list) is True
if mlp_text["lang"]["analysis_lang"] in ("ru", "ar"):
if mlp_text["language"]["analysis_lang"] in ("ru", "ar"):
assert "transliteration" in mlp_text
assert "style" not in mlp_text["text"]
......@@ -136,7 +136,7 @@ class Document:
container = dict()
container["text"] = self.get_words()
texta_facts = self.facts_to_json()
container["lang"] = {"detected_lang": self.dominant_language_code,
container["language"] = {"detected_lang": self.dominant_language_code,
"analysis_lang": self.analysis_lang}
if "lemmas" in self.analyzers: container["lemmas"] = self.get_lemma()
if "pos_tags" in self.analyzers: container["pos_tags"] = self.get_pos_tags()
Markdown is supported
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