Update README.md
Browse files
README.md
CHANGED
@@ -30,9 +30,7 @@ widget:
|
|
30 |
|
31 |
In this repository, we present our german zeroshot model.
|
32 |
|
33 |
-
This model was trained on the basis of the German BERT large model from [deepset.ai](https://huggingface.co/deepset/gbert-large) and finetuned for natural language inference based on 847.862 machine-translated nli sentence pairs, using the [mnli](https://huggingface.co/datasets/multi_nli), [anli](https://huggingface.co/datasets/anli) and [snli](https://huggingface.co/datasets/snli) datasets.
|
34 |
-
|
35 |
-
For this purpose, we translated the sentence pairs in these dataset to German.
|
36 |
|
37 |
If you are a German speaker you may also have a look at our Blog post about Zeroshot Classification and our model.
|
38 |
|
@@ -76,7 +74,11 @@ The model requires you to specify labels (ideally labels suited to your task),
|
|
76 |
a sequence (or list of sequences) to classify and a hypothesis template.
|
77 |
In our tests, if the labels comprise only single words,
|
78 |
"In diesem Satz geht es um das Thema {}" performed the best.
|
79 |
-
|
|
|
|
|
|
|
|
|
80 |
|
81 |
```python
|
82 |
|
@@ -90,38 +92,12 @@ sequence = "Ich habe ein Problem mit meinem Iphone das so schnell wie möglich g
|
|
90 |
|
91 |
labels = ["Computer", "Handy", "Tablet", "dringend", "nicht dringend"]
|
92 |
|
93 |
-
|
94 |
-
#hypothesis_template = "Dieser Satz drückt ein Gefühl von {} aus."
|
95 |
|
96 |
zershot_pipeline(sequence, labels, hypothesis_template=hypothesis_template)
|
97 |
|
98 |
```
|
99 |
|
100 |
-
## Other Applications
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
DESCRIPTION GOES HERE:
|
105 |
-
Satz 1:
|
106 |
-
"Ich habe ein Problem mit meinem Iphone das so schnell wie möglich gelöst werden muss"
|
107 |
-
Satz 2:
|
108 |
-
"Ich hab ein kleines Problem mit meinem Macbook, und auch wenn die Reparatur nicht eilt, würde ich es gerne addressieren."
|
109 |
-
Label:
|
110 |
-
["Computer", "Handy", "Tablet", "dringend", "nicht dringend"]
|
111 |
-
|
112 |
-
EMOTION EXAMPLE:
|
113 |
-
"Ich bin entäuscht, dass ich kein Ticket für das Konzert meiner Lieblingsband bekommen habe."
|
114 |
-
label: "Furcht, Freude, Wut , Überraschung, Traurigkeit, Ekel, Verachtung"
|
115 |
-
|
116 |
-
|
117 |
-
- text: "Wer ist die reichste Person der Welt"
|
118 |
-
|
119 |
-
candidate_labels: "Frage, Schlagwörter"
|
120 |
-
|
121 |
-
hypothesis_template: "Hierbei handelt es sich um {}."
|
122 |
-
|
123 |
-
""""""""
|
124 |
-
|
125 |
### Contact
|
126 |
- Daniel Ehnes, daniel.ehnes@sva.de
|
127 |
- Baran Avinc, baran.avinc@sva.de
|
|
|
30 |
|
31 |
In this repository, we present our german zeroshot model.
|
32 |
|
33 |
+
This model was trained on the basis of the German BERT large model from [deepset.ai](https://huggingface.co/deepset/gbert-large) and finetuned for natural language inference based on 847.862 machine-translated nli sentence pairs, using the [mnli](https://huggingface.co/datasets/multi_nli), [anli](https://huggingface.co/datasets/anli) and [snli](https://huggingface.co/datasets/snli) datasets. For this purpose, we translated the sentence pairs in these dataset to German.
|
|
|
|
|
34 |
|
35 |
If you are a German speaker you may also have a look at our Blog post about Zeroshot Classification and our model.
|
36 |
|
|
|
74 |
a sequence (or list of sequences) to classify and a hypothesis template.
|
75 |
In our tests, if the labels comprise only single words,
|
76 |
"In diesem Satz geht es um das Thema {}" performed the best.
|
77 |
+
|
78 |
+
However, for multiple words, especially when they combine nouns and verbs,
|
79 |
+
Simple hypothesis such as "Weil" or "Daher" may perform better.
|
80 |
+
|
81 |
+
Here is an example of how to use the model:
|
82 |
|
83 |
```python
|
84 |
|
|
|
92 |
|
93 |
labels = ["Computer", "Handy", "Tablet", "dringend", "nicht dringend"]
|
94 |
|
95 |
+
hypothesis_template = "In diesem Satz geht es um das Thema {}."
|
|
|
96 |
|
97 |
zershot_pipeline(sequence, labels, hypothesis_template=hypothesis_template)
|
98 |
|
99 |
```
|
100 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
### Contact
|
102 |
- Daniel Ehnes, daniel.ehnes@sva.de
|
103 |
- Baran Avinc, baran.avinc@sva.de
|