Skip to main content

Fast and Efficient Sentence Segmentation

Project description

Fast Sentence Segmentation (fast-sentence-segment)

Fast and Efficient Sentence Segmentation

Usage

from fast_sentence_segment import segment_text

results = segment_text(
    'here is a dr. who says something.  and then again, what else?  i dont know.  Do you?')

assert results == [
    [
        'here is a dr. who says something.',
        'and then again, what else?',
        'i dont know.',
        'Do you?'
    ]
]

Why use a double-scripted list?

The segementation process will segment into paragraphs and sentences. A paragraph is composed of 1..* sentences, hence each list of lists is equivalent to a paragraph.

This usage

results = segment_text(input_text, flatten=True)

Will return a list of strings, regardless of paragraph delimitation.

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

fast-sentence-segment-0.1.9.tar.gz (6.1 kB view hashes)

Uploaded Source

Built Distribution

fast_sentence_segment-0.1.9-py3-none-any.whl (10.3 kB view hashes)

Uploaded Python 3

Supported by

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