Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- de
|
| 5 |
+
tags:
|
| 6 |
+
- text-classification
|
| 7 |
+
- ticket classification
|
| 8 |
+
- multilingual
|
| 9 |
+
- email-intent-detection
|
| 10 |
+
- customer-support
|
| 11 |
+
- xlm-roberta
|
| 12 |
+
license: apache-2.0
|
| 13 |
+
datasets:
|
| 14 |
+
- private
|
| 15 |
+
model-index:
|
| 16 |
+
- name: xlm-roberta-ticket-classifier
|
| 17 |
+
results:
|
| 18 |
+
- task:
|
| 19 |
+
type: text-classification
|
| 20 |
+
name: Email Ticket Classification
|
| 21 |
+
dataset:
|
| 22 |
+
name: german-english-email-ticket-classification
|
| 23 |
+
type: private
|
| 24 |
+
metrics:
|
| 25 |
+
- name: Accuracy (Type)
|
| 26 |
+
type: accuracy
|
| 27 |
+
value: 0.8573
|
| 28 |
+
- name: Accuracy (Queue)
|
| 29 |
+
type: accuracy
|
| 30 |
+
value: 0.5189
|
| 31 |
+
- name: F1 Score (Type)
|
| 32 |
+
type: f1
|
| 33 |
+
value: 0.8573
|
| 34 |
+
- name: F1 Score (Queue)
|
| 35 |
+
type: f1
|
| 36 |
+
value: 0.5209
|
| 37 |
+
|
| 38 |
+
---
|
| 39 |
+
|
| 40 |
+
# XLM-RoBERTa Ticket Classifier
|
| 41 |
+
|
| 42 |
+
A multilingual email/ticket classifier fine-tuned from `xlm-roberta-base` to categorize customer support tickets in English and German. It predicts both routing category and issue type, helping automate ticket triage, intent detection, and prioritization in multilingual helpdesk environments.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
## Model Details
|
| 46 |
+
|
| 47 |
+
- **Base model**: `xlm-roberta-base`
|
| 48 |
+
- **Languages**: English 🇬🇧 & German 🇩🇪
|
| 49 |
+
- **Task**: Multi-class text classification
|
| 50 |
+
- **Training data**: [german-english-email-ticket-classification](https://huggingface.co/datasets/ale-dp/german-english-email-ticket-classification)
|
| 51 |
+
- **Tokenizer**: SentencePiece BPE tokenizer
|
| 52 |
+
- **Framework**: 🤗 Transformers
|
| 53 |
+
|
| 54 |
+
## Classification Schema
|
| 55 |
+
|
| 56 |
+
This model performs **multi-head classification**, predicting both:
|
| 57 |
+
|
| 58 |
+
### 🎯 Queue (Routing Category)
|
| 59 |
+
- Billing and Payments
|
| 60 |
+
- Customer Service
|
| 61 |
+
- General Inquiry
|
| 62 |
+
- Human Resources
|
| 63 |
+
- IT Support
|
| 64 |
+
- Product Support
|
| 65 |
+
- Returns and Exchanges
|
| 66 |
+
- Sales and Pre-Sales
|
| 67 |
+
- Service Outages and Maintenance
|
| 68 |
+
- Technical Support
|
| 69 |
+
|
| 70 |
+
### 🛠️ Type (Issue Nature)
|
| 71 |
+
- Incident
|
| 72 |
+
- Request
|
| 73 |
+
- Problem
|
| 74 |
+
- Change
|
| 75 |
+
|
| 76 |
+
## 📈 Model Performance Summary
|
| 77 |
+
|
| 78 |
+
| Metric | Value |
|
| 79 |
+
|-------------------------|---------|
|
| 80 |
+
| **Accuracy (Type)** | 85.73% |
|
| 81 |
+
| **Accuracy (Queue)** | 51.89% |
|
| 82 |
+
| **F1 Score (Type)** | 85.73% |
|
| 83 |
+
| **F1 Score (Queue)** | 52.09% |
|
| 84 |
+
|
| 85 |
+
This model demonstrates strong performance on **type classification**, while **queue prediction** reflects the inherent complexity of routing logic across overlapping categories.
|
| 86 |
+
|
| 87 |
+
🔍 _More detailed metrics, visualizations, and training curves available on the [W&B dashboard](https://wandb.ai/alikhalaji-/bilingual_ticket_classifier)_
|
| 88 |
+
|
| 89 |
+
## Intended Uses
|
| 90 |
+
|
| 91 |
+
- Classify incoming tickets into predefined categories
|
| 92 |
+
- Automate support ticket routing
|
| 93 |
+
- Detect customer intent in multilingual environments
|
| 94 |
+
- Integrate with helpdesk platforms like Zendesk or Freshdesk
|
| 95 |
+
|
| 96 |
+
## 🚀 Usage
|
| 97 |
+
|
| 98 |
+
```python
|
| 99 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
| 100 |
+
|
| 101 |
+
model_id = "ale-dp/xlm-roberta-ticket-classifier"
|
| 102 |
+
|
| 103 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 104 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_id)
|
| 105 |
+
|
| 106 |
+
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
|
| 107 |
+
|
| 108 |
+
text = "Hallo, Die Data-Analytics-Plattform funktioniert nicht richtig und es werden unkorrekte Investment-Analyse-Fehlermeldungen generiert. Dies könnte auf einen Software-Fehler hindeuten."
|
| 109 |
+
|
| 110 |
+
result = classifier(text)
|
| 111 |
+
print(result)
|
| 112 |
+
```
|
| 113 |
+
### Created by:
|
| 114 |
+
***[ᴀʟɪ ᴋʜᴀʟᴀᴊɪ](https://github.com/alikhalajii)***
|
| 115 |
+
|
| 116 |
+
## Citation
|
| 117 |
+
|
| 118 |
+
If you use this model, please cite:
|
| 119 |
+
|
| 120 |
+
```bibtex
|
| 121 |
+
@misc{xlm-roberta-ticket-classifier,
|
| 122 |
+
author = {Ali Khalaji},
|
| 123 |
+
title = {XLM-RoBERTa Ticket Classifier},
|
| 124 |
+
year = {2025},
|
| 125 |
+
url = {https://huggingface.co/ale-dp/xlm-roberta-ticket-classifier}
|
| 126 |
+
}
|
| 127 |
+
|