Skip to content

Commit

Permalink
Merge pull request #48 from nipunsadvilkar/bug-47
Browse files Browse the repository at this point in the history
🐛  Fix unbalanced parenthesis
  • Loading branch information
nipunsadvilkar authored Nov 1, 2019
2 parents f3d0ae4 + 3d9a5ba commit 16e8683
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@
- ✨Add `char_span` parameter (optional) to get sentence & its (start, end) char offsets from original text
- ✨pySBD as a spaCy component example
- 🐛 Fix double question mark swallow bug - \#39

# v0.2.1

- ✨pySBD as a spaCy component through entrypoints

# v0.2.2

- 🐛 Fix unbalanced parenthesis - \#47
2 changes: 1 addition & 1 deletion pysbd/about.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/

__title__ = "pysbd"
__version__ = "0.2.1"
__version__ = "0.2.2"
__summary__ = "pysbd (Python Sentence Boundary Disambiguation) is a rule-based sentence boundary detection that works out-of-the-box across many languages."
__uri__ = "http://nipunsadvilkar.github.io/"
__author__ = "Nipun Sadvilkar"
Expand Down
2 changes: 1 addition & 1 deletion pysbd/cleaner.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def search_for_connected_sentences(self, word, txt, regex, rule):
if any(a in word for a in Abbreviation.ABBREVIATIONS):
return txt
new_word = Text(word).apply(rule)
txt = re.sub(word, new_word, txt)
txt = re.sub(re.escape(word), new_word, txt)
return txt

def check_for_no_space_in_between_sentences(self):
Expand Down

0 comments on commit 16e8683

Please sign in to comment.