File size: 759 Bytes
f5df97a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language: "en"
tags:
- grammar 
- text-generation
license: "CC BY-NC-SA 4.0"
datasets:
- jfleg

---

# T5 Grammar Correction 

This model generates a revised version of inputted text with the goal of containing fewer grammatical errors. 
It was trained with [Happy Transformer](https://github.com/EricFillion/happy-transformer)
using a dataset called [JFLEG](https://arxiv.org/abs/1702.04066). 

## Usage 

`pip install happytransformer `

```python
from happytransformer import HappyTextToText

happy_tt = HappyTextToText("T5", "vennify/t5-base-grammar-correction")

args = TTSettings(num_beams=5, min_length=1)

result = happy_tt.generate_text("This sentences has has bads grammar.", args=args)

print(result.text) # This sentence has bad grammar.


```