文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > IT/计算机 > 互联网 > seek算法
侵权投诉

seek算法

变种出现,比如double metaphone算法和Metaphone 3算法。
Metaphone编码算法采用16个常数符号:0BFHJKLMNPRSTWXY。用'0'表示 "th" , 'X' 表示"sh" 或 "ch", 其他的符号用来表示他们各自在英语中的发音。元音AEIOU也被用来编码,但值在一个编码的开头使用。下面是这个编码的编码规则。
1. Drop duplicate adjacent letters, except for C.
2. If the word begins with 'KN', 'GN', 'PN', 'AE', 'WR', drop the first letter.
3. Drop 'B' if after 'M' and if it is at the end of the word.
4. 'C' transforms to 'X' if followed by 'IA' or 'H' (unless in latter case, it is part of '-SCH-', in which case it transforms to 'K'). 'C' transforms to 'S' if followed by 'I', 'E', or 'Y'. Otherwise, 'C' transforms to 'K'.
5. 'D' transforms to 'J' if followed by 'GE', 'GY', or 'GI'. Otherwise, 'D' transforms to 'T'.
6. Drop 'G' if followed by 'H' and 'H' is not at the end or before a vowel. Drop 'G' if followed by 'N' or 'NED' and is at the end.
7. 'G' transforms to 'J' if before 'I', 'E', or 'Y', and it is not in 'GG'. Otherwise, 'G' transforms to 'K'. Reduce 'GG' to 'G'.
8. Drop 'H' if after vowel and not before a vowel.
9. 'CK' transforms to 'K'.
10. 'PH' transforms to 'F'.
11. 'Q' transforms to 'K'.
12. 'S' transforms to 'X' if followed by 'H', 'IO', or 'IA'.
13. 'T' transforms to 'X' if followed by 'IA' or 'IO'. 'TH' transforms to '0'. Drop 'T' if followed by 'CH'.
14. 'V' transforms to 'F'.
15. 'WH' transforms to 'W' if at the beginning. Drop 'W' if not followed by a vowel.
16. 'X' transforms to 'S' if at the beginning. Otherwise, 'X' transforms to 'KS'.
17. Drop 'Y' if not followed by a vowel.
18. 'Z' transforms to 'S'.
19. Drop all vowels unless it is the beginning.
2. 算法实现

在sphinxmetaphone.cpp文件中的void stem_dmetaphone ( BYTE * pWord, bool bUTF8 )函数中实现。
因为算法比较简单,跟soundex类似,主要是规则的转化,所以不再一一说明。




三. MMSEG 中文分词算法

1. MMSeg算法原理

要理解mmseg算法,首先来理解一下chunk,它是MMSeg分词算法中一个关键的概念。Chunk中包含依据上下文分出的一组词和相关的属性,包括长度(Length)、平均长度(Average Length)、标准差的平方(Variance)和自由语素度(Degree Of Morphemic Freedom)。下面列出了这4个属性:
属性
含义
长度(Length)
chuck中各个词的长度之和
平均长度(Average Length)
长度(Length)/词数
标准差的平方(Variance)
同数学中的定义
自由语素度(Degree Of Morphemic Freedom)
各单字词词频的对数之和


Chunk中的4个属性只有在需要该属性的值时才进行计算,而且只计算一次。
其次来理解一下规则(Rule),它是MMSeg分词算法中的又一个关键的概念。实际上我们可以将规则理解为一个过滤器(Filter),过滤掉不符合要求

上一页第2页

你可能喜欢

热门文档

相关文档

  • 算法和并行编程

    并行的 dijkstra 算法复杂度为 O (N*(N/p+logp+N/p))=O (N*N/p+...#undef SEEK_SET #undef SEEK_END #undef SEEK_CUR #include <mpi.h> #include...

  • Sphinx_Coreseek使用手册

    Sphinx_Coreseek使用手册_IT/计算机_专业资料。全文搜索引擎sphinx的使用,文档中描述...提供了优秀的相关度算法, 基于短语相似度和统计 (BM25) 的复合 Ranking 方法...

  • 磁盘调度算法及模拟

    磁盘调度算法及模拟_IT/计算机_专业资料。计算机科学与工程学院实验 5-磁盘调度算法...("%5d",Seek[i]); k=-1; } // 2.当前磁道号在已排序的磁道序列的 ...

  • 最快的算法alpha blend

    可能是最快的算法alpha blend汇编源代码,Intel官方提供 Intel官方网站有一个abl...( file, tga.IDLength, SEEK_CUR ); DWORD m_dwWidth = tga.ImageWidth; ...

  • LRU算法 与CLOCK算法

    实验报告 课程名称 操作系统 实验项目名 ___LRU 算法模拟 班级与班级代码 实验...int seek(int seq[],int i,Pb a[],int k); int test1(int seq_i,int...

  • 信息隐藏算法

    ? 在常用的隐写软件中,有许多使用LSB替代方法,如Hide and Seek 等 均使用最低有效位算法,平均而言,LSB只需要改变图像一半左右的 像素,将秘密信息嵌于最低位和...

  • 蚁群算法的基本原理

    2.1 蚁群算法的基本原理 蚁群优化算法是模拟蚂蚁觅食的原理,设计出的一种群集...seek (sought, sought) 寻求 9. shake (shook, shaken) 发抖 10. sing (...

  • 实用最优化算法及其应用--ChapterIV-2012

    实用最优化算法及其应用... 1页 1下载券实用最优化算...Seek a value λ≥ 0 such that p(λ) = ?. This problem is a one-...

  • C语言常用算法程序汇总

    C语言常用算法程序汇总_IT认证_资格考试/认证_教育专区。C等级考试辅助材料C...int seek(int a[],int n, int x) { int p=0; while(x!=a[p]&&p...

  • 图像旋转算法与实现

    图像旋转算法与实现_IT/计算机_专业资料。图像旋转算法与实现? 好吧,先下个定义...(pFile,0,SEEKSET); fread(&bmfHeader,sizeof(BITMAPFILEHEADER),1,pFile);...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email