Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
pipeline_tag: text-classification
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- si
|
| 5 |
+
- ta
|
| 6 |
pipeline_tag: text-classification
|
| 7 |
+
tags:
|
| 8 |
+
- banking
|
| 9 |
+
- intent-classification
|
| 10 |
+
- labse
|
| 11 |
+
- multilingual
|
| 12 |
+
- code-mixed
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# Swift-Support LaBSE Intent Classifier (v1.0)
|
| 16 |
+
|
| 17 |
+
This is a fine-tuned **Language-Agnostic BERT Sentence Embedding (LaBSE)** model designed for trilingual intent classification in the banking and financial support domain. It was developed as part of the **Swift** Support Ticket Classification project.
|
| 18 |
+
|
| 19 |
+
## Model Details
|
| 20 |
+
* **Base Architecture:** `sentence-transformers/LaBSE`
|
| 21 |
+
* **Task:** Text Classification (Intent Recognition)
|
| 22 |
+
* **Number of Classes:** 77 (Derived from the BANKING77 taxonomy)
|
| 23 |
+
* **Supported Languages:** English, Sinhala, Tamil, Singlish (Code-mixed), and Tanglish (Code-mixed).
|
| 24 |
+
|
| 25 |
+
## Use Case
|
| 26 |
+
This model is intended to be used as the **Digital Text Router** in a hybrid multimodal pipeline. When a user submits a typed text ticket (without an image/screenshot), this model deeply analyzes the semantic context of the text, regardless of the language, to instantly categorize the ticket for the correct banking department.
|
| 27 |
+
|
| 28 |
+
## Performance & Ablation Findings
|
| 29 |
+
During our extensive ablation studies, this Transformer model was evaluated against traditional Machine Learning algorithms (like Linear SVMs).
|
| 30 |
+
|
| 31 |
+
* **Digital/Clean Text:** This LaBSE model achieves state-of-the-art semantic understanding on clean, typed digital text.
|
| 32 |
+
* **OCR Noisy Text:** When exposed to high Character Error Rates (CER) from Tesseract OCR (e.g., extracting text from blurry mobile screenshots), this model's F1-score drops to ~49.70% because Transformers are highly sensitive to sub-word tokenization destruction.
|
| 33 |
+
* **Architecture Decision:** Because of this sensitivity, the Swift backend dynamically routes **OCR-extracted text** to a robust Linear SVM, while routing **clean digital text** to this LaBSE model.
|
| 34 |
+
|
| 35 |
+
## How to use in Python
|
| 36 |
+
|
| 37 |
+
You can easily use this model via the `transformers` pipeline:
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
from transformers import pipeline
|
| 41 |
+
|
| 42 |
+
classifier = pipeline("text-classification", model="Swift-Support/labse-intent-1.0")
|
| 43 |
+
|
| 44 |
+
result = classifier("I lost my credit card yesterday, please help me cancel it")
|
| 45 |
+
print(result)
|
| 46 |
+
# Output: [{'label': 'Card payment declined', 'score': 0.98}]
|