Package 'syllabifyr'

Title: Syllabifier for CMU Dictionary Transcriptions
Description: Implements tidy syllabification of transcription. Based on @kylebgorman's 'python' implementation <https://github.com/kylebgorman/syllabify>.
Authors: Josef Fruehwald
Maintainer: Josef Fruehwald <[email protected]>
License: MIT + file LICENSE
Version: 0.1.1
Built: 2025-02-20 03:44:12 UTC
Source: https://github.com/jofrhwld/syllabifyr

Help Index


Syllabify

Description

This will take a transcription as input, and return it as a data frame.

Usage

syllabify(pron, alaska_rule = T)

Arguments

pron

The CMU dictionary pronunciation, either as a vector, or a string with labels separated by spaces

alaska_rule

Don't maximize onset on lax vowel + s sequences

Value

Returns a data frame with the following columns

syll

A numeric index for each syllable

part

What part of the syllable each phone belongs to

phone

The phone label from the transcription

stress

The syllable stress

Examples

# String input
syllabify("AO0 S T R EY1 L Y AH0")

# Vector input
syllabify(c("AO0", "S", "T", "R", "EY1", "L", "Y", "AH0"))

# Hiatus
syllabify("HH AY0 EY1 T AH0 S")

# Deficient transcriptions (has warning)
syllabify(c("M"))

Syllabify to a list

Description

This will take a transcription as input, and return it as a list.

Usage

syllabify_list(pron, alaska_rule = TRUE)

Arguments

pron

The CMU dictionary pronunciation, either as a vector, or a string with labels separated by spaces

alaska_rule

Don't maximize onset on lax vowel + s sequences

Value

A with one value per syllable. Each value is a list, with three values: onset, nucleus, coda. Each will contain a vector of the phones which belong to each constituent part of the syllable. Any empty constituent parts will have the value character(0)

Examples

# String input
syllabify_list("AO0 S T R EY1 L Y AH0")

# Vector input
syllabify_list(c("AO0", "S", "T", "R", "EY1", "L", "Y", "AH0"))
# Hiatus
syllabify_list("HH AY0 EY1 T AH0 S")

# Deficient transcriptions (has warning)
syllabify_list(c("M"))

Syllabify: A package for doing tidy syllabification

Description

This is a package to do tidy syllabification of phonetic transcriptions. The syllabifier "maximizes onset". The algorithmic approach to this is adapted from Kyle Gorman's python implementation (https://github.com/kylebgorman/syllabify)

Functions

The key function is syllabify(). Given a CMU transcription, it will return a tibble. See ?syllabify() for more info.

Also available is syllabify_list(). This is a list representation of the syllables. See ?syllabify_list() for more info.