Skip to content

[Question]: How to merge output from flair with NER model #3609

Open
@B0rner

Description

@B0rner

Question

Hey,

I'm fusing flair with the ner-english-ontonotes-large model to determine entities in text, which is working really great.
Further processing of these NER results becomes difficult when texts contain certain entities differently.
For example, If I have a news about the greatest duck of Duckburg: Donald Duck, like this:

"Donald Duck is the famous person from Duckburg. Donald lives there with his family"

Flair/NLP will generate the 2 person entries: "Donald Duck" and "Donald".

I know, this is probably not a flair specific question, but is there a way, to merge/find the connection between "Donald Duck" and "Donald"?

The use case is to collect for example all the persons in a text and it is sub-optimal, if the output handles "Donald Duck" and "Donald" as different persons.

On the other hand, the model is great to recognize when the same word does not belong to the same entity, like Hamburger. The model exactly "knows" if the is the GPE, NORP or a PRODUCT.

What I need is the reverse case: different words that mean the same thing.

Any idea how to handle/merge this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedwontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions