Skip to content

edsnlp.pipelines.ner.drugs.patterns

drugs_file = BASE_DIR / 'resources' / 'drugs.json' module-attribute

get_patterns()

Source code in edsnlp/pipelines/ner/drugs/patterns.py
 9
10
11
12
def get_patterns() -> Dict[str, List[str]]:

    with (open(drugs_file, "r")) as f:
        return json.load(f)