ASJP conversion and tokenisation utils
Project description
A small library of three functions. ipa2asjp takes an IPA-encoded string and converts it into an ASJP-encoded one. asjp2ipa tries to do the opposite. tokenise takes an ASJP-encoded string and returns a list of tokens.
>>> from asjp import ipa2asjp, asjp2ipa, tokenise >>> ipa2asjp('lit͡sɛ') 'ly~icE' >>> tokenise(ipa2asjp('lit͡sɛ')) ['ly~', 'i', 'c', 'E'] >>> [ipa2asjp(t) for t in ['l', '', 't͡s', 'ɛ']] == tokenise(ipa2asjp('lit͡sɛ')) True >>> asjp2ipa(ipa2asjp('lit͡sɛ')) == lit͡sɛ True
licence
MIT. Do as you please and praise the snake gods.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
asjp-0.0.0.tar.gz
(1.6 kB
view hashes)
Built Distribution
asjp-0.0.0-py3-none-any.whl
(3.1 kB
view hashes)