A Fast and Compact Language Model Implementation Using Double-Array Structures
A Fast and Compact Language Model Implementation Using Double-Array Structures
复制标题
DOI:
10.1145/2873068
复制
发表时间:
2016-04
期刊:
影响因子:
--
通讯作者:
Jun-ya Norimatsu;M. Yasuhara;Toru Tanaka;Mikio Yamamoto
中科院分区:
文献类型:
--
作者:
Jun-ya Norimatsu;M. Yasuhara;Toru Tanaka;Mikio Yamamoto
The language model is a widely used component in fields such as natural language processing, automatic speech recognition, and optical character recognition. In particular, statistical machine translation uses language models, and the translation speed and the amount of memory required are greatly affected by the performance of the language model implementation. We propose a fast and compact implementation of n-gram language models that increases query speed and reduces memory usage by using a double-array structure, which is known to be a fast and compact trie data structure. We propose two types of implementation: one for backward suffix trees and the other for reverse tries. The data structure is optimized for space efficiency by embedding model parameters into otherwise unused spaces in the double-array structure. We show that the reverse trie version of our method is among the smallest state-of-the-art implementations in terms of model size with almost the same speed as the implementation that performs fastest on perplexity calculation tasks. Similarly, we achieve faster decoding while keeping compact model sizes, and we confirm that our method can utilize the efficiency of the double-array structure to achieve a balance between speed and size on translation tasks.