File size: 1,340 Bytes
600bb4a b9e5e56 1c8d634 b9e5e56 20b9d75 1571c14 20b9d75 f95751b 20b9d75 47df75d 20b9d75 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
---
annotations_creators: []
language:
- ro
language_creators:
- machine-generated
license:
- apache-2.0
multilinguality:
- monolingual
pretty_name: BlackKakapo/t5-small-grammar-ro-root
size_categories:
- 100K<n<1M
source_datasets:
- original
tags: []
task_categories:
- text2text-generation
task_ids: []
---
# Romanian grammar

This model is trained on sentences with words in the root form. To bring the words to a syntactically correct form.
# Prefix
grammar: text
### How to use
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("BlackKakapo/t5-small-grammar-ro-root")
model = AutoModelForSeq2SeqLM.from_pretrained("BlackKakapo/t5-small-grammar-ro-root")
```
### Or
```cmd
pip install happytransformer
```
```python
from happytransformer import TTSettings, HappyTextToText
happy_tt_save = HappyTextToText('T5',r"BlackKakapo/t5-small-grammar-ro")
beam_settings = TTSettings(num_beams=10, min_length=10, max_length=100)
```
### Generate
```python
sent = "As dori ca sa corecteze toate greșelile."
prefix = "grammar: "
example = prefix + sent
result = happy_tt_save.generate_text(example, args=beam_settings)
print(result.text)
```
### Output
```out
Aș dori ca să corecteze toate greșelile.
``` |