Downloads · 30 days
122
11% of all-time downloads
asmud/ner-spacy-indonesian
ner-spacy-indonesian is a token classification model from asmud. Use it when you need labels on individual words, such as names. It is set up for spacy. The card lists the license as cc-by-sa-3.0.
This is a custom Indonesian Named Entity Recognition (NER) model built with spaCy v3.8+. The model is designed to identify and classify 19 different types of named entities in Indonesian text, making it suitable for v…
Downloads · 30 days
122
11% of all-time downloads
All-time downloads
1.1K
Public
Repo size
34.4 MB
Likes
1
Trending 1
Click a slice to open those files.
.json22.5 MB · 65%
From the Hugging Face model README
This is a custom Indonesian Named Entity Recognition (NER) model built with spaCy v3.8+. The model is designed to identify and classify 19 different types of named entities in Indonesian text, making it suitable for various NLP applications in the Indonesian language.
The model recognizes 19 different entity types:
| Label | Description |
|---|---|
| CRD | Cardinal numbers |
| DAT | Dates |
| EVT | Events |
| FAC | Facilities |
| GPE | Geopolitical entities (countries, cities, states) |
| LAN | Languages |
| LAW | Laws |
| LOC | Locations |
| MON | Money/monetary values |
| NOR | Norms |
| ORD | Ordinal numbers |
| ORG | Organizations |
| PER | Persons |
| PRC | Processes |
| PRD | Products |
| QTY | Quantities |
| REG | Regions |
| TIM | Time |
| WOA | Works of art |
The model achieves strong performance on token-level evaluation:
Performance metrics are based on evaluation using Universal Dependencies v2.8 datasets with spaCy's standard evaluation framework.
You can install this model directly from the wheel file:
pip install https://huggingface.co/asmud/ner-spacy-indonesian/resolve/main/id_ner_spacy_indonesian-1.1.0-py3-none-any.whl
Or download and install locally:
pip install id_ner_spacy_indonesian-1.1.0-py3-none-any.whl
import spacy
# Load the model
nlp = spacy.load("id_ner_spacy_indonesian")
# Process text
text = "Presiden Joko Widodo mengunjungi Jakarta pada tanggal 15 Agustus 2023."
doc = nlp(text)
# Extract entities
for ent in doc.ents:
print(f"{ent.text:<20} {ent.label_:<10} {ent.start_char}-{ent.end_char}")
import spacy
from spacy import displacy
# Load model
nlp = spacy.load("id_ner_spacy_indonesian")
# Process text
text = """
Bank Central Asia (BCA) melaporkan laba bersih sebesar Rp 25,1 triliun
pada tahun 2022. CEO BCA, Jahja Setiaatmadja, menyatakan bahwa kinerja
perseroan tetap solid di tengah tantangan ekonomi global.
"""
doc = nlp(text)
# Print detailed entity information
for ent in doc.ents:
print(f"Entity: {ent.text}")
print(f"Label: {ent.label_}")
print(f"Position: {ent.start_char}-{ent.end_char}")
print(f"Confidence: {ent._.score if hasattr(ent._, 'score') else 'N/A'}")
print("-" * 50)
# Visualize entities (in Jupyter notebook)
displacy.render(doc, style="ent", jupyter=True)
import spacy
nlp = spacy.load("id_ner_spacy_indonesian")
# Process multiple texts
texts = [
"PT Telkom Indonesia adalah perusahaan telekomunikasi terbesar di Indonesia.",
"Universitas Indonesia terletak di Depok, Jawa Barat.",
"Presiden Susilo Bambang Yudhoyono menjabat dari tahun 2004 hingga 2014."
]
# Batch processing for efficiency
docs = list(nlp.pipe(texts))
for i, doc in enumerate(docs):
print(f"Text {i+1} entities:")
for ent in doc.ents:
print(f" {ent.text} ({ent.label_})")
print()
This model was trained using:
If you use this model in your research or applications, please cite:
@model{muhamad2024indonesian_ner,
title={Indonesian Named Entity Recognition Model},
author={Muhamad, Asep},
year={2024},
version={1.1.0},
url={https://huggingface.co/asmud/ner-spacy-indonesian},
license={CC BY-SA 3.0}
}
For questions, issues, or collaborations:
This model was trained using data from Universal Dependencies v2.8, contributed by Daniel Zeman, Joakim Nivre, Mitchell Abrams, and many other contributors. Special thanks to the spaCy team for providing an excellent framework for natural language processing.