# Clause Segmenter
A clause segmenting tool utilising Python's SpaCy
## Demo
The following link requires a valid [Australian Access Federation](https://aaf.edu.au/) login
[![Binder](https://binderhub.atap-binder.cloud.edu.au/badge_logo.svg)](https://binderhub.atap-binder.cloud.edu.au/v2/gh/Sydney-Informatics-Hub/clause-segmenter/demo?labpath=demo.ipynb)
## Installation
```shell
python3 -m pip install clause-segmenter
```
## Documentation
Documentation can be found [here](https://sydney-informatics-hub.github.io/clause-segmenter/DOCS.html)
## Usage
A code snippet example that uses the ClauseSegmenter
```python
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
```shell
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](https://python-poetry.org)
To publish a new version:
```shell
poetry config pypi-token.pypi <TOKEN>
poetry version minor
poetry publish --build
```
## Authors
- **Hamish Croser** - [h-croser](https://github.com/h-croser)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": "https://github.com/Sydney-Informatics-Hub/clause-segmenter",
"name": "clause-segmenter",
"maintainer": null,
"docs_url": null,
"requires_python": "<=3.13,>=3.10",
"maintainer_email": null,
"keywords": "python, spacy, nlp, clause",
"author": "Hamish Croser",
"author_email": "h.croser1@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b7/cc/a503375ad52d12e905c585a74e53c6de566f20b58d69a3e6499e3c9881c8/clause_segmenter-0.1.1.tar.gz",
"platform": null,
"description": "# Clause Segmenter\n\nA clause segmenting tool utilising Python's SpaCy\n\n## Demo\n\nThe following link requires a valid [Australian Access Federation](https://aaf.edu.au/) login\n\n[![Binder](https://binderhub.atap-binder.cloud.edu.au/badge_logo.svg)](https://binderhub.atap-binder.cloud.edu.au/v2/gh/Sydney-Informatics-Hub/clause-segmenter/demo?labpath=demo.ipynb)\n\n## Installation\n\n```shell\npython3 -m pip install clause-segmenter\n```\n\n## Documentation\n\nDocumentation can be found [here](https://sydney-informatics-hub.github.io/clause-segmenter/DOCS.html)\n\n## Usage\n\nA code snippet example that uses the ClauseSegmenter\n\n```python\nfrom clause_segmenter import ClauseSegmenter\n\ntext = \"When I want to leave the house, I have to check if it's raining, so I know whether to bring an umbrella.\"\nsegmenter = ClauseSegmenter()\nclauses_ls = segmenter.get_clauses_as_list(text)\nfor clause in clauses_ls:\n print(clause)\n```\n\nOutput:\n```\nWhen I want to leave the house\nI have to check if it's raining\nso I know whether to bring an umbrella\n```\n\n## Tests\n\n```shell\npython3 clause_segmenter/tests/tests.py\n```\n\n## Contributing\n\nThe package for this project is hosted on PyPi: https://pypi.org/project/clause-segmenter/\n\nDependencies, publishing, and version numbering is handled by [Poetry](https://python-poetry.org)\n\nTo publish a new version:\n\n```shell\npoetry config pypi-token.pypi <TOKEN>\npoetry version minor\npoetry publish --build\n```\n\n## Authors\n\n - **Hamish Croser** - [h-croser](https://github.com/h-croser)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details",
"bugtrack_url": null,
"license": "MIT",
"summary": "A clause segmenting tool utilising Python's spacy",
"version": "0.1.1",
"project_urls": {
"Documentation": "https://Sydney-Informatics-Hub.github.io/clause-segmenter/DOCS.html",
"Homepage": "https://github.com/Sydney-Informatics-Hub/clause-segmenter",
"Repository": "https://github.com/Sydney-Informatics-Hub/clause-segmenter"
},
"split_keywords": [
"python",
" spacy",
" nlp",
" clause"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "962fa2ee329067122a1e17a55fc975f381856872b4ab2c021d96ab2d062b54eb",
"md5": "7f3871dd2fcd44feb27b1a3c25d80d4f",
"sha256": "e092e7e9a6d6ca5a1125954845222adf073888fafaef29061da2fc56ee7b6a8b"
},
"downloads": -1,
"filename": "clause_segmenter-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f3871dd2fcd44feb27b1a3c25d80d4f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<=3.13,>=3.10",
"size": 5233,
"upload_time": "2024-11-19T03:09:23",
"upload_time_iso_8601": "2024-11-19T03:09:23.251338Z",
"url": "https://files.pythonhosted.org/packages/96/2f/a2ee329067122a1e17a55fc975f381856872b4ab2c021d96ab2d062b54eb/clause_segmenter-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b7cca503375ad52d12e905c585a74e53c6de566f20b58d69a3e6499e3c9881c8",
"md5": "ee8f37ab63512983dd30fa9394ad9ff6",
"sha256": "e8b24c82010925de3a28389a8889ea11dd4bcb479c137936f5efc48bf6f495fa"
},
"downloads": -1,
"filename": "clause_segmenter-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "ee8f37ab63512983dd30fa9394ad9ff6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<=3.13,>=3.10",
"size": 4593,
"upload_time": "2024-11-19T03:09:24",
"upload_time_iso_8601": "2024-11-19T03:09:24.543236Z",
"url": "https://files.pythonhosted.org/packages/b7/cc/a503375ad52d12e905c585a74e53c6de566f20b58d69a3e6499e3c9881c8/clause_segmenter-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-19 03:09:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Sydney-Informatics-Hub",
"github_project": "clause-segmenter",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "clause-segmenter"
}