计算机仿真2024,Vol.41Issue(8) :374-378.

基于藏文音节结构的单模式匹配算法

A Single Pattern Matching Algorithm Based on Tibetan Syllable Structure

张学通 彭展
计算机仿真2024,Vol.41Issue(8) :374-378.

基于藏文音节结构的单模式匹配算法

A Single Pattern Matching Algorithm Based on Tibetan Syllable Structure

张学通 1彭展1
扫码查看

作者信息

  • 1. 西藏民族大学,陕西 咸阳,712082
  • 折叠

摘要

字符比较次数和失配后的跳转长度是影响模式(字符串)匹配算法效率的两个关键因素.BM算法是最经典的单模式字符串匹配算法之一.在长度为m的模式串中,其失配后的最大跳转长度为m,但是在应用于藏文环境时无意义字符比较次数较多、最大跳转长度还可增加.针对以上两点不足并结合藏文的文字特征,提出一种基于藏文音节点的单模式匹配算法:BM-Tibetan算法.算法采用"先对齐,再匹配"的思想以减少匹配次数,失配后的最大跳转距离为m+k(2≤k≤8).实验结果表明,BM-Tibetan算法的字符比较次数和模式串的移动次数均少于BM算法,算法性能有一定优势.

Abstract

The number of character comparisons and the jump length after mismatch are two key factors affecting the efficiency of string matching algorithms.BM algorithm is one of the most classical single pattern string matching algorithms.In a pattern string with a length of m,the maximum jump length after mismatch is m.However,when ap-plied to Tibetan environments,there are more comparisons of meaningless characters,and the maximum jump length can be increased.This paper proposes a single pattern matching algorithm based on Tibetan syllable points:BM-Ti-betan algorithm.The algorithm uses the idea of"alignment first,then matching"to reduce the number of matching,and the maximum jump distance after mismatch is m+k(2≤k≤8).Experimental results show that the number of character comparison and pattern string movement of BM-Tibetan algorithm are less than BM algorithm,and the per-formance of the algorithm has certain advantages.

关键词

字符串匹配/单模式匹配算法/藏文

Key words

String matching/Single pattern matching algorithm/Tibetan

引用本文复制引用

基金项目

西藏自治区自然科学基金项目(XZ202101ZR0089G)

出版年

2024
计算机仿真
中国航天科工集团公司第十七研究所

计算机仿真

CSTPCD
影响因子:0.518
ISSN:1006-9348
段落导航相关论文