Skip to main content

A clause segmenting tool utilising Python's SpaCy

Project description

Clause Segmenter

A clause segmenting tool utilising Python's SpaCy

Installation

python3 -m pip install clause-segmenter

Documentation

Documentation can be found here

Usage

A code snippet example that uses the ClauseSegmenter

from clause_segmenter import ClauseSegmenter

text = "When I want to leave the house, I have to check if it's raining, so I know whether to bring an umbrella."
segmenter = ClauseSegmenter()
clauses_ls = segmenter.get_clauses_as_list(text)
for clause in clauses_ls:
    print(clause)

Output:

When I want to leave the house
I have to check if it's raining
so I know whether to bring an umbrella

Tests

python3 clause_segmenter/tests/tests.py

Contributing

The package for this project is hosted on PyPi: https://pypi.org/project/clause-segmenter/

Dependencies, publishing, and version numbering is handled by Poetry

To publish a new version:

poetry config pypi-token.pypi <TOKEN>
poetry version minor
poetry publish --build

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

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

clause_segmenter-0.1.0.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

clause_segmenter-0.1.0-py3-none-any.whl (4.5 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