gpt4 book ai didi

spell-checking - Metaphone 3 算法是什么?

转载 作者:行者123 更新时间:2023-12-04 09:05:31 27 4
gpt4 key购买 nike

我想自己编写 Metaphone 3 算法。有说明吗?我知道源代码可以出售,但这不是我要找的。

最佳答案

@Bo 的链接现在是指(现在是 deucnt)项目的整个源代码。
因此这里是新的链接,直接链接到 Metaphone 3 的源代码
https://searchcode.com/codesearch/view/2366000/
劳伦斯·飞利浦

Metaphone 3 is designed to return an approximate phonetic key(and an alternate * approximate phonetic key when appropriate) thatshould be the same for English * words, and most names familiar inthe United States, that are pronounced similarly. * The key valueis not intended to be an exact phonetic, or even phonemic, *representation of the word. This is because a certain degree of'fuzziness' has * proven to be useful in compensating for variationsin pronunciation, as well as * misheard pronunciations. For example,although americans are not usually aware of it, * the letter 's' isnormally pronounced 'z' at the end of words such as "sounds".

The 'approximate' aspect of the encoding is implemented according to the following rules:

* * (1) All vowels areencoded to the same value - 'A'. If the parameter encodeVowels * isset to false, only initial vowels will be encoded at all. IfencodeVowels is set * to true, 'A' will be encoded at all places inthe word that any vowels are normally * pronounced. 'W' as well as'Y' are treated as vowels. Although there are differences in * thepronunciation of 'W' and 'Y' in different circumstances that lead totheir being * classified as vowels under some circumstances and asconsonants in others, for the purposes * of the 'fuzziness' componentof the Soundex and Metaphone family of algorithms they will * bealways be treated here as vowels.

* * (2) Voiced andun-voiced consonant pairs are mapped to the same encoded value. Thismeans that:
* 'D' and 'T' -> 'T'
* 'B' and 'P' -> 'P'
* 'G' and 'K' -> 'K'
* 'Z' and 'S' -> 'S'
* 'V' and 'F' -> 'F'

* * - In addition to the above voiced/unvoiced rules,'CH' and 'SH' -> 'X', where 'X' * represents the "-SH-" and "-CH-"sounds in Metaphone 3 encoding.

关于spell-checking - Metaphone 3 算法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10442633/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com