Skip to main content

# English Syllabifier (eng_syl) This is a GRU-based neural network designed for English word syllabification. The model was trained on data from the Wikimorph dataset.

Usage

Use the syllabify() function from the Syllabel class to syllabify your words:

>>> from eng_syl.syllabify import Syllabel
>>> syllabler = Syllabel()
>>> syllabler.syllabify("chomsky")
'chom-sky'

syllabify() parameters

  • text: string- English text to be syllabified. Input should only contain alphabetic characters.

syllabify() returns the given word with hyphens inserted at syllable boundaries.

Onceler (Onset, Nucleus, Coda Segmenter)

The onc_split() function from the Onceler class splits single syllables into their constituent Onset, Nucleus, and Coda components.

>>> from eng_syl.onceler import Onceler
>>> onc = Onceler()
>>> print(onc.onc_split("schmear")
'schm-ea-r'
  • text: string - English single syllable word/ component to be segmented into Onset, Nucleus, Coda. Input should only contain alphabetic characters.

Phonify (Grapheme sequence to IPA estimation)

The ipafy() function from the onc_to_phon class tries to approximate an IPA pronunciation from a sequence of graphemes.

>>> from eng_syl.phonify import onc_to_phon
>>> otp = onc_to_phon()
>>> print(otp.ipafy(['schm', 'ea', 'r'])
['ʃm', 'ɪ', 'r']
  • sequence: array of strings - sa sequence of English viable onsets, nuclei, and coda

4.0.2 Notes

Fixed a typo in build_model(), where improper shape was being passed into Input() Reverted class name from Syllabel -> Syllable -> Syllabel

4.0.3 Notes

Added handling for non-alpha characters in string; syllabify() won't break immediately if you pass a string like 'he23llotruc38k'. Instead, syllabify() syllabifies the string, ignoring non-alpha characters, and reinserts the non-alpha characters with hyphenation -> 'he23l-lo-truc38k'. This allows for handling of prehyphenated words like 'u-turn' -> 'u--turn'. Also added an arg for returning the syllables as a list in syllabify(word, return_list = False). Should be capable of handling most strings now.

4.0.4 Notes

Added arg save_clean to syllabify(word, save_clean = True). When save_clean, new words will be saved to self.clean for future reference.

4.0.7 Notes

Added evaluate_english_validity(syllable) to Syllabel, which returns the onset nucleus coda decomposition split by hyphens if the syllable is likely English pronounceable, and False if unlikely.

4.0.7 Notes

Fixed casing issues by adding a check to verify only lowercase strings, and consistently reinsert syllable coundaries regardless of original casing.

Metadata

Release files for eng-syl 4.0.8.2

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

Built distribution (wheel)

Table of built distributions (wheels) for eng-syl 4.0.8.2
File Interpreter ABI Platform Actions
eng_syl-4.0.8.2-py3-none-any.whl Python 3 none any Details for eng_syl-4.0.8.2-py3-none-any.whl

Release files / eng_syl-4.0.8.2-py3-none-any.whl

Download URL eng_syl-4.0.8.2-py3-none-any.whl
Size 86.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
6ce266702c9d4e45d04d7144c1c63a3cea1a9a3cee9a427968fb2d16b6d8ffcd
BLAKE2b-256 checksum
How to use checksums
08e7a73e5a36de5c6c417ae5eb2a5751a9d6c6b48f2f3a1cd7f03d59993b3065
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.4

Security for eng-syl 4.0.8.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

4.0.8.2 This release

1 release file No provenance

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