Character-level segmentation model
Project description
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
Project details
Release history Release notifications | RSS feed
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 combo_seg-0.1.3.tar.gz.
File metadata
- Download URL: combo_seg-0.1.3.tar.gz
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8c744bd816eb59a1d696bc3cbbd4d340eff42a56e32314460cac4967512026d
|
|
| MD5 |
61d8ea5afea3f9b299baa7c48f35d166
|
|
| BLAKE2b-256 |
32efc87db3108a13318b34358d8460326dd3d3e7fd9ebc1ca5af3206f9bf5b57
|
File details
Details for the file combo_seg-0.1.3-py3-none-any.whl.
File metadata
- Download URL: combo_seg-0.1.3-py3-none-any.whl
- Upload date:
- Size: 53.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9827446e58d726a1c672887d85aa13d951214c08f4ee2415f9ec97d73e51d031
|
|
| MD5 |
3cbac528b7c2dee55a46ae8db7e13ab7
|
|
| BLAKE2b-256 |
f8a489f6d8a7bb8dfe7645747669469e7b83194fdf857a77b32b10e3d0e36e55
|