From b851beac5fe884d08961654700106931e9ab7e2c Mon Sep 17 00:00:00 2001 From: Joshua Wendland <80349780+joshuawe@users.noreply.github.com> Date: Fri, 16 Feb 2024 11:58:25 +0100 Subject: [PATCH] bug fix --- src/delphi/eval/token_labelling.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/delphi/eval/token_labelling.py b/src/delphi/eval/token_labelling.py index d2d2b45e..80673e03 100644 --- a/src/delphi/eval/token_labelling.py +++ b/src/delphi/eval/token_labelling.py @@ -165,11 +165,11 @@ def label_batch_sentences( corresponding token length where each entry provides the labels/categories for the token. Sentence -> Token -> Labels """ - global NLP + global NLP, SPACY_MODEL if NLP is None: # Load english language model - NLP = spacy.load("en_core_web_trf") + NLP = spacy.load(SPACY_MODEL) # labelled tokens, list holding sentences holding tokens holding corresponding token labels labelled_sentences: list[list[dict[str, bool]]] = list()