1.0.14 • Published 1 year ago

tipa v1.0.14

Weekly downloads
2
License
ISC
Repository
github
Last release
1 year ago

tipa

version

tipa is a TypeScript package supporting parsing of linguistic input in Unicode, HTML Entity, and Branner (1994) formats. It contains extensive features from Hayes (2009) and Riggle (2012), allowing you to transform sounds reliably.

const tipa = require("tipa")

tipa.get("t") === tipa.devoice(tipa.get("d")) // true

const word = tipa.parse("liŋˈɡwɪ.stɪks")

const nucleus = word[0].nucleus[0].name // high front tense unrounded vowel

Installation

For Yarn:

$ yarn add tipa

For NPM:

$ npm install tipa

Functions

NameType SignatureExample
parsestring => wordparse("liŋˈɡwɪ.stɪks")
getstring => ipa_symbolget("low back rounded vowel")
tokenizestring => ipa_symbol[]tokenize(".ʕe.es.a.án.")
collapseipa_symbol[] => ipa_segment[]collapse(tokenize("kætz̥"))
syllabifyipa_segment[] => wordsyllabify(collapse(tokenize("lu.nə")))
devoicephone => phonedevoice(get("g"))

Types

TypeMeaning
ipa_symbolBase type which includes ipa_diacritic, ipa_suprasegmental, and ipa_letter.
ipa_diacriticSub-type of ipa_symbol. Used to modify an ipa_letter in some way. Includes tone diacritics (1 - 5), secondary articulation, and length diacritics (long, half long, and extra short).
ipa_suprasegmentalSub-type of ipa_symbol. Used to create syllable boundaries and/or provide syllable-level information such as primary or secondary stress.
ipa_letterSub-type of ipa_symbol. Can either be a vowel or consonant. Has a feature matrix defined by Hayes (2009).
phoneA single, standalone sound. Can be an ipa_letter (e.g. [p]) or an ipa_letter followed by diacritics (e.g. [v̥̄]).
ipa_segmentThe building block of syllables. Can be a phone or a suprasegmental.
syllableA group of ipa_segments and the building block of words. Has an onset, nucleus, and coda, as well as a list of all constituent segments.
wordA group of syllables and the end result of parsing.

Testing

To run tests on the library, first clone the repository:

$ git clone https://github.com/dustinnewman/tipa.git
$ cd tipa

Then install the dev dependencies:

$ yarn # for NPM, run: npm install

Now you're ready to run the tests!

$ yarn test # NPM: npm run test
1.0.14

1 year ago

1.0.13

3 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago