Skip to content

Commit e4d5902

Browse files
committed
Fixed double period replace when joining sentences in new methods in DupliPy 0.2.1, please use version 0.2.2 or later.
1 parent 676e9a8 commit e4d5902

3 files changed

Lines changed: 5 additions & 48 deletions

File tree

duplipy/formatting.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def remove_profanity_from_text(text):
264264
"""
265265
sentences = nltk.sent_tokenize(text)
266266
cleaned_sentences = remove_profanity(sentences, language='All')
267-
cleaned_text = '. '.join(cleaned_sentences)
267+
cleaned_text = ' '.join(cleaned_sentences)
268268

269269
return cleaned_text
270270

@@ -282,7 +282,7 @@ def remove_sensitive_info_from_text(text):
282282
"""
283283
sentences = nltk.sent_tokenize(text)
284284
cleaned_sentences = remove_sensitive_information(sentences)
285-
cleaned_text = '. '.join(cleaned_sentences)
285+
cleaned_text = ' '.join(cleaned_sentences)
286286

287287
return cleaned_text
288288

@@ -304,6 +304,6 @@ def remove_hate_speech_from_text(text):
304304
outcome = detect_hate_speech(sentence)
305305
if outcome != ['Hate Speech'] and outcome != ['Offensive Speech'] and outcome == ['No Hate and Offensive Speech']:
306306
cleaned_sentences.append(sentence)
307-
cleaned_text = '. '.join(cleaned_sentences)
307+
cleaned_text = ' '.join(cleaned_sentences)
308308

309309
return cleaned_text

publish steps.txt

Lines changed: 0 additions & 43 deletions
This file was deleted.

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# DupliPy 0.2.1
1+
# DupliPy 0.2.2
22
![Python Version](https://img.shields.io/badge/python-3.12-blue.svg)
33
![Code Size](https://img.shields.io/github/languages/code-size/infinitode/duplipy)
44
![Downloads](https://pepy.tech/badge/duplipy)
@@ -7,7 +7,7 @@
77

88
An open source Python library for text formatting, augmentation, and similarity calculation tasks in NLP, the package now also includes additional methods for image augmentation.
99

10-
## Changes to DupliPy 0.2.1
10+
## Changes to DupliPy 0.2.2
1111

1212
Duplipy now utilizes another one of our Python packages, called ValX, which provides quick methods we can use to clean and format our text data before training in preprocessing steps.
1313

0 commit comments

Comments
 (0)