Convert Phonetic Alphabets
Python package for converting phonetic or phonemic transcriptions from Nofabet to IPA and X-SAMPA, and from X-SAMPA to IPA (original code from https://github.com/peresolb/sampa_to_ipa).
Installation
pip install convert-pa
Usage
from convert_pa import nofabet_to_ipa, nofabet_to_sampa, sampa_to_ipa, nofabet_to_syllables
# Convert from Nofabet
nofabet_transcription = "B IH2 L IH0 H EE0 T S AEH0 R S T AH3 T N IH0 NG G AX0 N S"
# to IPA
print(nofabet_to_ipa(nofabet_transcription))
# '"bɪ.lɪ.heːt.sær.ˌstɑt.nɪŋ.gəns'
# to X-SAMPA
print(nofabet_to_sampa(nofabet_transcription))
# '""bI$lI$he:t$s{r$%stAt$nIN$g@ns'
# Convert from X-SAMPA to IPA
sampa_transcription = '""On$d@$%lE*u0s'
print(sampa_to_ipa(sampa_transcription))
# "ɔn.də.ˌlæ͡ʉs
# Divide a nofabet transcription into syllables (list of lists of phonemes)
# Word: "Billigsalg"
nofabet_to_syllables("B IH2 L IH0 S AH1 L G ")
# [['B', 'IH2'], ['L', 'IH0'], ['S', 'AH1', 'L', 'G', '']]
Metadata
Release files for convert-pa 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| convert_pa-1.0.0.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| convert_pa-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.0 kB
Release files / convert_pa-1.0.0.tar.gz
| Download URL | convert_pa-1.0.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2458e85306fa08cc262b7fcd60d344a852c7cd40dc0d37268205490e34fe1c28
|
|
BLAKE2b-256 checksum How to use checksums |
70a9c05dde9aa5778da162beb1590bc21417cfebc5e32c115ae1a300441e1976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.25.9 CPython/3.12.3 Linux/6.14.0-33-generic
|
Release files / convert_pa-1.0.0-py3-none-any.whl
| Download URL | convert_pa-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cea6a3698062a80a11d1824bd210925ae1de3afb45164a59ee42f47dadc66e30
|
|
BLAKE2b-256 checksum How to use checksums |
5c45db146b9447b2250c8e26b77abbdb6b1b27b6b4dd92e75f4fb250f6ca8d2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
pdm/2.25.9 CPython/3.12.3 Linux/6.14.0-33-generic
|