Downloads · 30 days
12
1% of all-time downloads
iahlt/span-marker-alephbert-small-nemo-mt-he
span-marker-alephbert-small-nemo-mt-he is a token classification model from iahlt. Use it when you need labels on individual words, such as names. It is set up for span-marker.
This is a SpanMarker model trained on the imvladikon/nemocorpus dataset that can be used for Named Entity Recognition.
Downloads · 30 days
12
1% of all-time downloads
All-time downloads
1K
Public
Parameters
78.7M
946 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors315 MB · 99%
From the Hugging Face model README
This is a SpanMarker model trained on the imvladikon/nemo_corpus dataset that can be used for Named Entity Recognition.
| Label | Examples |
|---|---|
| ANG | "יידיש", "גרמנית", "אנגלית" |
| DUC | "דינמיט", "סובארו", "מרצדס" |
| EVE | "מצדה", "הצהרת בלפור", "ה שואה" |
| FAC | "ברזילי", "כלא עזה", "תל - ה שומר" |
| GPE | "ה שטחים", "שפרעם", "רצועת עזה" |
| LOC | "שייח רדואן", "גיבאליה", "חאן יונס" |
| ORG | "כך", "ה ארץ", "מרחב ה גליל" |
| PER | "רמי רהב", "נימר חוסיין", "איברהים נימר חוסיין" |
| WOA | "קיטש ו מוות", "קדיש", "ה ארץ" |
| Label | Precision | Recall | F1 |
|---|---|---|---|
| all | 0.7577 | 0.7114 | 0.7338 |
| ANG | 0.0 | 0.0 | 0.0 |
| DUC | 0.0 | 0.0 | 0.0 |
| FAC | 0.0 | 0.0 | 0.0 |
| GPE | 0.7085 | 0.8103 | 0.7560 |
| LOC | 0.5714 | 0.1951 | 0.2909 |
| ORG | 0.7460 | 0.6912 | 0.7176 |
| PER | 0.8301 | 0.8052 | 0.8175 |
| WOA | 0.0 | 0.0 | 0.0 |
from span_marker import SpanMarkerModel
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("iahlt/span-marker-alephbert-small-nemo-mt-he")
# Run inference
entities = model.predict("יו\"ר ועדת ה נוער נתן סלובטיק אמר ש ה שחקנים של אנחנו לא משתלבים ב אירופה.")
entities
pip install spacy_udpipe
import spacy
from spacy.lang.he import Hebrew
import spacy_udpipe
spacy_udpipe.download("he") # download public udpipe model, but possible to use any your spacy model
nlp = spacy_udpipe.load("he")
nlp.add_pipe("span_marker", config={"model": "iahlt/span-marker-alephbert-small-nemo-mt-he"})
text = "יו\"ר ועדת הנוער נתן סלובטיק אמר שהשחקנים של אנחנו לא משתלבים באירופה."
doc = nlp(text)
print([(entity, entity.label_) for entity in doc.ents])
# [(ועדת הנוער, 'ORG'), (נתן סלובטיק, 'PER'), (אירופה, 'GPE')]
| Training set | Min | Median | Max |
|---|---|---|---|
| Sentence length | 1 | 25.4427 | 117 |
| Entities per sentence | 0 | 1.2472 | 20 |
| 0 | |
|---|---|
| eval_loss | 0.00487611 |
| eval_overall_precision | 0.822917 |
| eval_overall_recall | 0.791583 |
| eval_overall_f1 | 0.806946 |
| eval_overall_accuracy | 0.969029 |
| 0 | |
|---|---|
| test_loss | 0.00652107 |
| test_overall_precision | 0.747289 |
| test_overall_recall | 0.73927 |
| test_overall_f1 | 0.743258 |
| test_overall_accuracy | 0.960126 |
@software{Aarsen_SpanMarker,
author = {Aarsen, Tom},
license = {Apache-2.0},
title = {{SpanMarker for Named Entity Recognition}},
url = {https://github.com/tomaarsen/SpanMarkerNER}
}
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->