An open API service indexing awesome lists of open source software.

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

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.