to implement a linguistic application that uses a pronunciation dictionary for finding words with similar pronunciation.
Description
In this project, you are going to implement a linguistic application that uses a pronunciation dictionary for finding words with similar pronunciation.
Background
What is a Phoneme?
In linguistics, a Phoneme is a perceptually distinct unit of sound that distinguishes one word from another, for example, p, b, d, and t in the English words “pad”, “pat”, “bad”, and “bat”.
Each line of the dictionary file contains a word followed by the list of its Phonemes.
Vowels have the potential for 3 different stresses. Thus, vowel Phonemes will end with an additional digit, 0, 1, or 2 indicating no-stress, primary-stress, or secondary-stress.
CMU Pronouncing Dictionary Excerpt
PROGRAMME P R OW1 G R AE2 M
PROGRAMMER P R OW1 G R AE2 M ER0
PROGRAMMERS P R OW1 G R AE2 M ER0 Z
PROGRAMS P R OW1 G R AE2 M Z
PROGRAMS' P R OW1 G R AE2 M Z
PROGRESS P R AA1 G R EH2 S
PROGRESS(1) P R AH0 G R EH1 S
PROGRESS(2) P R OW0 G R EH1 S
PROGRESSED P R AH0 G R EH1 S T
PROGRESSES P R AA1 G R EH2 S AH0 Z
PUSH-UP P UH1 SH AH2 P
PUSH-UPS P UH1 SH AH2 P S
Create Word class
Word should define a method named
getPronunciation()
returns a list of strings representative of the Phonemes of this word. Indices of the respective list should be indicative of their order of annunciation.
getSimilarWords()
return a list of all similar sounding-words
getIdentical()
return a list of phonetically identical words
getSimilarWordsWithSubPhonemes()
return a list of words which contain sub-Phonemes
getSimilarWordsWithPhonemes()
return a list of near-phonetically-identical words with additional Phonemes added
getSpelling()
returns the string value input upon construction.
toString()
return a neatly-formatted report of similar-sounding words.
Part 1
Word should define a method named getPronunciation()
returns a list of strings representative of the Phonemes of this word. Indices of the respective list should be indicative of their order of annunciation.