CentreForDigitalHumanities / CentreForDigitalHumanities/multiNER
Position index not corresponding to index in text
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
When an `IntegratedNamedEntity` instance is asked to return the text for the entity (i.e. `get_text()`, it does 'something smart' to retrieve the text of choice (it includes user configurable settings if need be). However, this does not update the position of the text if that is needed. Multiner deals correctly with entities that overlap (e.g. 'John Doe' and 'John' at index 14) by considering them the same entity. This is also true for an example like this, where the suggested entities does not start at the position but overlap nonetheless:
'''
[{ 'text': 'La Cassa Rurale di Trento', 'pos': 22, 'type': 'LOC' }, 'text': 'Trento', 'pos': 38, 'type': 'LOC']
'''
However, if in a case like the above `get_text` is called, and the 'something smart' does its work, the position might be completely off (i.e. multiNER might return something like `{ 'text': ' Trento', 'pos': 22, 'type': 'LOC' }` (Note the incorrect index)!
- [ ] Add unit test to prove the above
- [ ] Fix the bug
- [ ] Modify unit test to prove that multiner can deal with cases like this
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.