https://github.com/carlosplanchon/tokenizesentences
Python3 module to tokenize english sentences.
https://github.com/carlosplanchon/tokenizesentences
carlosplanchon opensource python python3 sentences tokenize
Last synced: 11 months ago
JSON representation
Python3 module to tokenize english sentences.
- Host: GitHub
- URL: https://github.com/carlosplanchon/tokenizesentences
- Owner: carlosplanchon
- License: gpl-3.0
- Created: 2019-04-22T19:44:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-24T04:38:16.000Z (over 7 years ago)
- Last Synced: 2025-09-03T01:52:15.161Z (11 months ago)
- Topics: carlosplanchon, opensource, python, python3, sentences, tokenize
- Language: Python
- Size: 21.5 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# tokenizesentences
*Python3 module to tokenize english sentences.*
Based on the answer of D Greenberg in StackOverflow:
https://stackoverflow.com/questions/4576077/python-split-text-on-sentences
## Installation
### Install with pip
```
pip3 install -U tokenizesentences
```
## Usage
```
In [1]: import tokenizesentences
In [2]: m = tokenizesentences.SplitIntoSentences()
In [3]: m.split_into_sentences(
"Mr. John Johnson Jr. was born in the U.S.A but earned his Ph.D. in Israel before joining Nike Inc. as an engineer. He also worked at craigslist.org as a business analyst."
)
Out[3]:
[
'Mr. John Johnson Jr. was born in the U.S.A but earned his Ph.D. in Israel before joining Nike Inc. as an engineer.',
'He also worked at craigslist.org as a business analyst.'
]
```