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
- Hamish Croser - h-croser
License
This project is licensed under the MIT License - see the LICENSE file for details
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 Distribution
clause_segmenter-0.1.0.tar.gz
(3.9 kB
view hashes)
Built Distribution
Close
Hashes for clause_segmenter-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5c25ddf3d9b3ddf3f489197ff8192e151d46f1885817d4064214026b06898c8 |
|
MD5 | 83865083613fdd83726222e90b55a792 |
|
BLAKE2b-256 | 41da0564f9acf8a76f9303c0fa86bdbac33397a9bf1978805bdfc1cef525b5a6 |