Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rossellhayes/ipa
🗣️ Convert between phonetic alphabets
https://github.com/rossellhayes/ipa
Last synced: 2 months ago
JSON representation
🗣️ Convert between phonetic alphabets
- Host: GitHub
- URL: https://github.com/rossellhayes/ipa
- Owner: rossellhayes
- License: other
- Created: 2020-05-13T04:00:03.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-07T00:39:41.000Z (almost 3 years ago)
- Last Synced: 2023-11-20T15:45:38.204Z (about 1 year ago)
- Language: R
- Homepage:
- Size: 137 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
# collapse = TRUE,
results = "asis",
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)library(ipa)
# remotes::install_github("GuangchuangYu/badger")
library(badger)
# remotes::install_github("coolbutuseless/phon")
library(phon)
```# ipa
`r badge_cran_release(color = "brightgreen")`
`r badge_lifecycle("maturing")`
`r badge_license(color = "blueviolet")`
`r badge_github_actions(action = "R-CMD-check")`
`r badge_codecov()`
`r badge_dependencies()`Convert character vectors between phonetic representations.
Supports [IPA](https://en.wikipedia.org/wiki/International_Phonetic_Alphabet), [X-SAMPA](https://en.wikipedia.org/wiki/X-SAMPA) and
[ARPABET](https://en.wikipedia.org/wiki/ARPABET) (used by the [CMU Pronouncing
Dictionary](https://en.wikipedia.org/wiki/CMU_Pronouncing_Dictionary)).## Installation
You can install the released version of **ipa** from [CRAN](https://cran.r-project.org/) with:
```{r eval = FALSE}
install.packages("ipa")
```Or the development version from GitHub with:
``` {r eval = FALSE}
install_github("rossellhayes/ipa")
```## Usage
My main use case for **ipa** is including phonetic representations in R markdown files.
You can enter phonetic information as plain-text X-SAMPA and have it rendered as IPA.```{r eval = FALSE}
`r sampa('/aI pi: "eI/')`
````r sampa('/aI pi: "eI/')`
```{r eval = FALSE}
`r sampa(c('/"nom.b4e/', '/nO~bR/'))`
````r sampa(c("/\"nom.b4e/", "/nO~bR/"))`
You can also get the X-SAMPA representation of IPA strings.
```{r eval = FALSE}
ipa("/aɪ piː ˈeɪ/")
````/aI pi: "eI/`
```{r eval = FALSE}
ipa(c("/ˈnom.bɾe/", "/nɔ̃bʁ/"))
````/nom.b4e/`, `/nO~bR/`
ARPABET support allows **ipa** to automatically convert results from the
[**phon**](https://github.com/coolbutuseless/phon) package.```{r eval = FALSE}
# remotes::install_github("coolbutuseless/phon")
arpa(phon::phonemes("pronounce"))
````r arpa(phon::phonemes("pronounce"))`
## Credits
Hex sticker fonts are
[Source Code Pro](https://github.com/adobe-fonts/source-code-pro) and
[Source Serif Pro](https://github.com/adobe-fonts/source-serif-pro) by
[Adobe](https://adobe.com).---
Please note that **ipa** is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/0/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.