Title: | Convert Between Phonetic Alphabets |
---|---|
Description: | Converts character vectors between phonetic representations. Supports IPA (International Phonetic Alphabet), X-SAMPA (Extended Speech Assessment Methods Phonetic Alphabet), and ARPABET (used by the CMU Pronouncing Dictionary). |
Authors: | Alexander Rossell Hayes [aut, cre, cph]
|
Maintainer: | Alexander Rossell Hayes <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0.9000 |
Built: | 2024-08-25 02:54:29 UTC |
Source: | https://github.com/rossellhayes/ipa |
Converts to IPA or X-SAMPA
arpa(x, to = c("ipa", "xsampa")) arpabet(x, to = c("ipa", "xsampa")) cmu(x, to = c("ipa", "xsampa"))
arpa(x, to = c("ipa", "xsampa")) arpabet(x, to = c("ipa", "xsampa")) cmu(x, to = c("ipa", "xsampa"))
x |
A phonetic character vector in ARPABET |
to |
The phonetic alphabet to convert to.
Defaults to |
A character vector the same length as x
convert_phonetics()
to convert between any phonetic
representations
ipa()
to convert from IPA
sampa()
and xsampa()
to convert from X-SAMPA
arpa('HH EH L OW') arpa(c('HH EH L OW', "W ER L D")) arpa('HH EH L OW', "xsampa") arpa(c('HH EH L OW', "W ER L D"), "xsampa")
arpa('HH EH L OW') arpa(c('HH EH L OW', "W ER L D")) arpa('HH EH L OW', "xsampa") arpa(c('HH EH L OW', "W ER L D"), "xsampa")
Converts between IPA, X-SAMPA and ARPABET (used by the CMU Pronouncing Dictionary)
convert_phonetics( x, from = c("ipa", "xsampa", "arpabet"), to = c("ipa", "xsampa", "arpabet") )
convert_phonetics( x, from = c("ipa", "xsampa", "arpabet"), to = c("ipa", "xsampa", "arpabet") )
x |
A phonetic character vector in IPA, X-SAMPA, or ARPABET |
from |
The phonetic alphabet to convert from |
to |
The phonetic alphabet to convert to.
|
A character vector the same length as x
ipa()
to convert from IPA
sampa()
and xsampa()
to convert from X-SAMPA
arpa()
, arpabet()
and cmu()
to convert from ARPABET (CMU)
convert_phonetics('%hE"loU', from = "xsampa", to = "ipa") convert_phonetics(c('%hE"loU', "w3`ld"), from = "xsampa", to = "ipa") convert_phonetics('%hE"loU', from = "xsampa", to = "arpabet") convert_phonetics(c('%hE"loU', "w3`ld"), from = "xsampa", to = "arpabet") convert_phonetics('HH EH L OW', from = "arpabet", to = "ipa") convert_phonetics(c('HH EH L OW', "W ER L D"), from = "arpabet", to = "ipa") convert_phonetics('HH EH L OW', from = "arpabet", to = "xsampa") convert_phonetics(c('HH EH L OW', "W ER L D"), from = "arpabet", to = "xsampa") # `convert_phonetics()` supports raw Unicode input or escaped Unicode sequences # (\uxxxx), but raw Unicode is not supported in R package documentation, # hence the ugly examples convert_phonetics("\\u02cch\\u025b\\'lo\\u028a", from = "ipa", to = "xsampa") convert_phonetics( c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld"), from = "ipa", to = "xsampa" ) convert_phonetics("\\u02cch\\u025b\\'lo\\u028a", from = "ipa", to = "arpabet") convert_phonetics( c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld"), from = "ipa", to = "arpabet" )
convert_phonetics('%hE"loU', from = "xsampa", to = "ipa") convert_phonetics(c('%hE"loU', "w3`ld"), from = "xsampa", to = "ipa") convert_phonetics('%hE"loU', from = "xsampa", to = "arpabet") convert_phonetics(c('%hE"loU', "w3`ld"), from = "xsampa", to = "arpabet") convert_phonetics('HH EH L OW', from = "arpabet", to = "ipa") convert_phonetics(c('HH EH L OW', "W ER L D"), from = "arpabet", to = "ipa") convert_phonetics('HH EH L OW', from = "arpabet", to = "xsampa") convert_phonetics(c('HH EH L OW', "W ER L D"), from = "arpabet", to = "xsampa") # `convert_phonetics()` supports raw Unicode input or escaped Unicode sequences # (\uxxxx), but raw Unicode is not supported in R package documentation, # hence the ugly examples convert_phonetics("\\u02cch\\u025b\\'lo\\u028a", from = "ipa", to = "xsampa") convert_phonetics( c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld"), from = "ipa", to = "xsampa" ) convert_phonetics("\\u02cch\\u025b\\'lo\\u028a", from = "ipa", to = "arpabet") convert_phonetics( c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld"), from = "ipa", to = "arpabet" )
Converts to X-SAMPA or ARPABET (used by the CMU Pronouncing Dictionary)
ipa(x, to = c("xsampa", "arpabet"))
ipa(x, to = c("xsampa", "arpabet"))
x |
A phonetic character vector in IPA |
to |
The phonetic alphabet to convert to.
Defaults to |
A character vector the same length as x
convert_phonetics()
to convert between any phonetic
representations
sampa()
and xsampa()
to convert from X-SAMPA
arpa()
, arpabet()
and cmu()
to convert from ARPABET (CMU)
# `ipa()` supports raw Unicode input or escaped Unicode sequences (\uxxxx), # but raw Unicode is not supported in R package documentation, # hence the ugly examples ipa("\\u02cch\\u025b\\'lo\\u028a") ipa(c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld")) ipa("\\u02cch\\u025b\\'lo\\u028a", to = "arpabet") ipa(c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld"), to = "arpabet")
# `ipa()` supports raw Unicode input or escaped Unicode sequences (\uxxxx), # but raw Unicode is not supported in R package documentation, # hence the ugly examples ipa("\\u02cch\\u025b\\'lo\\u028a") ipa(c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld")) ipa("\\u02cch\\u025b\\'lo\\u028a", to = "arpabet") ipa(c("\\u02cch\\u025b\\'lo\\u028a", "w\\u025dld"), to = "arpabet")
Converts to IPA or ARPABET (used by the CMU Pronouncing Dictionary)
sampa(x, to = c("ipa", "arpabet")) xsampa(x, to = c("ipa", "arpabet"))
sampa(x, to = c("ipa", "arpabet")) xsampa(x, to = c("ipa", "arpabet"))
x |
A phonetic character vector in X-SAMPA |
to |
The phonetic alphabet to convert to.
Defaults to |
A character vector the same length as x
convert_phonetics()
to convert between any phonetic
representations
ipa()
to convert from IPA
arpa()
, arpabet()
and cmu()
to convert from ARPABET (CMU)
sampa('%hE"loU') sampa(c('%hE"loU', "w3`ld")) sampa('%hE"loU', "arpabet") sampa(c('%hE"loU', "w3`ld"), "arpabet")
sampa('%hE"loU') sampa(c('%hE"loU', "w3`ld")) sampa('%hE"loU', "arpabet") sampa(c('%hE"loU', "w3`ld"), "arpabet")