Skip to main content

Splitting Czech words into syllables

Project description

Czech Syllable Splitter

Alogirthm for splitting Czech words into syllables. Inspired by a syllable counting algorithm from David Lukeš counting the vowels.

With Klára Bendová we put together rules to expand the vowels into syllables, empirically finding some common letter groups to stay intact.

This is not a perfect solution, but it is a good start for Czech language processing. Measuring the accuracy of this algorithm is a to-do, as well as adding more rules if needed.

Installation

pip install czech-syllable-splitter

or using Poetry package manager

poetry add czech-syllable-splitter

Usage

from czech_syllable_splitter import count_syllables, split_to_syllables, split_to_characters

print(split_to_syllables("příliš"))
print(split_to_characters("přesný"))
print(count_syllables("přísný"))

Lint & Test

poetry run python3 -m pytest
poetry run mypy czech_syllable_splitter
poetry run pylint czech_syllable_splitter

Project details


Download files

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

Source Distribution

czech_syllable_splitter-0.1.0.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

czech_syllable_splitter-0.1.0-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page