计算机科学

首页 > 计算机科学

Metaphone

2018-09-06 14:19:08     所属分类:语音算法

Metaphone是一个语音算法,主要是用在英语单字或是辞汇发音的标引。Metaphone是由飞利浦、罗伦斯利用Soundex的缺陷来改善的算法。此算法是利用较大的英语发音规则,所以比Soundex更为精准。Metaphone也可作为内建式的工具,在PHP就有相关工具。后来原作者制作新版本的算法“Double metaphone”,比原本的算法还更加精准。该算法会转换相似的发音。

转换规则

  B ----> B      unless at the end of word after "m", as in "dumb", "McComb"
  C ----> X      (sh) if "-cia-" or "-ch-"
          S      if "-ci-", "-ce-", or "-cy-"
                 SILENT if "-sci-", "-sce-", or "-scy-"
          K      otherwise, including in "-sch-"
  D ----> J      if in "-dge-", "-dgy-", or "-dgi-"
          T      otherwise
  F ----> F
  G ---->        SILENT if in "-gh-" and not at end or before a vowel
                           in "-gn" or "-gned"
                           in "-dge-" etc., as in above rule
          J      if before "i", or "e", or "y" if not double "gg"
          K      otherwise
  H ---->        SILENT if after vowel and no vowel follows
                        or after "-ch-", "-sh-", "-ph-", "-th-", "-gh-"
          H      otherwise
  J ----> J
  K ---->        SILENT if after "c"
          K      otherwise
  L ----> L
  M ----> M
  N ----> N
  P ----> F      if before "h"
          P      otherwise
  Q ----> K
  R ----> R
  S ----> X      (sh) if before "h" or in "-sio-" or "-sia-"
          S      otherwise
  T ----> X      (sh) if "-tia-" or "-tio-"
          0      (th) if before "h"
                 silent if in "-tch-"
          T      otherwise
  V ----> F
  W ---->        SILENT if not followed by a vowel
          W      if followed by a vowel
  X ----> KS
  Y ---->        SILENT if not followed by a vowel
          Y      if followed by a vowel
  Z ----> S

资料来源

  • http://aspell.net/metaphone/metaphone-kuhn.txt

外部链接

  • Open Source Spell Checker
  • Another explanation of the algorithm
  • Project to write a formal definition of the algorithm
版权声明:本文由北城百科网创作,转载请联系管理获取授权,未经容许转载必究。https://www.beichengjiu.com/computerscience/340716.html

显示全文

取消

感谢您的支持,我会继续努力的!

扫码支持
支付宝扫一扫赏金或者微信支付5毛钱,阅读全文

打开微信扫一扫,即可进行阅读全文哦


相关推荐