SpacyEntityRecognizer
Create an EntityRecognizer from a spaCy Langauge instance
labels: List[str] (property, readonly)¶
Return List of spaCy ner labels
Returns
| Type | Description |
|---|---|
List[str] |
List[str]: List of labels from spaCy ner pipe |
__init__(self, nlp)¶
Show source code in recon/recognizer.py
46 47 48 49 50 51 52 53 | |
Initialize a SpacyEntityRecognizer
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
nlp |
Language |
spaCy Language instance that can sets doc.ents | required |
predict(self, texts)¶
Show source code in recon/recognizer.py
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
Run spaCy nlp.pipe on a batch of raw texts.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
texts |
Iterable[str] |
Raw text examples | required |
Yields: Iterator[Example]: Examples constructed from spaCy Model predictions