Downloads · 30 days
8
31% of all-time downloads
zexho/uae_address_roberta_v1.0.3
uae_address_roberta_v1.0.3 is a token classification model from zexho. 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.
Downloads · 30 days
8
31% of all-time downloads
All-time downloads
26
Public
Repo size
2.2 GB
Likes
0
Public
Click a slice to open those files.
.bin1.1 GB · 98%
From the Hugging Face model README
本仓库存放一个命名实体识别(NER)模型的权重与配置。
加载到 transformers 中进行推理:
from transformers import AutoTokenizer, AutoModelForTokenClassification
model_id = "zexho/uae_address_roberta_v1.0.3"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id, ignore_mismatched_sizes=True)
text = "مثال على العنوان"
inputs = tokenizer(text.split(), is_split_into_words=True, return_tensors="pt", truncation=True)
outputs = model(**inputs)
注意: 如果该模型来自自定义训练代码,参数名可能与标准 BertForTokenClassification 对齐;若出现不匹配,可设置 ignore_mismatched_sizes=True 或自行适配。
labels.json 包含 id2label 与 label2id 用于解释预测结果。