Skip to main content

English word syllabifier and extended syllable analysis tool

Project description

# 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
>>> lorax = Onceler()
>>> print(lorax.onc_split("sloan")
'sl-oa-n'
  • 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 on_to_phon class tries to approximate an IPA pronunciation from a sequence of graphemes.

>>> from eng_syl.phonify import onc_to_phon
>>> skibidi = onc_to_phon()
>>> print(skibidi.ipafy(['b', 'u', 'tt'])
'bÊŒt'
  • 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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

eng_syl-4.0.2-py3-none-any.whl (86.4 MB view details)

Uploaded Python 3

File details

Details for the file eng_syl-4.0.2-py3-none-any.whl.

File metadata

  • Download URL: eng_syl-4.0.2-py3-none-any.whl
  • Upload date:
  • Size: 86.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for eng_syl-4.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c17a7641bd76050c476bf49b255d7badf97e922935fd227df76bdfaabc1008d
MD5 2e73b6142e0a360b5f18596877851a76
BLAKE2b-256 f50110914ea33c93540a91eeecb959427d93272d03642357dd7dbe03afdc75a1

See more details on using hashes here.

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