Package to convert between transcription standards
Project description
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', '']]
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
convert_pa-1.0.0.tar.gz
(7.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file convert_pa-1.0.0.tar.gz.
File metadata
- Download URL: convert_pa-1.0.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.9 CPython/3.12.3 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2458e85306fa08cc262b7fcd60d344a852c7cd40dc0d37268205490e34fe1c28
|
|
| MD5 |
8036e576a9f0d84ab70a7bfe72e097a3
|
|
| BLAKE2b-256 |
70a9c05dde9aa5778da162beb1590bc21417cfebc5e32c115ae1a300441e1976
|
File details
Details for the file convert_pa-1.0.0-py3-none-any.whl.
File metadata
- Download URL: convert_pa-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.9 CPython/3.12.3 Linux/6.14.0-33-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cea6a3698062a80a11d1824bd210925ae1de3afb45164a59ee42f47dadc66e30
|
|
| MD5 |
b2da885e4011122eaf17da6dd0272040
|
|
| BLAKE2b-256 |
5c45db146b9447b2250c8e26b77abbdb6b1b27b6b4dd92e75f4fb250f6ca8d2f
|