Skip to main content

Python module to tokenize english sentences.

Project description

tokenizesentences

Python 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 uv:

uv add 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.'
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tokenizesentences-0.3.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tokenizesentences-0.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file tokenizesentences-0.3.tar.gz.

File metadata

  • Download URL: tokenizesentences-0.3.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tokenizesentences-0.3.tar.gz
Algorithm Hash digest
SHA256 58eca48d70be5c65dcb5ea3f3d180ff61d3d9e1f66ede7632dec4d46fb73c3be
MD5 f8be4e7be690324699e9f8b2516c8c57
BLAKE2b-256 95a7a3d760efaa473702fd047ab60073b749f747d33e0c5a53313ca872e4d548

See more details on using hashes here.

File details

Details for the file tokenizesentences-0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for tokenizesentences-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b27e56ee051cab917f8b3df7695a832c83649079078398b4a5675e0ab9fb6865
MD5 f033dd774c7ae7d6e60e2d8a98b25ac7
BLAKE2b-256 be6898c355d8210041fd7b55eac8461b31ca4ed07cc0c127d086a5ec5f199994

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page