Downloads · 30 days
27
29% of all-time downloads
MoAmini77/bert-finetuned-ner
bert-finetuned-ner is a token classification model from MoAmini77. Use it when you need labels on individual words, such as names. It is set up for transformers.
This model is a fine-tuned Persian BERT model based on HooshvareLab/bert-base-parsbert-uncased for Named Entity Recognition (NER). It has been trained to identify entities such as persons, organizations, locations, an…
Downloads · 30 days
27
29% of all-time downloads
All-time downloads
93
Public
Parameters
162M
1.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors649 MB · 99%
From the Hugging Face model README
This model is a fine-tuned Persian BERT model based on HooshvareLab/bert-base-parsbert-uncased for Named Entity Recognition (NER). It has been trained to identify entities such as persons, organizations, locations, and products in Persian text.
bert-finetuned-ner is designed for token-level classification in Persian. The model uses ParsBERT, a BERT variant pretrained on a large Persian corpus, as the base model and is fine-tuned on a wnut2017-persian dataset. It can predict entity labels for each token in input text, supporting tasks such as text analysis, information extraction, and question answering pipelines.
HooshvareLab/bert-base-parsbert-uncased).AdamW (betas=(0.9, 0.999), epsilon=1e-8)from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
model_path = "path_to_saved_model"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForTokenClassification.from_pretrained(model_path)
ner_pipeline = pipeline(
"ner",
model=model,
tokenizer=tokenizer,
aggregation_strategy="simple"
)
text = "سلام. در تهران زندگی میکنم."
results = ner_pipeline(text)
print(results)