Return 单词的音节 - 在 R 中
Return syllables of words hyphenated - in R
我已经为此工作了几天,但并没有像我希望的那样取得进展。我知道 Franklin M. Liang 的断字算法在多个 languages 中实现。然而,其中 none 个是 R。
即使在 R 中有一个实现,我也不确定它是否完全符合我的要求,因为我感兴趣的是识别音节,而不仅仅是换行符在听觉和视觉上吸引人的位置。
我理想的实现方式如下:
w = c('country', 'someone', 'merely')
syllables(w)
[1] "coun-try" "some-one" "mere-ly"
Liang 的断字算法在 koRpus 包中实现。小插图指出
"the function hyphen() takes objects of class kRp.tagged and applies an hyphenation algorithm (Liang, 1983) to each word."
我已经为此工作了几天,但并没有像我希望的那样取得进展。我知道 Franklin M. Liang 的断字算法在多个 languages 中实现。然而,其中 none 个是 R。
即使在 R 中有一个实现,我也不确定它是否完全符合我的要求,因为我感兴趣的是识别音节,而不仅仅是换行符在听觉和视觉上吸引人的位置。
我理想的实现方式如下:
w = c('country', 'someone', 'merely')
syllables(w)
[1] "coun-try" "some-one" "mere-ly"
Liang 的断字算法在 koRpus 包中实现。小插图指出
"the function hyphen() takes objects of class kRp.tagged and applies an hyphenation algorithm (Liang, 1983) to each word."