sampa: Convert phonetic representation from X-SAMPA

Description Usage Arguments Value See Also Examples

View source: R/sampa.R

Description

Converts to IPA or ARPABET (used by the CMU Pronouncing Dictionary)

Usage

1
2
3
sampa(x, to = c("ipa", "arpabet"))

xsampa(x, to = c("ipa", "arpabet"))

Arguments

x

A phonetic character vector in X-SAMPA

to

The phonetic alphabet to convert to. Defaults to "ipa". "arpa" and "cmu" are accepted aliases for "arpabet".

Value

A character vector the same length as x

See Also

convert_phonetics() to convert between any phonetic representations

ipa() to convert from IPA

arpa(), arpabet() and cmu() to convert from ARPABET (CMU)

Examples

1
2
3
4
5
sampa('%hE"loU')
sampa(c('%hE"loU', "w3`ld"))

sampa('%hE"loU', "arpabet")
sampa(c('%hE"loU', "w3`ld"), "arpabet")

Example output

[1] "ˌhɛˈloʊ"
[1] "ˌhɛˈloʊ" "wɝld"   
[1] "HH EH L OW"
Warning message:
In convert_phonetics(x, from = "xsampa", to = to) :
  Stress is not supported for ARPABET, so stresses were removed.
[1] "HH EH L OW" "W ER L D"  
Warning message:
In convert_phonetics(x, from = "xsampa", to = to) :
  Stress is not supported for ARPABET, so stresses were removed.

ipa documentation built on July 2, 2020, 4:14 a.m.

Related to sampa in ipa...