🐛 Bug
Information
Model I am using (Bert, XLNet ...): pipeline('ner', grouped_entities=True)
Language I am using the model on (English, Chinese ...): English
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
from transformers import pipeline
ner = pipeline('ner', grouped_entities=True)
ner("the sapodilla tree is native to Central America")
Expected behavior
The output says that "##di" is one of the named entities. It doesn't seem like partial tokens should possibly be returned as predicted named entities. Instead, I imagine that the desired result is that either the entire word "sapodilla" is determined to be an entity group or nothing at all. Is this a bug or was this quirk consciously chosen to be allowed?
As a side note, another similar quirk here is that something like "U.S." occasionally gives just "U" or "S" as individual named entities, where "U.S." is desired. I consider this related to the above issue.
Environment info
transformers version: 3.0.2
- Platform: Linux-5.3.0-1032-azure-x86_64-with-glibc2.10
- Python version: 3.8.1
- PyTorch version (GPU?): 1.5.1 (False)
- Tensorflow version (GPU?): not installed (NA)
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no
🐛 Bug
Information
Model I am using (Bert, XLNet ...): pipeline('ner', grouped_entities=True)
Language I am using the model on (English, Chinese ...): English
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
Expected behavior
The output says that "##di" is one of the named entities. It doesn't seem like partial tokens should possibly be returned as predicted named entities. Instead, I imagine that the desired result is that either the entire word "sapodilla" is determined to be an entity group or nothing at all. Is this a bug or was this quirk consciously chosen to be allowed?
As a side note, another similar quirk here is that something like "U.S." occasionally gives just "U" or "S" as individual named entities, where "U.S." is desired. I consider this related to the above issue.
Environment info
transformersversion: 3.0.2