pysbd (Python Sentence Boundary Disambiguation) is a rule-based sentence boundary detection that works out-of-the-box across many languages.
Project description
pySBD: Python Sentence Boundary Disambiguation (SBD)
pySBD - python Sentence Boundary Disambiguation (SBD) - is a rule-based sentence boundary detection module that works out-of-the-box.
This project is a direct port of ruby gem - Pragmatic Segmenter which provides rule-based sentence boundary detection.
Install
Python
pip install pysbd
Usage
- Currently pySBD supports only English language. Support for more languages will be released soon.
import pysbd
text = "Hello World. My name is Jonas."
seg = pysbd.Segmenter(language="en", clean=False)
print(seg.segment(text))
# ['Hello World.', 'My name is Jonas.']
Contributing
If you find a text that is incorrectly segmented using pySBD, please submit an issue.
- Fork it ( https://github.com/nipunsadvilkar/pySBD/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Credit
This project wouldn't be possible without the great work done by Pragmatic Segmenter team.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
pysbd-0.1.2-py3-none-any.whl
(22.6 kB
view hashes)