基于统计自然语言分析的九宫格输入法最优键盘布局
2021-12-07周迪周晓聪候婷
周迪 周晓聪 候婷



摘 要: 九宫格输入法是手机端常用的中文输入法之一,可将26个英文字母按顺序布局在8个数字键上,每个键上有3~4个字母。然而顺序布局显然不是最优的。本文采用统计自然语言处理计算键盘布局的平均击键次数,并采用模拟退火算法优化,在搜寻键盘数据时,对其实行哈希计算,避免重复搜索,最终找到九宫格输入法的最优键盘布局方案。结果显示,本文的最优键盘布局方案比顺序布局的输入效率明显提升,可以提高生活的便利程度和工作效率。
关键词: 九宫格输入法; 最优键盘布局; 击键次数; 统计自然语言处理; 模拟退火
文章编号: 2095-2163(2021)07-0202-04中图分类号:TP391.1 文献标志码: A
Optimal keyboard layout of nine-grid
input method based on statistical natural language analysis
ZHOU Di1, ZHOU Xiaocong2, HOU Ting2
(1 College of Internet of Things Engineering, Hohai University, Changzhou Jiangsu 213022, China;
2 College of Science, Hohai University, Nanjing 211100, China)
【Abstract】Nine-grid input method is one of the Chinese input methods commonly used in mobile phone terminal. It lays out the 26 English letters in order on eight numeric keys, each with 3~4 letters. However, sequential layout is clearly not optimal. In this paper, statistical natural language processing is used to calculate the average keystroke times of keyboard layout, Simulated Annealing algorithm is used to optimize the keyboard data, and hash calculation is implemented to avoid repeated search, so as to find the optimal keyboard layout scheme of the nine-grid input method. The results show that the input efficiency of the optimal keyboard layout in this paper is significantly higher than that of the sequential layout, which can improve the convenience of life and work efficiency.
【Key words】nine-grid input method; optimal keyboard layout; keystroke times; statistical natural language processing; Simulated Annealing
0 引 言
现有的手机中文文本输入法,以拼音输入法为主,键盘主要采用九宫格键盘和26键全键盘两种。其中,九宫格输入法通常把26個字母顺序放置在2~8这8个数字键上,每个键上有3~4个字母,数字键0和1作为它用。由于手机屏幕大小的限制,26键全键盘使用率不如九宫格键盘高。以苹果IOS输入法为例,对中文输入不太友好,经过改进后采用了九宫格输入法。
出于历史原因,PC端键盘的26个字母并不是按顺序排列的。26键全键盘是根据电脑键盘来布局的,九宫格键盘输入法是按字母表顺序排列的。但这种按英文字母顺序布局的键盘是不合理的,并不适合中文输入,没有考虑汉字的频率分布特征,对汉字拼音输入的速度具有一定的限制作用。例如汉语拼音中,字母s的使用频率很高,但却跟p、q、r共用一个数字键,导致选候选词时击键次数太多。……
