共查询到20条相似文献,搜索用时 15 毫秒
1.
一种串匹配的快速Boyer-Moore算法 总被引:5,自引:0,他引:5
在对经典的Boyer-Moore和Quick Search串匹配算法进行分析的基础上,提出了一种更加快速的串匹配算法Quick Boyer-Moore(QBM)。QBM算法利用当前尝试中的已匹配子串、匹配失败字符信息以及与当前窗口下一个字符的位置信息,以在每一次跳跃中获得更大的跳跃距离,从而使算法具有更高的效率。在真实语料上的实验结果表明,QBM算法的效率较显著地高于原始的BM算法及其改进算法Impmved Boyer-Moore(IBM)。 相似文献
2.
3.
4.
Faster Approximate String Matching 总被引:11,自引:0,他引:11
We present a new algorithm for on-line approximate string matching. The algorithm is based on the simulation of a nondeterministic
finite automaton built from the pattern and using the text as input. This simulation uses bit operations on a RAM machine
with word length w =
Ω
(log n) bits, where n is the text size. This is essentially similar to the model used in Wu and Manber's work, although we improve the search
time by packing the automaton states differently. The running time achieved is O(n) for small patterns (i.e., whenever mk = O(log n)) , where m is the pattern length and k<m is the number of allowed errors. This is in contrast with the result of Wu and Manber, which is O(kn) for m=O(log n) . Longer patterns can be processed by partitioning the automaton into many machine words, at O(mk/w n) search cost. We allow generalizations in the pattern, such as classes of characters, gaps, and others, at essentially the
same search cost.
We then explore other novel techniques to cope with longer patterns. We show how to partition the pattern into short subpatterns
which can be searched with less errors using the simple automaton, to obtain an average cost close to . Moreover, we allow the superimposition of many subpatterns in a single automaton, obtaining near average complexity (σ is the alphabet size).
We perform a complete analysis of all the techniques and show how to combine them in an optimal form, also obtaining new
tighter bounds for the probability of an approximate occurrence in random text. Finally, we show experimental results comparing
our algorithms against previous work. These experiments show that our algorithms are among the fastest for typical text searching,
being the fastest in some cases. Although we aim mainly at text searching, we believe that our ideas can be successfully applied
to other areas such as computational biology.
Received November 22, 1996; revised October 13 and December 5, 1997. 相似文献
5.
快速中文字符串模糊匹配算法 总被引:9,自引:3,他引:9
本文解决了中文字符串模糊匹配的两个主要问题:空间问题和时间问题。目前字符串模糊匹配的两个主要方法是位向量方法和过滤方法。由于汉字众多,应用位向量方法时,需要大量空间。对于某些内存很少的小型计算机,比如嵌入式系统,这将会是一个问题。本文改进了位向量方法,使其在应用于中文字符串时,空间需求降低到约5%。本文还利用汉字非常多的特点,提出一种新的基于过滤方法的中文字符串模糊匹配算法,BPM-BM,其速度比世界上最快的算法至少提高14%;在大部分情况下,是其速度的1.5~2倍。 相似文献
6.
7.
We give a randomized algorithm in deterministic time O(Nlog M) for estimating the score vector of matches between a text string of length N and a pattern string of length M , i.e., the vector obtained when the pattern is slid along the text, and the number of matches is counted for each position.
A direct application is approximate string matching. The randomized algorithm uses convolution to find an estimator of the
scores; the variance of the estimator is particularly small for scores that are close to M , i.e., for approximate occurrences of the pattern in the text. No assumption is made about the probabilistic characteristics
of the input, or about the size of the alphabet. The solution extends to string matching with classes, class complements,
``never match' and ``always match' symbols, to the weighted case and to higher dimensions.
Received July 20, 1997; revised April 20, 1998, and June 1, 1999. 相似文献
8.
We study the classical approximate string matching problem, that is, given strings P and Q and an error threshold k, find all ending positions of substrings of Q whose edit distance to P is at most k. Let P and Q have lengths m and n, respectively. On a standard unit-cost word RAM with word size w≥log n we present an algorithm using time
O(nk ·min(\fraclog2 mlogn,\fraclog2 mlogww) + n)O\biggl(nk \cdot \min\biggl(\frac{\log^2 m}{\log n},\frac{\log^2 m\log w}{w}\biggr) + n\biggr) 相似文献
9.
10.
11.
如何在大型文本库中快速找出给定串的近似串是大数据时代要解决的关键问题。基于多种子的近似串匹配算法因匹配速度快而得到众多学者的青睐,但巨大的索引空间消耗也使其难以处理大型文本库。提出了一种支持多种子的q-gram索引结构,通过该索引能够快速地计算出给定任意长度连续种子的地址集合,解决了多种子近似串匹配算法中种子的数目和长度受存储空间限制的问题。实验数据显示,新索引方案成倍地减少了存储空间的消耗。实验结果表明,提出的索引方案在大数据环境下的多种子近似匹配中具有一定的优势。 相似文献
12.
Experimental comparisons of the running time of approximate string matching algorithms for the k differences problem are presented. Given a pattern string, a text string, and an integer k, the task is to find all approximate occurrences of the pattern in the text with at most k differences (insertions, deletions, changes). We consider seven algorithms based on different approaches including dynamic programming, Boyer–Moore string matching, suffix automata, and the distribution of characters. It turns out that none of the algorithms is the best for all values of the problem parameters, and the speed differences between the methods can be considerable. 相似文献
13.
改进的中文近似字符串匹配算法 总被引:1,自引:0,他引:1
范立新 《计算机工程与应用》2006,42(34):172-174,207
BPM-BM算法在针对汉字等大字符集的近似字符串匹配时取得了很好的实际效果,但该算法在最差情况下的总体时间复杂度为O(!+nm)。而提出的IBPM-BM算法由于具有记忆的能力,保证了过滤阶段的无回溯,可以在理论上保证最差情况下的总体时间复杂度为O(!+n),而在最佳情况下的时间复杂度与BPM-BM算法一致。 相似文献
14.
近似串匹配是生物信息学、文本检索、信号处理等领域的一个基础问题,如何提高近似串匹配的速度一直都是研究的关键问题。提出一种新的在大文本库中快速查找近似匹配的无损过滤算法。为保证在大文本库中的匹配速度,本算法使用了查询速度较快的q-gram索引。为通过提高过滤算法的过滤效率达到提升算法整体性能的目的,详细分析了含有匹配串的文本区域,提取了一些基于尾匹配q-gram特征的新过滤条件,然后用这些特征优化了过滤算法的过滤标准。实验数据表明,新过滤条件有效地提高了算法的过滤效率,提升了算法的整体性能。结果显示新算法适合各种匹配错误率下的近似匹配,算法的通用性较强。 相似文献
15.
一种有效的字符串有序跳跃模式近似匹配算法 总被引:1,自引:0,他引:1
字符串的模式匹配问题是计算机科学的基本问题之一,而近似模式匹配更是近期的研究热点。本文分析了文本分析领域中出现的一种特殊的近似模式匹配问题,即字符串有序跳跃模式近似匹配问题,提出了一种基于有限自动机的组件组合分析算法。算法的特点在于将组件匹配过程与组配过程进行分离,这样既降低了问题的复杂度,又可以实现按策略组配的灵活性。组件匹配过程中利用有限自动机对跳跃模式的组件进行匹配查找;组件的组配过程中先对查找到的组件进行组合分析,然后再对各种组合进行初步筛选和基于策略的优选。初步筛选工作是依据顺序性、唯一性和最大数三条原则进行;而优选工作是根据四个设计的评价参数选择其中最佳组合。实验结果表明,该算法的确能解决字符串有序跳跃模式匹配问题,完全可以适用于句型匹配与主题词跳词匹配。 相似文献
16.
字符串匹配是计算机科学中最经典、研究最广泛的问题之一,并且已经被应用到了众多领域当中。近似字符串匹配问题的研究虽然经历了不短的时间历程,但是其中的研究对象绝大多数主要是针对DNA等小型字符集或针对英文等中等大小字符集,而对于汉字乃至亚洲语音等大型字符集的研究却仍然不多。因此,研究高效的近似字符串匹配算法具有重要的理论价值和实际意义。 相似文献
17.
18.
PRAM和LARPBS模型上的近似串匹配并行算法 总被引:15,自引:1,他引:15
近似串匹配技术在网络信息搜索、数字图书馆、模式识别、文本挖掘、IP路由查找、网络入侵检测、生物信息学、音乐研究计算等领域具有广泛的应用.基于CREW-PRAM(parallel random access machine with concurrent read and exclusive write)模型,采用波前式并行推进的方法直接计算编辑距离矩阵D,设计了一个允许k-差别的近似串匹配动态规划并行算法,该算法使用(m+1)个处理器,时间复杂度为O(n),算法理论上达到线性加速;采取水平和斜向双并行计算编辑距离矩阵D的方法,设计了一个使用((m+1)个处理器和O(n/(+m)时间的、可伸缩的、允许k-差别的近似串匹配动态规划并行算法,.基于分治策略,通过灵活拆分总线和合并子总线动态重构光总线系统,并充分利用光总线的消息播送技术和并行计算前缀和的方法,实现了汉明距离的并行计算,设计了两个基于LARPBS(linear arrays with reconfigurable pipelined bus system)模型的通信高效、可扩放的允许k-误配的近似串匹配并行算法,其中一个算法使用n个处理器,时间为O(m);另一个为常数时间算法,使用mn个处理器. 相似文献
19.
字符串匹配是计算机科学中最经典、研究最广泛的问题之一,并且已经被应用到了众多领域当中。然而随着计算机和网络技术的飞速发展以及新问题的不断提出,人们逐渐发现在实际应用中有时更需要进行近似字符串匹配。因此,研究高效的近似字符串匹配算法具有重要的理论价值和实际意义。 相似文献
20.
基于可分负载理论的最优原则,在假定正文串分配顺序固定的前提下,考虑处理机节点具有不同计算速度、不同通信能力的情况,提出一种异构机群计算环境下的最优正文串分配策略,给出最优正文串分配的闭合解。对于节点具有不同计算速度、通信能力、存储容量的异构机群系统,建立正文串最优分配的线性规划模型。针对几种特殊情况讨论正文串的最优分配顺序。实验结果表明,与平均分配正文串策略以及按照从处理机能力分配正文串策略相比,利用该策略进行近似串匹配并行处理所需时间分别缩短了10%~40%和5%~20%。 相似文献
|