Skip to content

Commit ccb75b5

Browse files
🚚 Renaming package & ♻️Refactor scripts (#26)
🚚 Renaming package & ♻️Refactor scripts
2 parents 2c72ba4 + a715fa0 commit ccb75b5

25 files changed

+130
-110
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ nosetests.xml
4545
coverage.xml
4646
*.cover
4747
.hypothesis/
48+
.pytest_cache/
4849

4950
# Translations
5051
*.mo
@@ -99,3 +100,6 @@ ENV/
99100

100101
# mypy
101102
.mypy_cache/
103+
104+
# vscode
105+
.vscode/

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,39 @@
11
# pySBD: Python Sentence Boundary Disambiguation (SBD)
22

3-
[![Build Status](https://travis-ci.org/nipunsadvilkar/pySBD.svg?branch=master)](https://travis-ci.org/nipunsadvilkar/pySBD)
4-
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/nipunsadvilkar/pySBD/blob/master/LICENSE)
3+
[![Build Status](https://travis-ci.org/nipunsadvilkar/pySBD.svg?branch=master)](https://travis-ci.org/nipunsadvilkar/pySBD) [![License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat)](https://github.com/nipunsadvilkar/pySBD/blob/master/LICENSE)
54

65
pySBD - python Sentence Boundary Disambiguation (SBD) - is a rule-based sentence boundary detection module that works out-of-the-box.
76

87
This project is a direct port of ruby gem - [Pragmatic Segmenter](https://github.com/diasks2/pragmatic_segmenter) which provides rule-based sentence boundary detection.
98

10-
119
## Install
1210

1311
**Python**
14-
```
15-
pip install pysbd
16-
```
12+
13+
pip install pysbd
1714

1815
## Usage
1916

20-
* Currently pySBD support only English language. Support for more languages will be released soon.
17+
- Currently pySBD supports only English language. Support for more languages will be released soon.
2118

2219
```python
23-
import pySBD
20+
import pysbd
2421
text = "Hello World. My name is Jonas."
25-
seg = pySBD.Segmenter(text, clean=False)
26-
print(seg.segment())
22+
seg = pysbd.Segmenter(language="en", clean=False)
23+
print(seg.segment(text))
2724
# ['Hello World.', 'My name is Jonas.']
2825
```
2926

3027
## Contributing
3128

3229
If you find a text that is incorrectly segmented using pySBD, please submit an issue.
3330

34-
1. Fork it ( https://github.com/nipunsadvilkar/pySBD/fork )
35-
2. Create your feature branch (`git checkout -b my-new-feature`)
36-
3. Commit your changes (`git commit -am 'Add some feature'`)
37-
4. Push to the branch (`git push origin my-new-feature`)
38-
5. Create a new Pull Request
31+
1. Fork it ( https://github.com/nipunsadvilkar/pySBD/fork )
32+
2. Create your feature branch (`git checkout -b my-new-feature`)
33+
3. Commit your changes (`git commit -am 'Add some feature'`)
34+
4. Push to the branch (`git push origin my-new-feature`)
35+
5. Create a new Pull Request
3936

37+
## Credit
4038

41-
# Credit
4239
This project wouldn't be possible without the great work done by [Pragmatic Segmenter](https://github.com/diasks2/pragmatic_segmenter) team.
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# -*- coding: utf-8 -*-
22
import re
3-
from pySBD.rules import Text
3+
from pysbd.rules import Text
44
# TODO: SENTENCE_STARTERS should be lang specific
5-
from pySBD.lang.standard import Abbreviation, SENTENCE_STARTERS
6-
from pySBD.lang.common.numbers import (Common, SingleLetterAbbreviationRules,
5+
from pysbd.lang.standard import Abbreviation, SENTENCE_STARTERS
6+
from pysbd.lang.common.numbers import (Common, SingleLetterAbbreviationRules,
77
AmPmRules)
88

99

pySBD/about.py renamed to pysbd/about.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# inspired from:
22
# https://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/
33

4-
__title__ = "pySBD"
5-
__version__ = "0.0.1"
6-
__summary__ = "pySBD (Python Sentence Boundary Disambiguation) is a rule-based sentence boundary detection that works out-of-the-box across many languages."
4+
__title__ = "pysbd"
5+
__version__ = "0.1.1"
6+
__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"
99
__email__ = "[email protected]"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# -*- coding: utf-8 -*-
22
import re
33
from functools import partial
4-
from pySBD.punctuation_replacer import replace_punctuation
4+
from pysbd.punctuation_replacer import replace_punctuation
55

66

77
class BetweenPunctuation(object):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
from pySBD.rules import Rule
2+
from pysbd.rules import Rule
33

44

55
class CleanRules(object):

pySBD/cleaner.py renamed to pysbd/cleaner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22
import re
3-
from pySBD.rules import Text
4-
from pySBD.clean.rules import PDF, HTML, CleanRules as cr
5-
from pySBD.lang.standard import Abbreviation
3+
from pysbd.rules import Text
4+
from pysbd.clean.rules import PDF, HTML, CleanRules as cr
5+
from pysbd.lang.standard import Abbreviation
66

77

88
class Cleaner(object):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
import re
3-
from pySBD.punctuation_replacer import replace_punctuation
3+
from pysbd.punctuation_replacer import replace_punctuation
44

55

66
class ExclamationWords(object):

0 commit comments

Comments
 (0)