Skip to main content

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

subsegmenter-0.1.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

subsegmenter-0.1.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file subsegmenter-0.1.2.tar.gz.

File metadata

  • Download URL: subsegmenter-0.1.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for subsegmenter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 29194585fcd9ee10b4b0acf0fcd9db93f3eba8d67fd5ed0542fd83f73f819426
MD5 fda4d2ae0ab554e49d81089075bf2e0f
BLAKE2b-256 88002453ac8a5a5dd6b96103721bbf2ee5019d9704c8e7dafff330f51f8561e7

See more details on using hashes here.

File details

Details for the file subsegmenter-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: subsegmenter-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for subsegmenter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ed74064ca79f6a8bc49748346c27210f720464c9d62e8e3e5160da0942f388b1
MD5 5b5bfdd76e020d43e91baed3de500a5f
BLAKE2b-256 015119522aaa165b40afcf8d44458eb3d0bd40b0e0e2b707546bf0b50dde90b2

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page