Skip to contents

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")
#> # A tibble: 8 × 4
#>    syll part    phone stress
#>   <dbl> <chr>   <chr> <chr> 
#> 1     1 nucleus AO    0     
#> 2     2 onset   S     1     
#> 3     2 onset   T     1     
#> 4     2 onset   R     1     
#> 5     2 nucleus EY    1     
#> 6     2 coda    L     1     
#> 7     3 onset   Y     0     
#> 8     3 nucleus AH    0     

# Vector input
syllabify(c("AO0", "S", "T", "R", "EY1", "L", "Y", "AH0"))
#> # A tibble: 8 × 4
#>    syll part    phone stress
#>   <dbl> <chr>   <chr> <chr> 
#> 1     1 nucleus AO    0     
#> 2     2 onset   S     1     
#> 3     2 onset   T     1     
#> 4     2 onset   R     1     
#> 5     2 nucleus EY    1     
#> 6     2 coda    L     1     
#> 7     3 onset   Y     0     
#> 8     3 nucleus AH    0     

# Hiatus
syllabify("HH AY0 EY1 T AH0 S")
#> # A tibble: 6 × 4
#>    syll part    phone stress
#>   <dbl> <chr>   <chr> <chr> 
#> 1     1 onset   HH    0     
#> 2     1 nucleus AY    0     
#> 3     2 nucleus EY    1     
#> 4     3 onset   T     0     
#> 5     3 nucleus AH    0     
#> 6     3 coda    S     0     

# Deficient transcriptions (has warning)
syllabify(c("M"))
#> Warning: transcription 'M' is defective
#> # A tibble: 1 × 4
#>    syll part  phone stress
#>   <dbl> <chr> <chr> <chr> 
#> 1     1 onset M     NA