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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysbd-0.1.2-py3-none-any.whl.
File metadata
- Download URL: pysbd-0.1.2-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
603e3a03be9d13fe7b78e1c75d6ed8d8c0d452ff4a514f4d9e3354bb04b67132
|
|
| MD5 |
1b03abacf7193b3dec5154cb8b6f6eb1
|
|
| BLAKE2b-256 |
61efcb042cabd795827fe450ed97b7358951dfa6e5b32eb66308c8b5fef57f69
|