
Security News
Crates.io Implements Trusted Publishing Support
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
# 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.
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
syllabify()
returns the given word with hyphens inserted at syllable boundaries.
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'
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']
Fixed a typo in build_model(), where improper shape was being passed into Input() Reverted class name from Syllabel -> Syllable -> Syllabel
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.
Added arg save_clean to syllabify(word, save_clean = True). When save_clean, new words will be saved to self.clean for future reference.
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.
Fixed casing issues by adding a check to verify only lowercase strings, and consistently reinsert syllable coundaries regardless of original casing.
FAQs
English word syllabifier and extended syllable analysis tool
We found that eng-syl demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.
Research
/Security News
North Korean threat actors deploy 67 malicious npm packages using the newly discovered XORIndex malware loader.