Update README.md
Browse files
README.md
CHANGED
|
@@ -9,7 +9,7 @@ base_model:
|
|
| 9 |
- google/byt5-small
|
| 10 |
pipeline_tag: translation
|
| 11 |
examples:
|
| 12 |
-
- text: "
|
| 13 |
- text: "Car toutes les lois sont fõ dees cor recon droitu riele pour quoi se les lois ne tont droiture "
|
| 14 |
---
|
| 15 |
|
|
@@ -20,12 +20,13 @@ overnormalize and add punctuation.
|
|
| 20 |
|
| 21 |
```py
|
| 22 |
from transformers import pipeline
|
|
|
|
| 23 |
|
| 24 |
pipe = pipeline(
|
| 25 |
task="text2text-generation", # change if needed
|
| 26 |
model="comma-project/normalization-byt5-small", # local directory
|
| 27 |
tokenizer="comma-project/normalization-byt5-small"
|
| 28 |
)
|
| 29 |
-
pipe("
|
| 30 |
-
# [{'generated_text': ' non
|
| 31 |
```
|
|
|
|
| 9 |
- google/byt5-small
|
| 10 |
pipeline_tag: translation
|
| 11 |
examples:
|
| 12 |
+
- text: "Scͥbo uobiᷤᷤ ñ pauli ł donati."
|
| 13 |
- text: "Car toutes les lois sont fõ dees cor recon droitu riele pour quoi se les lois ne tont droiture "
|
| 14 |
---
|
| 15 |
|
|
|
|
| 20 |
|
| 21 |
```py
|
| 22 |
from transformers import pipeline
|
| 23 |
+
import unicodedata
|
| 24 |
|
| 25 |
pipe = pipeline(
|
| 26 |
task="text2text-generation", # change if needed
|
| 27 |
model="comma-project/normalization-byt5-small", # local directory
|
| 28 |
tokenizer="comma-project/normalization-byt5-small"
|
| 29 |
)
|
| 30 |
+
pipe(unicodedata.normalize("NFD", "Scͥbo uobiᷤᷤ ñ pauli ł donati. "))
|
| 31 |
+
# [{'generated_text': 'scribo uobis, non Pauli uel Donati''}]
|
| 32 |
```
|