Skip to content

Commit

Permalink
black line len 80 format
Browse files Browse the repository at this point in the history
  • Loading branch information
Leolty committed Aug 13, 2022
1 parent 2694aec commit a8494cf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions fortex/health/processors/ner_label_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit a8494cf

Please sign in to comment.