Homophone generator
Is there an algorithm for generating homophones?
Input "cypress", output = { cipress, cipres, cypres, sipress, sypress }
Soundex is the reverse of this - mapping homophones to the same value. If you indexed every word in a dictionary by its Soundex value, then you could do a lookup to find all homophones of a given word.
There is a (and I quote..) Homophoner ( stiffled giggle ) here: http://homophoner.yacomink.com/
It seems to be using YUI
I made one. Source code here: https://github.com/evanshort73/homophone
Try it out in your browser at http://evanshort.name/homophone/
Basic idea: Download the CMU Pronouncing Dictionary, and create a file of allowed phoneme substitutions and their costs. Do a depth first search of every possible substitution, backtracking when the partial result is not the beginning of any dictionary word.
链接地址: http://www.djcxy.com/p/48748.html上一篇: 使用C#HttpWebRequest或WebClient发送HTTP请求?
下一篇: 同音发生器