1、硕 士 学 位 论 文(2012 届)Android 手机平台上中文输入法的设计和实现The Design and Implementation of Chinese Input Method Based On on Android System研 究 生 姓 名 指导教师姓名 专 业 名 称 计算机技术 研 究 方 向 中文信息处理 论文提交日期 2012 年 4 月 苏州大学学位论文独创性声明及使用授权声明学位论文独创性声明本人郑重声明:所提交的学位论文是本人在导师的指导下,独立进行研究工作所取得的成果。除文中已经注明引用的内容外,本论文不含其他个人或集体已经发表或撰写过的研究成果,也不含
2、为获得苏州大学或其它教育机构的学位证书而使用过的材料。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明。本人承担本声明的法律责任。研究生签名: 日 期: 学位论文使用授权声明苏州大学、中国科学技术信息研究所、国家图书馆、清华大学论文合作部、中国社科院文献信息情报中心有权保留本人所送交学位论文的复印件和电子文档,可以采用影印、缩印或其他复制手段保存论文。本人电子文档的内容和纸质论文的内容相一致。除在保密期内的保密论文外,允许论文被查阅和借阅,可以公布(包括刊登)论文的全部或部分内容。论文的公布(包括刊登)授权苏州大学学位办办理。研究生签名: 日 期: 导 师 签 名 : 日 期:
3、Android 手机平台上中文输入法设计和实现 摘要IAndroid 手机平台上中文输入法设计和实现中文摘要伴随着手持通信设备的日益普及和短信、微博等应用的广泛使用,人们越来越多地依赖于这些设备进行文字信息输入和处理。如何快速准确地利用手持式设备输入文字信息,特别是中文信息,对中国人而言有利于重要。首先,本文介绍了 Andriod 的主要组件和系统框架等内容,并分析了当今移动平台上的主流汉字输入法的优缺点。其次,本文以纵横输入法为例介绍了在 Android 平台下的码本的设计和检索技术,包括字词码本结构的设计、索引方式的设计、联想功能的实现、码本的存储以及输入法具体的检索流程。最后,本文全面分
4、析了 Android 系统平台的输入法框架,对该框架的组成、流程、生命周期以及一些所需实现的类和函数等进行了详细的阐述。在此基础上,在Andriod 平台上设计并实现了纵横输入法,并介绍了其实现技术。对实例输入系统的测试表明,该系统已达到了实用水平,并已经有了一定规模的用户群。关键词:输入法、Android、码本、输入架构作 者: 指导老师: Abstract The Design and Implement of Chinese Input Method Based On Android SystemIIThe Design and Implementation of Chinese Inp
5、ut Method Based on Android SystemAbstractWith the widespread use of the increasing popularity of handheld communications mobile devices, and increasing popularity of short message, microblogging and other mobile applications, the requirement of inputting and processing text information, especially t
6、he Chinese information for us, on mobile devices is recreasing rapidly. the people increasingly rely on these devices for inputting and processing text information.It is important for Chinese people to input text information, especially the Chinese information, quickly and accurately with handheld d
7、evices.Firstly, this desertatione article describes the main components and systems framework of the Andriod, and then analyzes the advantages and disadvantages of the popular Chinese input methods on todaysall kinds of mobile platforms.Secondly, this articleit using uses the example of CKC input me
8、thod as a sample to describes the design of code bookthe relation table between codes and their Chinese characters or phrases and the retrieval technologymethod on the Android platform, including the structure design of code bookthe relation table, the design of indexing, the implement of associatio
9、n functions, the storage of the relation tablecode book, and specific retrieval processes of the input method.Finally, the articleit shows a comprehensive analysis analyzes theof input method framework on the Android platform, and gives a detailed exposition of the framework components, circuit, lif
10、e cycle and some of the necessary achieved classes, functions, and so on. On this basis, author it designedes and realizeds the CKC input method on the Andriod platform, and introduces its implemention technology.Tests of on the CKC input system on the Android platform show that the our system has r
11、eached a very practical level. Iand it already has been used on some extent.The design and Implement of Chinese input system Based on Dynamic self-adaptation AbstractLanguage mode IIIKey Words: Chinese input method; Android; code book; Input architectureWritten by Sun XiaoSupervised by Li Peifeng目 录
12、中文摘要 .IAbstract.II目 录 .I第一章 绪论 .11.1 课题背景与意义 .11.3 研究现状 .21.3.1 移动手机平台发展现状 .21.3.2 手机输入法发展现状 .51.3 本文工作 .71)提出了一个适合 Android 平台的输入法码本设计方案 .72)分析了 Android 输入法框架,设计了一个基于 Android 平台的输入系统 73)介绍了 Android 平台输入系统的实现技术 .81.3 论文组织 .8第二章 相关工作基础 .92.1 Android 平台 .92.1.1 Android 平台简介 .92.1.2 Android 平台框架 .102.1.
13、3 Android 平台开发环境搭建 .112.2 纵横输入法 .132.2.1 纵横输入法简介 .132.2.2 纵横输入法优点 .132.3 输入法框架介绍 .142.3.1 输入法框架简介 .142.3.2 输入法框架组成 .142.3.3 输入法应用组成 .152.3.4 输入法消息流转机制 .162.3.5 输入法生命周期 .182.3.5 输入法主要的类和函数 .192.4 本章小结 .20第三章 码本结构设计 .213.1 码本特点 .213.2 字码本结构 .213.3 词码本结构 .223.4 联想与码本存储 .243.5 检索过程 .243.6 本章小结 .25第四章 An
14、droid 平台下输入法的设计与实现 .264.1 中文输入法的设计 .264.1.1 逻辑处理设计 .264.1.2 键盘界面设计 .274.1.3 候选字词界面设计 .294.1.4 消息流转设计 .294.1.5 候选字词查找设计 .304.2 中文输入法的实现 .324.2.1 键盘布局的实现 .324.2.2 初始化输入法 .334.2.3 消息捕获与传递 .344.2.4 消息处理 .364.2.5 数据查找与反馈 .394.3 本章小结 .41第五章 输入法的安装与使用 .425.1 输入法安装 .425.2 输入法使用 .435.2.1 切换输入法 .435.2.2 按键布局 .44