-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
59 lines (43 loc) · 1.56 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
output:
github_document:
html_preview: false
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# phonetisr: A Very Naive IPA Tokeniser
<!-- badges: start -->
`r badger::badge_github_version(pkg = "phonetisr", "blue")`
`r badger::badge_devel(pkg = "phonetisr", color = "orange")`
[![](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
<!-- badges: end -->
This package is a (very 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
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("remotes")
remotes::install_github("stefanocoretta/[email protected]")
```
## 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.