From 45be777cfd12609150973b95d496cf232862526f Mon Sep 17 00:00:00 2001 From: Juho Inkinen <34240031+juhoinkinen@users.noreply.github.com> Date: Tue, 24 Sep 2024 08:21:31 +0300 Subject: [PATCH] Reraise LookupErrors that do not mention punkt_tab --- annif/analyzer/analyzer.py | 2 ++ 1 file changed, 2 insertions(+) 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."""