Update README.md

This commit is contained in:
Prithiviraj Damodaran 2021-05-07 13:04:59 +00:00 committed by huggingface-web
parent 15a97d2935
commit d3c1083155
1 changed files with 5 additions and 3 deletions

View File

@ -6,15 +6,17 @@ Parrot is a paraphrase based utterance augmentation framework purpose built to a
### Installation
```python
pip install parrot
pip install git+https://github.com/PrithivirajDamodaran/Parrot.git
```
### Quickstart
```python
from parrot import Parrot
import warnings
warnings.filterwarnings("ignore")
parrot = Parrot(model_tag="prithivida/parrot_paraphraser_on_T5", use_gpu=False)
parrot = Parrot(diversity_ranker="euclidean", model_tag="prithivida/parrot_paraphraser_on_T5", use_gpu=False)
phrases = ["Can you recommed some upscale restaurants in Rome?",
"What are the famous places we should not miss in Russia?"
]
@ -60,7 +62,6 @@ Input_phrase: What are the famous places we should not miss in Russia
```python
para_phrases = parrot.augment(input_phrase=phrase,
diversity_ranker="levenshtein",
do_diverse=False,
max_return_phrases = 10,
max_length=32,
@ -72,6 +73,7 @@ Input_phrase: What are the famous places we should not miss in Russia
## 2. Why Parrot?
**Huggingface** lists [12 paraphrase models,](https://huggingface.co/models?pipeline_tag=text2text-generation&search=paraphrase) **RapidAPI** lists 7 fremium and commercial paraphrasers like [QuillBot](https://rapidapi.com/search/paraphrase?section=apis&page=1), Rasa has discussed an experimental paraphraser for augmenting text data [here](https://forum.rasa.com/t/paraphrasing-for-nlu-data-augmentation-experimental/27744), Sentence-transfomers offers a [paraphrase mining utility](https://www.sbert.net/examples/applications/paraphrase-mining/README.html) and [NLPAug](https://github.com/makcedward/nlpaug) offers word level augmentation with a [PPDB](http://paraphrase.org/#/download) (a multi-million paraphrase database). While these attempts at paraphrasing are great, there are still some gaps and paraphrasing is NOT yet a mainstream option for text augmentation in building NLU models....Parrot is a humble attempt to fill some of these gaps.