Skip to main content

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

# 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

Project details


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-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

convert_pa-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file convert_pa-0.1.0.tar.gz.

File metadata

  • Download URL: convert_pa-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.14.0-1048-oem

File hashes

Hashes for convert_pa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1c2d67638ca331c2e2e87e5b7e31932a36bfe50398a324eb2e72bbf1d19a136
MD5 4d923f1e295f695f420ef346a4c3c4ad
BLAKE2b-256 7f976ac885b2bcc4a13b3e2515de3e1546daede502067e59578a24a2be58683b

See more details on using hashes here.

File details

Details for the file convert_pa-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: convert_pa-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.14.0-1048-oem

File hashes

Hashes for convert_pa-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5640540f8b6ffd5a0faaadf2dee74f51eb7110a27deae2c949ceb974826cd301
MD5 ce0b27e44a194745fd4e86a7a44b4d8c
BLAKE2b-256 98d184317d957588dedeb247fbfc1c94e025acf23e0bca3490454d1e1c341146

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page