Convert text to IPA for English and French
Project description
Installation:
Windows
python -m pip install text2ipa
macOS
sudo pip3 install text2ipa
Linux
pip install text2ipa
Features
- Two options Language English and French
Examples
Example 1: Convert a text
Function:
get_IPA()
: Converting a text to IPA with the following parameters
Parameters:
text
: The text you want to convert to IPAlanguage
: Choose between English US, English UK and French ('en' or 'fr')
For instance:
from text2ipa import get_IPA
# Convert 'hello world' to English US International Alphabet
text = 'hello world'
language = 'en'
ipa = get_IPA(text, language)
# Convert 'je parle un peu français' to IPA
text = 'je parle un peu français'
language = 'fr'
fr_ipa = get_IPA(text, language)
print(ipa)
print(fr_ipa)
>> hɛˈloʊ wərld
>> ʒə paʀlɛ yn pəy fʀɑ̃sɛ
Example 2: Convert a bulk
Function:
get_IPAs()
: Convert the list of texts to IPA return the list of IPAs
Parameters:
bulk
: The list of text want to convert to IPAlanguage
: Choose between English US and English UK ('en' or 'fr')
For instance:
from text2ipa import get_IPAs
bulk = ['how are you?','how it\'s going?','that\'s good']
language = 'br'
# Convert a list of text to English UK IPA
IPAs = get_IPAs(bulk,language)
for ipa in IPAs:
print(ipa)
>> haʊ ɑː juː?
>> haʊ ɪts ˈgəʊɪŋ?
>> ðæts gʊd
Log Changes
V1.0.0 : Create new with 2 functions get_IPA()
and get_IPAs()
V1.2.0 : Update comment and guideline in functions, fixed ERROR for setup with the other Python versions
V1.3.0 : Fixed MISSING install requires and update information for Python versions
V1.4.0 : Update building & testing for this package
V1.4.1 : Fixed Error Import get_IPA()
and get_IPAs
V2.0.1 : New feature working with French
V2.0.2 : Update dependencies
V2.1.2 : Fixing for some issues, remove English US
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
Built Distribution
File details
Details for the file text2ipa-2.1.2.tar.gz
.
File metadata
- Download URL: text2ipa-2.1.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.7.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 861b328a3e9f628c4765127750a565b5ee6ed367e7327230c35bd8d82d3b882f |
|
MD5 | dc0b273e002337fd1c3c271f49f77bca |
|
BLAKE2b-256 | 7f6da37f4d168e32fffd95e162819f530efd239d7b4025acd490e4f452b1af55 |
File details
Details for the file text2ipa-2.1.2-py3-none-any.whl
.
File metadata
- Download URL: text2ipa-2.1.2-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.7.9 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee04ff3570c6efb59a51ba50786302fcbe8e6a33d8c0d47a4899594bfd7d7f8c |
|
MD5 | b192f81359d74c767023cd8b47d4e655 |
|
BLAKE2b-256 | a9b7b0da69920b7dd716a692c60b5b986aa4d1b945db84c818dd4c17b1e23e58 |