From d3c10831551c0b9b35daab62f2b7772654a940c9 Mon Sep 17 00:00:00 2001 From: Prithiviraj Damodaran Date: Fri, 7 May 2021 13:04:59 +0000 Subject: [PATCH] Update README.md --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9c55d12..5f1abff 100644 --- a/README.md +++ b/README.md @@ -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.