From a8494cf826ea4ef72089d94ebbf2db52c5b8a5e3 Mon Sep 17 00:00:00 2001 From: Leolty <569359974@qq.com> Date: Sun, 14 Aug 2022 02:52:04 +0800 Subject: [PATCH] black line len 80 format --- fortex/health/processors/ner_label_processor.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fortex/health/processors/ner_label_processor.py b/fortex/health/processors/ner_label_processor.py index 30c8e1bd..55932867 100644 --- a/fortex/health/processors/ner_label_processor.py +++ b/fortex/health/processors/ner_label_processor.py @@ -62,7 +62,9 @@ def load_lang_model(lang_model): download_url = CUSTOM_SPACYMODEL_URL[lang_model] command = [sys.executable, "-m", "pip", "install"] + [download_url] - subprocess.run(command, env=os.environ.copy(), encoding="utf8", check=False) + subprocess.run( + command, env=os.environ.copy(), encoding="utf8", check=False + ) cls = importlib.import_module(lang_model) return cls.load() else: @@ -112,10 +114,14 @@ def _process(self, input_pack: DataPack): for ent in result.ents: if "disease" in labels: if ent.label_ == "DISEASE": - Disease(pack=input_pack, begin=ent.start_char, end=ent.end_char) + Disease( + pack=input_pack, begin=ent.start_char, end=ent.end_char + ) if "chemical" in labels: if ent.label_ == "CHEMICAL": - Chemical(pack=input_pack, begin=ent.start_char, end=ent.end_char) + Chemical( + pack=input_pack, begin=ent.start_char, end=ent.end_char + ) @classmethod def default_configs(cls):