Coverage for presidio_analyzer / predefined_recognizers / nlp_engine_recognizers / stanza_recognizer.py: 100%
6 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-03-29 09:03 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-03-29 09:03 +0000
1from typing import Optional
3from presidio_analyzer.predefined_recognizers.nlp_engine_recognizers.spacy_recognizer import ( # noqa: E501
4 SpacyRecognizer,
5)
8class StanzaRecognizer(SpacyRecognizer):
9 """
10 Recognize entities using the Stanza NLP package.
12 See https://stanfordnlp.github.io/stanza/.
13 Uses the spaCy-Stanza package (https://github.com/explosion/spacy-stanza) to align
14 Stanza's interface with spaCy's
15 """
17 def __init__(self, name: Optional[str] = None, **kwargs):
18 self.DEFAULT_EXPLANATION = self.DEFAULT_EXPLANATION.replace("Spacy", "Stanza")
19 super().__init__(name=name, **kwargs)