diff --git a/annif/analyzer/analyzer.py b/annif/analyzer/analyzer.py index 4b647c18..129b882a 100644 --- a/annif/analyzer/analyzer.py +++ b/annif/analyzer/analyzer.py @@ -38,6 +38,8 @@ def __init__(self, **kwargs) -> None: "downloading it now." ) nltk.download(_NLTK_TOKENIZER_DATA) + else: + raise def tokenize_sentences(self, text: str) -> list[str]: """Tokenize a piece of text (e.g. a document) into sentences."""