Using Python, how could I check for the pronunciation of certain consonants?
For example, say I had the words 'gate' & 'gestation. How would I check if the 'g' is a soft 'g' or a hard 'g'?
I assume that I'd have to have access to some kind of dictionary database that has a pronunciation column, but I'm wondering if there's any other solutions.
>>59463239
context. like the 'hardness' in the r in the word nigger
>>59463239
Looks like it's time to learn linguistics
Oh, and it doesn't necessarily have to be Python (it's the language i'm learning right now), I just want to know how you'd go about this problem in general.
>>59463265
Yeah, been wanting to dive into the subject. Good time to do it.
>>59463239
I'd just query the wiktionary API, get the data and look for the phonology of the word, written in the International Phonetic Alphabet (/ˈfæɡət/). Then use this as a basis for the analysis.
With a language like English it's nearly impossible outside of having a dictionary lookup. There are rules (g generally only sounds like [dʒ] before i or e for example) but they are just as often broken.
With a language that has a very strong mapping from spelling to pronunciation like Polish you would have better luck.
>>59463239
https://en.wikipedia.org/wiki/English_orthography#Spelling_patterns
Good luck.
>>59463283
DEEP LEARNING.
http://www.nltk.org/
Is this some hidden, obscure gif vs gif thread?
>>59464098
Seems easy enough to implement, thanks.
>>59463239
What is this for?
>>59465417
I'm trying to be build a dictionary of phonetic mnemonics where I can assign words to numbers in order to remember them easier. Each number 0-9 is associated with a particular consonant.
So, rather than trying to come up with a suitable word on the spot, I'm building of a database of numbers with a word(s) assigned to them so I can look them up whenever I need to remember a certain number.
>>59465733
Oh, and letters such as 'g' and 'c' can be used as distinct consonants depending on how they're pronounced, so I need a module that can distinguish that in order to build this database properly.
>>59463239
You are delving into the realm of AI hardmode.
Good luck.
>>59465820
So you mean each phoneme is associated with a distinct digit.