Skip to main content

COMBO-SEG

Character-level segmentation model for natural language text.

COMBO-SEG segments raw text into turns, sentences, tokens, and words using a transformer-based character-level classifier. Supports 80+ languages.

Output hierarchy: Document → Turn[] → Sentence[] → Token[] (matches LAMBO). Turns are produced by regexp separators (by default double newline \n\n and <turn>) before the neural model splits each turn into sentences and tokens.

Installation

pip install combo-seg

Usage

from combo_seg import ComboSeg, Language, SplitLevel

segmenter = ComboSeg(language=Language.POLISH)
doc = segmenter("Ala ma kota. Kot ma Alę.\n\nDrugi akapit.")

for turn in doc.turns:
    for sentence in turn.sentences:
        print(sentence.text)
        for token in sentence.tokens:
            print(f"  {token.text}")

# Pass split_level=SplitLevel.TURN to collapse each turn into one Sentence.

License

GPL-3.0

Metadata

Release files for combo-seg 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for combo-seg 0.1.5
File Size Uploaded
combo_seg-0.1.5.tar.gz 64.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for combo-seg 0.1.5
File Interpreter ABI Platform
combo_seg-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 120.2 kB

Release files / combo_seg-0.1.5.tar.gz

Download URL combo_seg-0.1.5.tar.gz
Size 64.9 kB
Tags Source
SHA-256 checksum
How to use checksums
af009b326d57dc997916e7b875254617910d0ae2f778c6314b00eecfe17a12ee
BLAKE2b-256 checksum
How to use checksums
527a7bdc9c26bc1ee3b6c9d5e95406cacf604f8f05789d0a3c1f2722a381b16d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / combo_seg-0.1.5-py3-none-any.whl

Download URL combo_seg-0.1.5-py3-none-any.whl
Size 55.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cbeeb0e84105c371faf8e6a4d25b32ed250f5c131cb65e2a1b7c9f0df97196ee
BLAKE2b-256 checksum
How to use checksums
652a91b2cfce4e1d9069ca3309fe809347c0381758bbf237d1d77e4431407421
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page