No project description provided
Project description
English IPA
a python package for getting the IPA of an given English word
Usage
from english_ipa.cambridge import CambridgeDictScraper
scraper = CambridgeDictScraper()
ipa_in_dict = scraper.get_ipa_in_dict("hello")
# returned value
# {'word': 'hello', 'ipas': [{'region': 'uk', 'ipas': ['/heˈləʊ/']}, {'region': 'us', 'ipas': ['/heˈloʊ/']}]}
ipa_in_json = scraper.get_ipa_in_json("hello")
# returned value
# {"word":"hello","ipas":[{"region":"uk","ipas":["/heˈləʊ/"]},{"region":"us","ipas":["/heˈloʊ/"]}]}
ipa_in_str = scraper.get_ipa_in_str("hello")
# returned value
# uk: ['/heˈləʊ/']; us: ['/heˈloʊ/']
Async Version
import asyncio
from english_ipa.cambridge_async import AsyncCambridgeDictScraper
async def main():
scraper = AsyncCambridgeDictScraper()
ipa_in_dict = await scraper.get_ipa_in_dict("apple")
print(ipa_in_dict)
asyncio.run(main())
# printed value
# {'word': 'apple', 'ipas': [{'region': 'uk', 'ipas': ['/ˈæp.əl/']}, {'region': 'us', 'ipas': ['/ˈæp.əl/']}]}
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
english_ipa-0.3.0.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file english_ipa-0.3.0.tar.gz
.
File metadata
- Download URL: english_ipa-0.3.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb10af98d15480e36acc6a1dccfda9f133f36a3315d9fb2e05d27a186dfddd3c |
|
MD5 | 5536c7d7eb06245b02924161738ff988 |
|
BLAKE2b-256 | 14099fffdd473b20588071773978008d35e0978e804ab8b3c8d6ffa4e3f0f380 |
File details
Details for the file english_ipa-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: english_ipa-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18732f8ad175ccf37e55214cd954fa0c000a9366c8635091f71e19bfa9531b76 |
|
MD5 | e612e97a2646bc2d0749bbcde8a8d200 |
|
BLAKE2b-256 | 55ce88c4f49aa753f2733e105b1b91fad6c2f4fc4b1dc573846af4123159fc19 |