EntityRecognizer
Abstract Base class for recognizing entities in a batch of text.
Used in the recon.insights
module for understanding the kinds
of examples your model is having the most trouble with.
labels: List[str]
(property, readonly)¶
Return List of String Labels
Exceptions
Type | Description |
---|---|
NotImplementedError |
Not Implemented, override |
Returns
Type | Description |
---|---|
List[str] |
List[str]: List of labels the model can predict |
predict(self, texts)
¶
Show source code in recon/recognizer.py
28 29 30 31 32 33 34 35 36 37 38 39 40 |
|
Run model inference on a batch of raw texts.
Parameters
Name | Type | Description | Default |
---|---|---|---|
texts |
Iterable[str] |
Raw text examples | required |
Exceptions
Type | Description |
---|---|
NotImplementedError |
Not implemented, override |
Returns
Type | Description |
---|---|
Iterator[recon.types.Example] |
Iterator[Example]: Iterator of Examples |