Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,64 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- de
|
| 6 |
+
- es
|
| 7 |
+
- fr
|
| 8 |
+
- pt
|
| 9 |
+
metrics:
|
| 10 |
+
- accuracy
|
| 11 |
+
base_model:
|
| 12 |
+
- microsoft/mdeberta-v3-base
|
| 13 |
+
pipeline_tag: text-classification
|
| 14 |
+
tags:
|
| 15 |
+
- formal or informal classification
|
| 16 |
+
widget:
|
| 17 |
+
- text: Bitte geh einkaufen.
|
| 18 |
+
- text: Können Sie mir spontan dabei helfen?
|
| 19 |
+
- text: Als nächstes kommen 4g Champignons und 500g Mehl dazu.
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
# formality-classifier-mdeberta-v3-base
|
| 24 |
+
|
| 25 |
+
This model can classify texts based on their formality. It classifies inputs into one of the three classes `["formal", "informal", "neutral"]`, with neutral pertaining to texts which do not have a clear formality, such as passive statements etc.
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
In selecting and generating training data, a focus was put on languages that actually have a type of formal address etc., including French, German, Italian, Portuguese and Spanish.
|
| 29 |
+
Some samples from [osyvokon/pavlick-formality-scores](https://huggingface.co/datasets/osyvokon/pavlick-formality-scores) were also used to try and teach the model to classify English inputs.
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
## Results
|
| 35 |
+
|
| 36 |
+
Accuracy on the test set:
|
| 37 |
+
|
| 38 |
+
| Language | Accuracy |
|
| 39 |
+
| --- | --- |
|
| 40 |
+
| all | 88.93% |
|
| 41 |
+
| English | 79.20% |
|
| 42 |
+
| French | 100% |
|
| 43 |
+
| German | 97.73% |
|
| 44 |
+
| Italian | 97.83% |
|
| 45 |
+
| Portuguese | 100% |
|
| 46 |
+
| Spanish | 98.53% |
|
| 47 |
+
|
| 48 |
+
Confusion Matrix:
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
|
| 52 |
+
By Language:
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
|
| 56 |
+

|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
|
| 60 |
+

|
| 61 |
+
|
| 62 |
+

|
| 63 |
+
|
| 64 |
+

|