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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

combo_seg-0.1.5.tar.gz (64.9 kB view details)

Uploaded Source

Built Distribution

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

combo_seg-0.1.5-py3-none-any.whl (55.3 kB view details)

Uploaded Python 3

File details

Details for the file combo_seg-0.1.5.tar.gz.

File metadata

  • Download URL: combo_seg-0.1.5.tar.gz
  • Upload date:
  • Size: 64.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for combo_seg-0.1.5.tar.gz
Algorithm Hash digest
SHA256 af009b326d57dc997916e7b875254617910d0ae2f778c6314b00eecfe17a12ee
MD5 2532f188438e229310fdefaf81671cf7
BLAKE2b-256 527a7bdc9c26bc1ee3b6c9d5e95406cacf604f8f05789d0a3c1f2722a381b16d

See more details on using hashes here.

File details

Details for the file combo_seg-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: combo_seg-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 55.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for combo_seg-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cbeeb0e84105c371faf8e6a4d25b32ed250f5c131cb65e2a1b7c9f0df97196ee
MD5 dba490ae6caa7ed36340398ea8e9cd72
BLAKE2b-256 652a91b2cfce4e1d9069ca3309fe809347c0381758bbf237d1d77e4431407421

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

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