https://github.com/stefanocoretta/phonetisr
A Very Naive IPA Tokeniser
https://github.com/stefanocoretta/phonetisr
r-package rstats software
Last synced: 8 months ago
JSON representation
A Very Naive IPA Tokeniser
- Host: GitHub
- URL: https://github.com/stefanocoretta/phonetisr
- Owner: stefanocoretta
- License: other
- Created: 2021-01-30T09:38:31.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-03-07T09:54:41.000Z (over 1 year ago)
- Last Synced: 2025-10-22T05:02:59.463Z (8 months ago)
- Topics: r-package, rstats, software
- Language: R
- Homepage: https://stefanocoretta.github.io/phonetisr/
- Size: 1.63 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
- Changelog: NEWS.md
- License: LICENSE
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# phonetisr: A Naive IPA Tokeniser
`r badger::badge_doi(doi = "10.5281/zenodo.14987854", color = "blue")`
`r badger::badge_cran_release("phonetisr", "blue")`
`r badger::badge_cran_checks("phonetisr")`
`r badger::badge_devel(color = "orange")`
This package is a (naive) tokeniser of phonetic transcriptions in the [International Phonetic Alphabet](https://www.internationalphoneticassociation.org/content/ipa-chart) (IPA).
With phonetisr, you can parse texts and word lists transcribed in IPA and tokenise them into phones so that you can perform quantitative analyses.
## Installation
Phonetisr is on CRAN so you can install it with `install.packages("phonetisr")`.
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("stefanocoretta/phonetisr@devel")
```
## Usage
```{r}
library(phonetisr)
# IPA strings to be tokenised
ipa <- c("pʰãkʰ", "tʰum̥", "ɛkʰɯ")
# List of character sequences to be considered single phones
ph <- c("pʰ", "tʰ", "kʰ", "ã", "m̥")
# Tokenise strings
phonetise(ipa, multi = ph)
```
## Roadmap
- [x] Scan for illegal (non-IPA) characters.
- [x] Provide a list of default multi-character phones.
- [ ] Functions for data import/export.
- [ ] Ignore diacritics.