Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,46 @@
|
|
1 |
---
|
2 |
license: lgpl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: lgpl
|
3 |
+
pipeline_tag: text2text-generation
|
4 |
+
language:
|
5 |
+
- be
|
6 |
+
- da
|
7 |
+
- de
|
8 |
+
- el
|
9 |
+
- en
|
10 |
+
- es
|
11 |
+
- fr
|
12 |
+
- it
|
13 |
+
- nl
|
14 |
+
- pl
|
15 |
+
- pt
|
16 |
+
- ro
|
17 |
+
- ru
|
18 |
+
- sk
|
19 |
+
- sv
|
20 |
+
- uk
|
21 |
---
|
22 |
+
|
23 |
+
# ByT5-text-correction
|
24 |
+
|
25 |
+
A small multilingual utility model intended for simple text correction. It is designed to improve the quality of texts from the web, often lacking punctuation or proper word capitalization. The model was trained to perform three types of corrections:
|
26 |
+
* Restoring punctuation in sentences.
|
27 |
+
* Restoring word capitalization.
|
28 |
+
* Restoring diacritical marks for languages that include them.
|
29 |
+
|
30 |
+
The following languages are supported: Belarusian (be), Danish (da), German (de), Greek (el), English (en), Spanish (es), French (fr), Italian (it), Dutch (nl), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Slovak (sk), Swedish (sv), Ukrainian (uk).
|
31 |
+
|
32 |
+
The model takes as input a sentence preceded by a language code prefix. For example:
|
33 |
+
|
34 |
+
```python
|
35 |
+
from transformers import pipeline
|
36 |
+
generator = pipeline("text2text-generation", model="sdadas/byt5-text-correction")
|
37 |
+
sentences = [
|
38 |
+
"<pl> ciekaw jestem na co licza onuce stawiajace na sykulskiego w nadziei na zwrot ku rosji",
|
39 |
+
"<de> die frage die sich die europäer stellen müssen lautet ist es in unserem interesse die krise auf taiwan zu beschleunigen",
|
40 |
+
"<ru> при своём рождении 26 августа 1910 года тереза получила имя агнес бояджиу"
|
41 |
+
]
|
42 |
+
generator(sentences, max_length=512)
|
43 |
+
# Ciekaw jestem na co liczą onuce stawiające na Sykulskiego w nadziei na zwrot ku Rosji.
|
44 |
+
# Die Frage, die sich die Europäer stellen müssen, lautet: Ist es in unserem Interesse, die Krise auf Taiwan zu beschleunigen?
|
45 |
+
# При своём рождении 26 августа 1910 года Тереза получила имя Агнес Бояджиу.
|
46 |
+
```
|