汉语词典查询是中文信息处理系统的重要基础部分,对系统效率有重要的影响。本文对汉语词典查询算法研究作了简要回顾,设计实现了基于双数组TRIE机制的汉语词典查询算法,并提出了基于双编码机制的词典查询算法。最后以逐字二分法查询性能为基准,使用这两种词典询机制进行了词语直接查询和分词查询两种应用的性能测试。经过实验分析,双数组TRIE机制的词典查询算法在查询速度上提高明显,查询速度约是逐字二分法的5倍。双编码机制的的词典查询算法查询速度有一定提高,而且调整机制更加灵活。
The dictionary mechanism serves as one of the basic components in Chinese information processing systems. Its performance influences the performances of these systems significantly. In this paper, we review the algorithms for Chinese dictionary lookup at first, then design and implement a Chinese dictionary based on Double-Array TRIE mechanism, and present a new Chinese dictionary based on Double Coding mechanism. In the end, we compare their space and time complexity experimentally with the binary-seek-by-characters mechanism. It can be seen that the Chinese dictionary based on Double-Array TRIE mechanism improves the speed obviously.