Converts a IOB or IOB2 representation of NER to a user-friendly one, by associating the tokens of recognized entities and their label.
This is the companion object of NerOverwriter.
This is the companion object of NerOverwriter. Please refer to that class for the documentation.
Works with different NER representations as tags Supports: IOB and IOB2 https://en.wikipedia.org/wiki/Inside%E2%80%93outside%E2%80%93beginning_(tagging)
Converts a IOB or IOB2 representation of NER to a user-friendly one, by associating the tokens of recognized entities and their label. Results in
CHUNK
Annotation type.NER chunks can then be filtered by setting a whitelist with
setWhiteList
. Chunks with no associated entity (tagged "O") are filtered.See also Inside–outside–beginning (tagging) for more information.
Example
This is a continuation of the example of the NerDLModel. See that class on how to extract the entities.
The output of the NerDLModel follows the Annotator schema and can be converted like so:
After the converter is used: