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)
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file subsegmenter-0.1.0.tar.gz.
File metadata
- Download URL: subsegmenter-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd63ab2ad7762f355043df56bd02f2ab8b75f42ca4ca9a97e34319de27f86c91
|
|
| MD5 |
5d80a03a225102ae242b6f99f7bc2cd8
|
|
| BLAKE2b-256 |
70f15ddda741e428a42d3a9d91b96b2b97d4215c5a82f52d8f8a0c24011f24ca
|
File details
Details for the file subsegmenter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: subsegmenter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
917d3b46f0fea6d4a63e48584f86fbd3b8b2edb3cac2fc422295cde8c10ec16b
|
|
| MD5 |
201a95c96f31b25e78052eca587ce2ad
|
|
| BLAKE2b-256 |
685673628c2dc9d16680b9a575125c1a46e045fd8ff37f07a4947ce76a0ff49c
|