Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -166,6 +166,7 @@ def replace_with_synonyms(text):
|
|
166 |
|
167 |
# Main function for paraphrasing and grammar correction
|
168 |
def paraphrase_and_correct(text):
|
|
|
169 |
cleaned_text = remove_redundant_words(text)
|
170 |
paraphrased_text = capitalize_sentences_and_nouns(cleaned_text)
|
171 |
paraphrased_text = force_first_letter_capital(paraphrased_text)
|
@@ -175,7 +176,6 @@ def paraphrase_and_correct(text):
|
|
175 |
paraphrased_text = fix_possessives(paraphrased_text)
|
176 |
paraphrased_text = correct_spelling(paraphrased_text)
|
177 |
paraphrased_text = fix_punctuation_spacing(paraphrased_text)
|
178 |
-
paraphrased_text = replace_with_synonyms(paraphrased_text) # Add synonym replacement here
|
179 |
|
180 |
return paraphrased_text
|
181 |
|
|
|
166 |
|
167 |
# Main function for paraphrasing and grammar correction
|
168 |
def paraphrase_and_correct(text):
|
169 |
+
paraphrased_text = replace_with_synonyms(paraphrased_text) # Add synonym replacement here
|
170 |
cleaned_text = remove_redundant_words(text)
|
171 |
paraphrased_text = capitalize_sentences_and_nouns(cleaned_text)
|
172 |
paraphrased_text = force_first_letter_capital(paraphrased_text)
|
|
|
176 |
paraphrased_text = fix_possessives(paraphrased_text)
|
177 |
paraphrased_text = correct_spelling(paraphrased_text)
|
178 |
paraphrased_text = fix_punctuation_spacing(paraphrased_text)
|
|
|
179 |
|
180 |
return paraphrased_text
|
181 |
|