From e93a8ddaf71b753475887e62f8702743f6ef7685 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 13 Feb 2023 15:55:45 +0100 Subject: [PATCH] Fix type annotation of `PottsTokenizerWithNegation` --- unimore_bda_6/tokenizer/potts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unimore_bda_6/tokenizer/potts.py b/unimore_bda_6/tokenizer/potts.py index 0473425..414832c 100644 --- a/unimore_bda_6/tokenizer/potts.py +++ b/unimore_bda_6/tokenizer/potts.py @@ -127,7 +127,7 @@ class PottsTokenizerWithNegation(PottsTokenizer): Version of `.PottsTokenizer` which after tokenizing applies `nltk.sentiment.util.mark_negation`. """ - def tokenize(self, text: str) -> str: + def tokenize(self, text: str) -> t.Iterator[str]: # Apply the base tokenization words = super().tokenize(text) # Convert to a list (sigh) the iterator