Skip to main content

rusyll

Python 3 package for dividing Russian words into phonetic syllables.

About

This package provides algorithmic phonetic syllable division for Russian language, similar to nltk SyllableTokenizer, but adding some language-specific rules.

In fact, there are no unified rules for breaking words into syllables in Russian. Therefore I've selected the most applicable rule set developed by R. I. Avanesov, professor of MSU, in 50s. In short it's based on the sonority index of the letters.

This package can be useful for various Natural Language applications. However, it is not suitable for hyphenation.

Installation

pip install rusyll

How to use

>>> from rusyll import rusyll
>>> rusyll.token_to_syllables("черепаха")
['че', 'ре', 'па', 'ха']
>>> rusyll.word_to_syllables("черепаха-гофер")
['че', 'ре', 'па', 'ха', 'го', 'фер']
>>> rusyll.word_to_syllables_wd("черепаха-гофер")
['че', 'ре', 'па', 'ха', '-', 'го', 'фер']
>>> rusyll.word_to_syllables_safe("черепаха гофер")
>>> Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/toor_2/wonder/Python/rusyll/src/rusyll/rusyll.py",
line 125, in word_to_syllables_safe
assert bool(AssertionError: Word contains unsuitable symbols
>>> rusyll.word_to_syllables_safe("черепаха-гофер")
['че', 'ре', 'па', 'ха', 'го', 'фер']
>>> help(rusyll)
#...complete description of functions

Feedback

This is my first attempt to make proper package for PyPI, so any feedback is highly appreciated!

Metadata

Release files for rusyll 0.1.1

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

Source distribution (sdist)

Source distribution for rusyll 0.1.1
File Size Uploaded
rusyll-0.1.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rusyll 0.1.1
File Interpreter ABI Platform
rusyll-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / rusyll-0.1.1.tar.gz

Download URL rusyll-0.1.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c11e7ee8cb6f5f14adba19869e007ec7a2e1c49835059ca286b40752b7f7bc6e
BLAKE2b-256 checksum
How to use checksums
538b82d9fbfa3a2bf6e864c0c8dfb80e4cc51a5d70c5500cdd559bc3ed56347c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.3 Linux/4.19.104-microsoft-standard

Release files / rusyll-0.1.1-py3-none-any.whl

Download URL rusyll-0.1.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3d1490aaa00f8f3a0315721565c3a358f397b7ef28e439d9ffa78c26070a4fa
BLAKE2b-256 checksum
How to use checksums
7ab6e614c16bc90ec2d2f7efc40923d17446e095318b5e55ac29bb798e3a7af4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.9 CPython/3.8.3 Linux/4.19.104-microsoft-standard

Release history Release notifications | RSS feed

This release

0.1.1 This release

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