Skip to content

Commit 5fa8d01

Browse files
🐛 Fix scanlists (#28)
🐛 Fix scanlists
2 parents ccb75b5 + 22e6a2b commit 5fa8d01

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
# v0.1.0
12

3+
- Initial Release
24

3-
# v0.0.1
4-
* Initial Release
5+
# v0.1.1
6+
7+
- English language support only
8+
- Support for oother languages - WIP
9+
10+
# v0.1.2
11+
12+
- 🐛BugFix - IndexError of `scanlists` function

pysbd/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/
33

44
__title__ = "pysbd"
5-
__version__ = "0.1.1"
5+
__version__ = "0.1.2"
66
__summary__ = "pysbd (Python Sentence Boundary Disambiguation) is a rule-based sentence boundary detection that works out-of-the-box across many languages."
77
__uri__ = "http://nipunsadvilkar.github.io/"
88
__author__ = "Nipun Sadvilkar"

pysbd/lists_item_replacer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def scan_lists(self, regex1, regex2, replacement, strip=False):
122122
elif ind > 0:
123123
if (((item - 1) == list_array[ind - 1]) or
124124
((item == 0) and (list_array[ind - 1] == 9)) or
125-
((item == 9) and (list_array[ind + 1] == 0))):
125+
((item == 9) and (list_array[ind - 1] == 0))):
126126
self.substitute_found_list_items(regex2, item, strip, replacement)
127127

128128
def substitute_found_list_items(self, regex, each, strip, replacement):

pysbd/segmenter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def segment(self, text):
2323

2424

2525
if __name__ == "__main__":
26-
text = "Saint Maximus (died 250) is a Christian saint and martyr.[1] The emperor Decius published a decree ordering the veneration of busts of the deified emperors."
26+
text = "This new form of generalized PDF in (9) is generic and suitable for all the fading models presented in Table I withbranches MRC reception. In section III, (9) will be used in the derivations of the unified ABER and ACC expression."
2727
# ["Saint Maximus (died 250) is a Christian saint and martyr.[1]", "The emperor Decius published a decree ordering the veneration of busts of the deified emperors."
2828
print("Input String:\n{}".format(text))
2929
seg = Segmenter(language="en", clean=True)

0 commit comments

Comments
 (0)