Downloads · 30 days
18
6% of all-time downloads
Kiuyha/surabaya-opinion-indobert-ner
surabaya-opinion-indobert-ner is a token classification model from Kiuyha. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of indobenchmark/indobert-base-p2 for Named Entity Recognition (NER). It is specifically trained to detect entities in informal Indonesian text and Suroboyoan slang, focusing on soci…
Downloads · 30 days
18
6% of all-time downloads
All-time downloads
327
Public
Parameters
124M
495 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors495 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of indobenchmark/indobert-base-p2 for Named Entity Recognition (NER). It is specifically trained to detect entities in informal Indonesian text and Suroboyoan slang, focusing on social media complaints and public opinions regarding the city of Surabaya.
indobenchmark/indobert-base-p2This model is designed to extract entities such as:
The model is particularly robust against typos, slang, and the specific context of urban complaints (e.g., mentioning specific parks, streets, or government figures in Surabaya).
You can use this model directly with the Hugging Face pipeline:
from transformers import pipeline
# Load the pipeline
# aggregation_strategy="simple" merges sub-tokens (B-LOC, I-LOC) into single entities
nlp = pipeline("ner", model="Kiuyha/surabaya-opinion-indobert-ner", aggregation_strategy="simple")
# Example text
text = "Saya sedang makan soto di Taman Bungkul Surabaya bersama Anies Baswedan."
# Run inference
result = nlp(text)
print(result)
The pipeline will return a list of detected entities with their start/end positions and confidence scores:
[
{
'entity_group': 'LOC',
'score': np.float32(0.96564007),
'word': 'taman bungkul surabaya',
'start': 26,
'end': 48
},
{
'entity_group': 'PERSON',
'score': np.float32(0.9307747),
'word': 'anies baswedan',
'start': 57,
'end': 71
}
]
The model was trained on the Surabaya NER Dataset:
| Split | Sentences |
|---|---|
| Train | 6,577 |
| Validation | 822 |
| Test | 823 |
| Total | 8,222 |
The data consists of scraped social media posts filtered for topics related to Surabaya city issues including:
The model was evaluated on the test set (823 sentences) and achieved the following results:
| Entity | Precision | Recall | F1-Score | Support |
|---|---|---|---|---|
| LOC | 0.78 | 0.81 | 0.79 | 1,363 |
| ORG | 0.60 | 0.61 | 0.61 | 344 |
| PERSON | 0.79 | 0.77 | 0.78 | 231 |
| Micro avg | 0.75 | 0.77 | 0.74 | 1,938 |
| Macro avg | 0.72 | 0.73 | 0.73 | 1,938 |
| Weighted avg | 0.75 | 0.77 | 0.76 | 1,938 |
If you use this model in your research, please cite both the model and the dataset:
@misc{surabaya-ner-indobert,
author = {Kiuyha},
title = {IndoBERT NER - Surabaya Opinion Analysis},
year = {2024},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/Kiuyha/surabaya-opinion-indobert-ner}}
}
For questions or issues regarding this model, please open an issue on the model repository page.