spaCy icon indicating copy to clipboard operation
spaCy copied to clipboard

Standard Entity names

Open Treenity opened this issue 6 years ago • 6 comments

Feature description

Hi, it would be much appreciated to get something like a entity name standardisation, this way we can get ride of models differences. Exemple : en_core_web_md entity PERSON fr_core_news_md entity PER de_core_news_md entity PER es_core_news_md entity PER

They have the same meaning, but EN models use different entity names. Maybe in a future release, we could make this name "standard" as it was explain here https://spacy.io/api/annotation

it will allow developers to build language model switching a more easy task

PS: I'm not sure what is the need of a MISC entity, except make the model had overlapping with new entity... but maybe my understanding of this entity was wrong, have you some example of working with this entity?

Could the feature be a custom component or spaCy plugin?

This have to be in the EN_core model

Treenity avatar Apr 08 '20 11:04 Treenity

The NER models are trained from a number of different datasets, which may not be annotated according to the same guidelines, and we've kept the entity names from the original datasets.

The individual model pages under https://spacy.io/models link to documentation about the datasets. Some are documented better than others, but you can typically look up the original annotation guidelines / documentation / paper to see how the entity types were defined.

adrianeboyd avatar Apr 09 '20 17:04 adrianeboyd

Yeah I understand that, the thing is to be able to get a unique guideline between soaCy “official” models. If the spaCy team have accès to those datasets, it’s easy to update the entity name and retrain the model.

Actually developers need to change entity name depending of the model language(on English model I need to extract PERSON, but on French, it’s called PER).

I understand that some models don’t have all entities we can found on English model, but it’s going to be hard to follow when each model will have 10 or more entities if each model call their entities completely differently for the same thing.

It’s just a request to avoid possible errors for future developers and be able to get 1 global annotation template(specific case can be on the language doc of course)

Treenity avatar Apr 09 '20 18:04 Treenity

With the data that we have for training it is not going to be possible to have unified labels because of differences in the annotation schemes. We'd rather have users be aware of this and make it easy for people to refer to the original datasets and annotation guidelines.

I think the WikiNER categories are going to very comparable across languages, but the annotation schemes for most of the other languages aren't going to be as similar. If you are happy with the similarity of English OntoNotes PERSON vs. French WikiNER PER it should be relatively simple to normalize the labels in a post-processing step.

I do think PER/PERSON is going to be very similar across models, but most of the other categories are going to be trickier.

adrianeboyd avatar Apr 09 '20 18:04 adrianeboyd

Yeah I see... When you speak about normalize in post-process, you mean by detecting model Lang and then switch the entity label we are trying to extract or you lean that is possible to “retrain” the model with the entity label we want ?

Treenity avatar Apr 09 '20 19:04 Treenity

Yes - you could do some sort of normalization on the labels after the predictions, depending on which model you used to generate the NER output. Like Adriane said, it may depend on the use-case which entity types are "similar" enough to be "merged" or unified.

As I think there's not really an action point for us to follow up on, I'll close this. I do agree with @Treenity that it would be nice to have 1 global annotation template, but unfortunately the reality is that we have different annotation schemes from different sources, and we do want the models to reflect that ...

svlandeg avatar Apr 10 '20 10:04 svlandeg

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar May 20 '20 22:05 lock[bot]