Instructions to use QomSSLab/etghan_tagging_v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QomSSLab/etghan_tagging_v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="QomSSLab/etghan_tagging_v2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("QomSSLab/etghan_tagging_v2") model = AutoModelForTokenClassification.from_pretrained("QomSSLab/etghan_tagging_v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
QomSSLab/etghan_tagging_v2
This repository hosts an XLM-RoBERTa token-classification head trained.
Usage
from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline
model_id = "QomSSLab/etghan_tagging_v2"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)
tagger = pipeline("token-classification", model=model, tokenizer=tokenizer, aggregation_strategy="simple")
text = "مثال از یک ورودی فارسی"
for entity in tagger(text):
print(entity)
Labels
ABSENCEAPPEALABILITYAPPEAL_AUTHORITYAPPEAL_DEADLINECOURT_NAMEDEFENDANT_ADDRESSDEFENDANT_FATHERDEFENDANT_NAME_LEGALDEFENDANT_NAME_NATURALFINALITYJUDGE_NAMEJUDGE_POSITIONJUDGE_SIGNATUREJUDGMENT_DATELEGAL_CHARGELEGAL_REPRESENTATIVEOPLACE_OF_OFFENSEPLAINTIFF_ADDRESSPLAINTIFF_CLAIMPLAINTIFF_FATHERPLAINTIFF_NAME_LEGALPLAINTIFF_NAME_NATURALPRESENCESUBJECT_OF_CLAIMTIME_OF_OFFENSE
Metrics
Validation Metrics
- Precision: 0.8207
- Recall: 0.7751
- F1: 0.7972
- Accuracy: 0.9701
Per-label Breakdown
| Label | Precision | Recall | F1 | Support |
|---|---|---|---|---|
| ABSENCE | 0.8947 | 0.6071 | 0.7234 | 56 |
| APPEALABILITY | 0.9423 | 0.9976 | 0.9691 | 409 |
| APPEAL_AUTHORITY | 0.9748 | 0.9884 | 0.9816 | 431 |
| APPEAL_DEADLINE | 0.8976 | 0.9544 | 0.9252 | 395 |
| COURT_NAME | 0.5248 | 0.9815 | 0.6839 | 54 |
| DEFENDANT_ADDRESS | 0.9586 | 0.9929 | 0.9754 | 140 |
| DEFENDANT_FATHER | 0.9672 | 0.9866 | 0.9768 | 299 |
| DEFENDANT_NAME_LEGAL | 0.9101 | 1.0000 | 0.9529 | 81 |
| DEFENDANT_NAME_NATURAL | 0.9767 | 0.9254 | 0.9504 | 724 |
| FINALITY | 0.8056 | 0.8529 | 0.8286 | 34 |
| JUDGE_NAME | 0.9534 | 0.9840 | 0.9685 | 312 |
| JUDGE_POSITION | 1.0000 | 0.9615 | 0.9804 | 260 |
| JUDGE_SIGNATURE | 1.0000 | 1.0000 | 1.0000 | 0 |
| JUDGMENT_DATE | 0.9409 | 0.9835 | 0.9618 | 243 |
| LEGAL_CHARGE | 1.0000 | 0.9343 | 0.9660 | 700 |
| LEGAL_REPRESENTATIVE | 0.9552 | 0.8114 | 0.8774 | 525 |
| O | 0.9774 | 0.9912 | 0.9843 | 68829 |
| PLACE_OF_OFFENSE | 0.6667 | 0.4000 | 0.5000 | 10 |
| PLAINTIFF_ADDRESS | 0.9375 | 0.9740 | 0.9554 | 77 |
| PLAINTIFF_CLAIM | 0.8740 | 0.6617 | 0.7532 | 2779 |
| PLAINTIFF_FATHER | 0.9757 | 0.9757 | 0.9757 | 247 |
| PLAINTIFF_NAME_LEGAL | 0.7250 | 1.0000 | 0.8406 | 29 |
| PLAINTIFF_NAME_NATURAL | 0.9679 | 0.9679 | 0.9679 | 560 |
| PRESENCE | 0.9812 | 0.9573 | 0.9691 | 164 |
| SUBJECT_OF_CLAIM | 0.8039 | 0.6726 | 0.7324 | 1457 |
| TIME_OF_OFFENSE | 0.8148 | 0.4681 | 0.5946 | 47 |
- Downloads last month
- 32