Skip to contents

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")
#> [[1]]
#> [[1]]$onset
#> character(0)
#> 
#> [[1]]$nucleus
#> [1] "AO0"
#> 
#> [[1]]$coda
#> character(0)
#> 
#> 
#> [[2]]
#> [[2]]$onset
#> [1] "S" "T" "R"
#> 
#> [[2]]$nucleus
#> [1] "EY1"
#> 
#> [[2]]$coda
#> [1] "L"
#> 
#> 
#> [[3]]
#> [[3]]$onset
#> [1] "Y"
#> 
#> [[3]]$nucleus
#> [1] "AH0"
#> 
#> [[3]]$coda
#> character(0)
#> 
#> 

# Vector input
syllabify_list(c("AO0", "S", "T", "R", "EY1", "L", "Y", "AH0"))
#> [[1]]
#> [[1]]$onset
#> character(0)
#> 
#> [[1]]$nucleus
#> [1] "AO0"
#> 
#> [[1]]$coda
#> character(0)
#> 
#> 
#> [[2]]
#> [[2]]$onset
#> [1] "S" "T" "R"
#> 
#> [[2]]$nucleus
#> [1] "EY1"
#> 
#> [[2]]$coda
#> [1] "L"
#> 
#> 
#> [[3]]
#> [[3]]$onset
#> [1] "Y"
#> 
#> [[3]]$nucleus
#> [1] "AH0"
#> 
#> [[3]]$coda
#> character(0)
#> 
#> 
# Hiatus
syllabify_list("HH AY0 EY1 T AH0 S")
#> [[1]]
#> [[1]]$onset
#> [1] "HH"
#> 
#> [[1]]$nucleus
#> [1] "AY0"
#> 
#> [[1]]$coda
#> character(0)
#> 
#> 
#> [[2]]
#> [[2]]$onset
#> character(0)
#> 
#> [[2]]$nucleus
#> [1] "EY1"
#> 
#> [[2]]$coda
#> character(0)
#> 
#> 
#> [[3]]
#> [[3]]$onset
#> [1] "T"
#> 
#> [[3]]$nucleus
#> [1] "AH0"
#> 
#> [[3]]$coda
#> [1] "S"
#> 
#> 

# Deficient transcriptions (has warning)
syllabify_list(c("M"))
#> Warning: transcription 'M' is defective
#> [[1]]
#> [[1]]$onset
#> [1] "M"
#> 
#> [[1]]$nucleus
#> character(0)
#> 
#> [[1]]$coda
#> character(0)
#> 
#>