urchade / GLiNER

Generalist and Lightweight Model for Named Entity Recognition (Extract any entity types from texts) @ NAACL 2024
https://arxiv.org/abs/2311.08526
Apache License 2.0
1.46k stars 126 forks source link

Capturing relationship between entities #176

Open supreme-core opened 3 months ago

supreme-core commented 3 months ago

Hello,

Is there a way to capture relationship between entities ?

For example,

I have a house with two floor, floor 1 has a kitchen, nook and living room. Floor 2 has a master bedroom and 2 guest rooms.

It should return ...

Entities: House Floor 1 Kitchen Nook Living room Floor 2 Master Bedroom 2 Guest rooms

Relationships: House-contains-Floors Floors-contains-Floor1 Floors-contains-Floor2 Floor1-has-kitchen Floor1-has-nook Floor1-has-LivingRoom Floor2-Has-MasterBedrrom Floor2-Has-GuestRooms

Ingvarstep commented 3 months ago

@supreme-core , hello!

You can try out the multi-task model, it supports relation extraction, please, check this part of the model card https://huggingface.co/knowledgator/gliner-multitask-large-v0.5#construct-relations-extraction-pipeline-with-utca

supreme-core commented 1 month ago

@Ingvarstep I'll circle back to try it at some point.

Thanks for the recommendation!