Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python interpreter #5

Open
martino-vic opened this issue Aug 15, 2021 · 1 comment
Open

python interpreter #5

martino-vic opened this issue Aug 15, 2021 · 1 comment

Comments

@martino-vic
Copy link

Hello, I'm trying to use gruut-ipa 0.10.0 on Windows 10 and Python 3.9.
I need to group phones into phonemes for English:

$ python3 -m gruut_ipa phonemes en-us "/dʒʌst ə kaʊ/"
d͡ʒ ʌ s t ə k aʊ

How would this look in the python interpreter? I've tried

>>> import gruut_ipa
>>> help(gruut_ipa.Phonemes)

But I couldn't find an answer there.

@valericus
Copy link

This approach works for me.

>>> from gruut_ipa import Pronunciation
>>> Pronunciation.from_string('/dʒʌst ə kaʊ/').phones
[d, ʒ, ʌ, s, t, ə, k, a, ʊ]

It should be noted, that phones property contains not list of strings, but list of gruut_ipa.Phone instances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants