phonetise | R Documentation |
phonetise()
tokenises strings of IPA symbols (like phonetic transcriptions
of words) into individual "phones". The output is a list.
phonetise(
strings,
multi = NULL,
regex = NULL,
split = TRUE,
sep = " ",
sanitise = TRUE,
ignore_stress = TRUE,
ignore_tone = TRUE,
diacritics = FALSE,
affricates = FALSE,
v_sequences = FALSE,
prenasalised = FALSE,
all_multi = FALSE,
sanitize = sanitise
)
phonetize(
strings,
multi = NULL,
regex = NULL,
split = TRUE,
sep = " ",
sanitise = TRUE,
ignore_stress = TRUE,
ignore_tone = TRUE,
diacritics = FALSE,
affricates = FALSE,
v_sequences = FALSE,
prenasalised = FALSE,
all_multi = FALSE,
sanitize = sanitise
)
strings |
A character vector with a list of words in IPA. |
multi |
A character vector of one or more multi-character phones as strings. |
regex |
A string with a regular expression to match several multi-character phones. |
split |
If set to |
sep |
A character to be used as the separator of the phones if |
sanitise |
Whether to remove all non-IPA characters ( |
ignore_stress |
If |
ignore_tone |
If |
diacritics |
If set to |
affricates |
If set to |
v_sequences |
If set to |
prenasalised |
If set to |
all_multi |
If set to |
sanitize |
Alias of |
A list of phonetised strings.
# using unicode escapes for CRAN policy
ipa <- c("p\u02B0a\u0303k\u02B0", "t\u02B0um\u0325", "\u025Bk\u02B0\u026F")
ph <- c("p\u02B0", "t\u02B0", "k\u02B0", "a\u0303", "m\u0325")
phonetise(ipa, multi = ph)
ph_2 <- ph[4:5]
# Match any character followed by <\u02B0> with ".\u02B0".
phonetise(ipa, multi = ph_2, regex = ".\u02B0")
# Same result.
phonetise(ipa, regex = ".(\u0303|\u0325|\u02B0)")
# Don't split strings and use "." as separator
phonetise(ipa, multi = ph, split = FALSE, sep = ".")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.