A clause segmenting tool utilising Python's spacy
Project description
Clause Segmenter
A clause segmenting tool utilising Python's SpaCy
Demo
The following link requires a valid Australian Access Federation login
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
Built Distribution
File details
Details for the file clause_segmenter-0.1.1.tar.gz
.
File metadata
- Download URL: clause_segmenter-0.1.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.9 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8b24c82010925de3a28389a8889ea11dd4bcb479c137936f5efc48bf6f495fa |
|
MD5 | ee8f37ab63512983dd30fa9394ad9ff6 |
|
BLAKE2b-256 | b7cca503375ad52d12e905c585a74e53c6de566f20b58d69a3e6499e3c9881c8 |
File details
Details for the file clause_segmenter-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: clause_segmenter-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.11.9 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e092e7e9a6d6ca5a1125954845222adf073888fafaef29061da2fc56ee7b6a8b |
|
MD5 | 7f3871dd2fcd44feb27b1a3c25d80d4f |
|
BLAKE2b-256 | 962fa2ee329067122a1e17a55fc975f381856872b4ab2c021d96ab2d062b54eb |