mickn66 Posted July 12, 2004 Posted July 12, 2004 I'm in the process of creating a special kind of rhyming dictionary. Basically the idea is I have a database with 1 table with 2 fields. The fields are the word itself, and a string describing the pronunciation (typically something like "b-uh-d-ee"). What I want the program to be able to do is allow the user to search for words with certain pronunciation patterns, such as having 3 syllables with the accent on the second syllable, which must sound like "ow", or a two syllable word that rhyms with "baker" but has the accent on the second syllable. The question is, what is the most efficient way of storing the dictionary in memory. I could store all the words/pronunciation pairs in a huge array, and then search through each one for a pronunciation that matches the wanted pattern. I see there are things such as a dictionary object, and a hashtable collection (if I have that right) but I don't know which would be the best thing to use. Or maybe there's some completely better way. Any suggestions about how to ensure that the searches are as fast as possible would be very much appreciated! If I haven't made clear what I am looking for please let me know and I'll give more details. Thanks! Mick Quote
pelikan Posted July 12, 2004 Posted July 12, 2004 save yourself a few years effort (life is short) http://www.speech.cs.cmu.edu/cgi-bin/cmudict Quote IN PARVUM MULTUM
mickn66 Posted July 12, 2004 Author Posted July 12, 2004 save yourself a few years effort (life is short) http://www.speech.cs.cmu.edu/cgi-bin/cmudict Thank you, but that site, although it seems to have the necessary information, doesn't actually let you search for certain pronunciations - it just gives you the pronunciation of a word you type in. I didn't download it though, so maybe the offline thing does what I'm looking for. Either way, I'm still interested in doing it myself, so if you have any thoughts... :) Mick Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.