Downloads · 30 days
47
1% of all-time downloads
almanach/camembert-bio-gliner-v0.1
camembert-bio-gliner-v0.1 is a token classification model from almanach. Use it when you need labels on individual words, such as names. It is set up for gliner. The card lists the license as mit.
<a href=https://camembert-bio-model.fr/ <img width="300px" src="https://camembert-bio-model.fr/authors/camembert-bio/camembert-bio-ner-logo.png" </a
Downloads · 30 days
47
1% of all-time downloads
All-time downloads
5.9K
Public
Repo size
1.1 GB
Likes
9
Public
Click a slice to open those files.
.bin542 MB · 100%
From the Hugging Face model README
<a href=https://camembert-bio-model.fr/> <img width="300px" src="https://camembert-bio-model.fr/authors/camembert-bio/camembert-bio-ner-logo.png"> </a>
CamemBERT-bio-gliner is a Named Entity Recognition (NER) model capable of identifying any french biomedical entity type using a BERT-like encoder. It provides a practical alternative to traditional NER models, which are limited to predefined entities, and Large Language Models (LLMs) that, despite their flexibility, are costly and large for resource-constrained scenarios. CamemBERT-bio is used as a backbone. This model is based on the fantastic work of Urchade Zaratiana on the GLiNER architecture.
This is the v0.1 of the CamemBERT-bio-gliner model. There might be a few quirks or unexpected predictions. So, if you notice anything off or have suggestions for improvements, we'd really appreciate hearing from you!
To use this model, you must install the GLiNER Python library:
!pip install gliner
Once you've downloaded the GLiNER library, you can import the GLiNER class. You can then load this model using GLiNER.from_pretrained and predict entities with predict_entities.
from gliner import GLiNER
model = GLiNER.from_pretrained("almanach/camembert-bio-gliner-v0.1")
text = """
Mme A.P. âgée de 52 ans, non tabagique, ayant un diabète de type 2 a été hospitalisée pour une pneumopathie infectieuse. Cette patiente présentait depuis 2 ans des infections respiratoires traités en ambulatoire. L’examen physique a trouvé une fièvre à 38ºc et un foyer de râles crépitants de la base pulmonaire droite.
"""
labels = ["Âge", "Patient", "Maladie", "Symptômes"]
entities = model.predict_entities(text, labels, threshold=0.5, flat_ner=True)
for entity in entities:
print(entity["text"], "=>", entity["label"])
Mme A.P. => Patient
52 ans => Âge
pneumopathie infectieuse => Maladie
infections respiratoires => Maladie
fièvre => Symptômes
râles crépitants => Symptômes