diff --git a/probablepeople/__init__.py b/probablepeople/__init__.py index f5acd4b..a961b8e 100644 --- a/probablepeople/__init__.py +++ b/probablepeople/__init__.py @@ -76,7 +76,7 @@ def _loadTagger(model_type: str) -> pycrfsuite.Tagger: TAGGER = _loadTagger("generic") -def parse(raw_string: str, type: str | None = None) -> list[tuple[str, str]]: +def parse(raw_string: str, type: typing.Optional[str] = None) -> list[tuple[str, str]]: if type is None: type = "generic" tagger = TAGGERS[type] @@ -99,7 +99,9 @@ def parse(raw_string: str, type: str | None = None) -> list[tuple[str, str]]: return list(zip(tokens, tags)) -def tag(raw_string: str, type: str | None = None) -> tuple[dict[str, str], str]: +def tag( + raw_string: str, type: typing.optional[str] = None +) -> tuple[dict[str, str], str]: tagged = {} prev_label = None