SubSegmenter
A lightweight Python library built to segment dense text down to atomic semantic units. Unlike traditional tokenizers (like nltk) that stop strictly at the sentence level, SubSegmenter resolves shared dependencies and breaks sentences apart at clausal and gerund breakpoints without losing context words or language.
Core Features
- Shared Dependency Resolution: Expands coordinated structures smoothly (e.g., "design and lead projects" becomes "design projects", "lead projects").
- High-Performance Execution: Streamlined to run entirely on the CPU.
- Fast Text Pre-Cleaning: Built-in optimized regex filters to strip HTML markup, metadata, and other junk before parsing.
- Domain-Agnostic: Runs completely based on linguistic parsing.
Installation
pip install subsegmenter
Also make sure to have the appropriate SpaCy model downloaded:
python3 -m spacy download en_core_web_sm
Quick Start
Processing any document is easy:
from subsegmenter import SubSegmenter
text = "Organizes, coordinates and mentors the efforts of project engineers supporting the program. Maintains consistency with applicable standards, procedures, and implementation methodologies."
segmenter = SubSegmenter()
results = segmenter.segment(text)
If you would like to process a large batch of (large) documents, use the following:
from subsegmenter import process_pipeline
documents = [text] * 1000
batch_outputs = process_pipeline(documents)
Metadata
Release files for subsegmenter 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| subsegmenter-0.1.2.tar.gz | 7.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| subsegmenter-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 kB
Release files / subsegmenter-0.1.2.tar.gz
| Download URL | subsegmenter-0.1.2.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29194585fcd9ee10b4b0acf0fcd9db93f3eba8d67fd5ed0542fd83f73f819426
|
|
BLAKE2b-256 checksum How to use checksums |
88002453ac8a5a5dd6b96103721bbf2ee5019d9704c8e7dafff330f51f8561e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|
Release files / subsegmenter-0.1.2-py3-none-any.whl
| Download URL | subsegmenter-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed74064ca79f6a8bc49748346c27210f720464c9d62e8e3e5160da0942f388b1
|
|
BLAKE2b-256 checksum How to use checksums |
015119522aaa165b40afcf8d44458eb3d0bd40b0e0e2b707546bf0b50dde90b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.20
|