CN109144286B - An input method and device - Google Patents
An input method and device Download PDFInfo
- Publication number
- CN109144286B CN109144286B CN201710501132.6A CN201710501132A CN109144286B CN 109144286 B CN109144286 B CN 109144286B CN 201710501132 A CN201710501132 A CN 201710501132A CN 109144286 B CN109144286 B CN 109144286B
- Authority
- CN
- China
- Prior art keywords
- input
- sentence
- character
- input word
- screen area
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 77
- 230000008569 process Effects 0.000 claims description 27
- 238000004891 communication Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000001133 acceleration Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/02—Input arrangements using manually operated switches, e.g. using keyboards or dials
- G06F3/023—Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
- G06F3/0233—Character input methods
- G06F3/0237—Character input methods using prediction or retrieval techniques
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
本发明实施例提供一种输入方法和装置,包括:接收用户输入的编码字符串和/或语音输入;判断字符上屏区中光标焦点所在的位置是否为句首;若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词;若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。本发明实施例可以减少用户的选词操作,提高用户的输入效率。
Embodiments of the present invention provide an input method and device, including: receiving an encoded character string and/or voice input input by a user; judging whether the position of the cursor focus in the character upper screen area is the beginning of a sentence; The position of the cursor focus in the area is the beginning of the sentence, and it is judged whether there is an input word matching the encoded character string and/or the voice input in the input word set at the beginning of the sentence; Each input word at the first position; if it is judged that there is an input word matching the encoded character string and/or voice input in the set of input words at the beginning of the sentence, increase the weight of the matching input word, and adjust the input word according to the adjusted weight. The arrangement order of each candidate input word corresponding to the encoded character string and/or the speech input. The embodiment of the present invention can reduce the user's word selection operation and improve the user's input efficiency.
Description
技术领域technical field
本发明实施例涉及计算机技术领域,具体涉及一种输入方法及装置。Embodiments of the present invention relate to the field of computer technologies, and in particular, to an input method and apparatus.
背景技术Background technique
现有的输入法技术中,用户输入编码字符串,输入法应用可以展示所述编码字符串对应的候选词。现有技术中,输入法应用在展示多个候选词时,一般是根据用户输入候选词的频率高低来确定候选词的排序的。用户输入频率高的词语,将具有更大概率展示在候选词首位。然而,这种单一的排序方式并不能够满足用户在所有场景下的输入需求。例如,当用户输入的编码字符串对应的候选词输入频率较为接近时,输入法应用不能够灵活智能地对候选词排序,降低了用户的输入效率。In the existing input method technology, a user inputs an encoded character string, and an input method application can display candidate words corresponding to the encoded character string. In the prior art, when an input method is applied to display multiple candidate words, the ranking of the candidate words is generally determined according to the frequency of user input of the candidate words. Words with high frequency input by users will have a higher probability of being displayed at the top of the candidate words. However, this single sorting method cannot meet the input needs of users in all scenarios. For example, when the input frequency of the candidate words corresponding to the encoded character string input by the user is relatively close, the input method application cannot flexibly and intelligently sort the candidate words, which reduces the input efficiency of the user.
发明内容SUMMARY OF THE INVENTION
本发明实施例旨在提供一种输入方法及装置,当识别出当前光标焦点在句首时,可以调整各候选输入词的排列顺序,更灵活、准确地显示候选输入词的排序,提高用户的输入效率。The embodiment of the present invention aims to provide an input method and device, when it is recognized that the current cursor focus is at the beginning of a sentence, the arrangement order of each candidate input word can be adjusted, the order of the candidate input words can be displayed more flexibly and accurately, and the user's experience can be improved. Enter efficiency.
为此,本发明实施例提供如下技术方案:To this end, the embodiments of the present invention provide the following technical solutions:
第一方面,本发明实施例提供了一种输入方法,包括:接收用户输入的编码字符串和/或语音输入;判断字符上屏区中光标焦点所在的位置是否为句首;若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词;若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。In a first aspect, an embodiment of the present invention provides an input method, comprising: receiving a coded character string and/or voice input input by a user; judging whether the position of the cursor focus in the upper screen area of the character is the beginning of a sentence; The position where the cursor focus is located in the upper screen area of the characters is the beginning of a sentence, and it is judged whether there is an input word matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence; wherein, the set of input words at the beginning of the sentence includes: Each input word that appears at the beginning of the sentence; if it is judged that there is an input word matching the encoded character string and/or voice input in the input word set at the beginning of the sentence, increase the weight of the matched input word, and adjust the weight according to the adjusted weight The arrangement order of each candidate input word corresponding to the encoded character string and/or the speech input.
第二方面,本发明实施例提供了一种输入装置,包括:接收单元,用于接收用户输入的编码字符串和/或语音输入;第一判断单元,用于判断字符上屏区中光标焦点所在的位置是否为句首;第二判断单元,用于若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词;调整单元,用于若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。In a second aspect, an embodiment of the present invention provides an input device, including: a receiving unit for receiving an encoded character string and/or voice input input by a user; a first judging unit for judging the focus of a cursor in a character upper screen area Whether the position is the beginning of a sentence; the second judgment unit is used to judge whether the input word set at the beginning of the sentence exists and the encoded string and / or input words matched by voice input; wherein, the set of input words at the beginning of a sentence includes each input word that appears at the beginning of a sentence; an adjustment unit is used to determine if there is a set of input words at the beginning of a sentence that matches the encoded string and/or voice input matched input words, increase the weight of the matched input words, and adjust the arrangement order of each candidate input word corresponding to the encoded character string and/or voice input according to the adjusted weight.
第三方面,本发明实施例提供了一种用于输入的装置,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:接收用户输入的编码字符串和/或语音输入;判断字符上屏区中光标焦点所在的位置是否为句首;若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词;若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。In a third aspect, embodiments of the present invention provide an apparatus for input, comprising a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be generated by one or more programs The processor executes the one or more programs and includes instructions for performing the following operations: receiving a coded string and/or voice input input by the user; judging whether the position of the cursor focus in the upper screen area of the character is the beginning of a sentence; if judging The position where the cursor focus is located in the upper screen area of the characters is the beginning of a sentence, and it is judged whether there is an input word matching the encoded character string and/or the voice input in the input word set at the beginning of the sentence; wherein, the input word at the beginning of the sentence The set includes each input word that appears at the beginning of the sentence; if it is judged that there is an input word that matches the encoded string and/or the voice input in the set of input words at the beginning of the sentence, increase the weight of the matched input word, according to the adjusted input word. The weight adjusts the arrangement order of each candidate input word corresponding to the encoded character string and/or the speech input.
第四方面,本发明实施例提供了一种机器可读介质,其上存储有指令,当由一个或多个处理器执行时,使得装置执行如第一方面所示的输入方法。In a fourth aspect, an embodiment of the present invention provides a machine-readable medium with instructions stored thereon, which, when executed by one or more processors, cause an apparatus to execute the input method shown in the first aspect.
本发明实施例提供的输入方法及装置,当识别出当前光标焦点在句首且判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词时,可以提高匹配的输入词的权重,调整各候选输入词的排列顺序,更灵活、准确地显示候选输入词的排序,减少用户的选词操作,提高用户的输入效率。With the input method and device provided by the embodiments of the present invention, when it is recognized that the current cursor focus is at the beginning of a sentence and it is judged that there is an input word matching the encoded character string and/or voice input in the input word set at the beginning of the sentence, the matching can be improved. The weight of the input words is adjusted, the arrangement order of each candidate input word is adjusted, the order of the candidate input words is displayed more flexibly and accurately, the user's word selection operation is reduced, and the user's input efficiency is improved.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明中记载的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments described in the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.
图1为本发明一实施例提供的输入方法流程图;1 is a flowchart of an input method provided by an embodiment of the present invention;
图2为本发明另一实施例提供的输入方法流程图;2 is a flowchart of an input method provided by another embodiment of the present invention;
图3为本发明一实施例提供的输入装置示意图;FIG. 3 is a schematic diagram of an input device according to an embodiment of the present invention;
图4是根据一示例性实施例示出的一种用于输入装置的框图;4 is a block diagram of an input device according to an exemplary embodiment;
图5是根据一示例性实施例示出的服务器的框图。Fig. 5 is a block diagram of a server according to an exemplary embodiment.
具体实施方式Detailed ways
本发明实施例旨在提供一种输入方法及装置,当识别出当前光标焦点在句首时,可以调整各候选输入词的排列顺序,更灵活、准确地显示候选输入词的排序,提高用户的输入效率。The embodiment of the present invention aims to provide an input method and device, when it is recognized that the current cursor focus is at the beginning of a sentence, the arrangement order of each candidate input word can be adjusted, the order of the candidate input words can be displayed more flexibly and accurately, and the user's experience can be improved. Enter efficiency.
为了使本技术领域的人员更好地理解本发明中的技术方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本发明保护的范围。In order to make those skilled in the art better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only Some, but not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
下面将结合附图1至附图2对本发明示例性实施例示出的输入方法进行介绍。The input method shown in the exemplary embodiment of the present invention will be described below with reference to FIG. 1 to FIG. 2 .
参见图1,为本发明一实施例提供的输入方法流程图。如图1所示,可以包括:Referring to FIG. 1 , it is a flowchart of an input method provided by an embodiment of the present invention. As shown in Figure 1, it can include:
S101,接收用户输入的编码字符串和/或语音输入。S101. Receive an encoded character string and/or voice input input by a user.
需要说明的是,本发明实施例以中文为例进行说明。在本实施例中,技术术语“字符上屏区”一般是指上屏输出用户选中的候选输入词的区域,例如输入框。技术术语“编码字符串编辑区”,一般是指用于展示用户输入的编码字符串的区域。技术术语“语音编辑区”一般是指用于提供语音输入编辑的区域。技术术语“候选项区”一般是指用于展示候选输入词的区域。It should be noted that, the embodiments of the present invention are described by taking Chinese as an example. In this embodiment, the technical term "character upper screen area" generally refers to an area on the upper screen where candidate input words selected by the user are output, such as an input box. The technical term "encoded string editing area" generally refers to the area used to display the encoded string input by the user. The technical term "voice editing area" generally refers to an area used to provide editing of speech input. The technical term "candidate area" generally refers to an area for displaying candidate input words.
举例说明,接收用户输入的编码字符串“shoux”,并可以在编码字符串编辑区展示用户输入的编码字符串。其中,用户输入编码字符串的方式可以是键盘输入、手写输入或者其他输入方式,在此不限定。又举例说明,用户还可以输入语音,输入装置用于接收用户的语音输入。For example, the encoded string "shoux" input by the user is received, and the encoded string input by the user can be displayed in the encoded string editing area. The manner in which the user inputs the encoded character string may be keyboard input, handwriting input, or other input manners, which are not limited herein. For another example, the user may also input a voice, and the input device is configured to receive the user's voice input.
S102,判断字符上屏区中光标焦点所在的位置是否为句首。S102, it is judged whether the position where the cursor focus is located in the upper screen area of the character is the beginning of a sentence.
在一些实施方式中,所述判断字符上屏区中光标焦点所在的位置是否为句首包括:判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是否是语句结束符或者换行符;若判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是语句结束符或者换行符,确定所述字符上屏区中光标焦点所在的位置为句首。举例说明,所述语句结束符可以是句号、问号、分号、感叹号、省略号等语句结束符。当用户输入多个句子时,在一个句子结束时输入句号,那么光标焦点所在的位置一般是句首。又举例说明,当用户在输入编码字符串和/或语音输入前之前的输出对象为换行符时,当前光标焦点所在位置很有可能是句首。In some embodiments, the judging whether the position where the cursor focus is located in the upper character screen area is the beginning of a sentence includes: judging whether the output object in the upper character upper screen area before the user enters the encoded string and/or the voice input is a sentence A terminator or a newline; if it is determined that the output object before the user input coded string and/or voice input in the upper screen area of the character is a statement terminator or a newline, determine the position where the cursor focus is located in the upper screen area of the character for the beginning of the sentence. For example, the statement terminator may be a statement terminator such as a period, a question mark, a semicolon, an exclamation mark, an ellipsis, and the like. When the user inputs multiple sentences and enters a period at the end of a sentence, the position where the cursor focus is generally is the beginning of the sentence. As another example, when the output object before the user enters the encoded character string and/or the voice input is a newline, the position where the current cursor focus is likely to be the beginning of a sentence.
在一些实施方式中,所述判断字符上屏区中光标焦点所在的位置是否为句首包括:判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是否是表情符号或者图片;若判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是表情符号或者图片,确定所述字符上屏区中光标焦点所在的位置为句首。举例说明,有些用户习惯在一个句子结束时输入表情符,那么光标焦点所在的位置一般是句首。又如,用户在插入一个图片后,再次输入编码字符串或者语音输入前,字符上屏区光标焦点所在的位置为句首。In some implementation manners, the judging whether the position where the cursor focus is located in the upper screen area of characters is the beginning of a sentence includes: judging whether the output object in the upper screen area of characters before the user enters a coded string and/or voice input is an expression symbol or picture; if it is determined that the output object in the upper screen area of the character before the user enters the coded string and/or the voice input is an emoticon or a picture, determine that the position of the cursor focus in the upper screen area of the character is the beginning of the sentence. For example, some users are accustomed to inputting emoticons at the end of a sentence, so the position where the cursor focus is generally is the beginning of the sentence. For another example, after the user inserts a picture and before inputting a coded character string or voice input again, the position where the focus of the cursor in the screen area on the character is located is the beginning of the sentence.
在一些实施方式中,所述判断字符上屏区中光标焦点所在的位置是否为句首包括:判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是否是字符;若判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象不是字符,确定所述字符上屏区中光标焦点所在的位置为句首。举例说明,若判断字符上屏区内用户在输入编码字符串“shoux”之前输出的对象是字符,那么光标焦点所在的位置不是句首。反之,若判断字符上屏区内用户在输入编码字符串“shoux”之前输出的对象不是字符,那么光标焦点所在的位置很可能是句首。In some embodiments, the judging whether the position where the cursor focus is located in the upper character screen area is the beginning of a sentence includes: judging whether the output object in the upper character upper screen area before the user enters a coded string and/or voice input is a character ; If it is judged that the output object before the user input coded string and/or voice input in the character upper screen area is not a character, determine that the position where the cursor focus is located in the character upper screen area is the beginning of a sentence. For example, if it is determined that the object output by the user before inputting the encoded string "shoux" in the character upper screen area is a character, the position where the cursor focus is located is not the beginning of the sentence. Conversely, if it is judged that the object output by the user before inputting the encoded string "shoux" in the character upper screen area is not a character, then the position where the cursor focus is likely to be the beginning of a sentence.
在一些实施方式中,所述判断字符上屏区中光标焦点所在的位置是否为句首包括:判断与输入法应用关联的进程是否为新启动的进程;若判断与输入法应用关联的进程为新启动的进程,确定所述字符上屏区中光标焦点所在的位置为句首。举例说明,若用户当前刚打开了应用程序word,那么与输入法应用关联的进程即为word进程,为新启动的进程,这时用户还未输入内容,当前光标焦点所在的位置一般是句首。又举例说明,当用户开启了应用程序例如QQ的一个聊天窗口,可以视为启动了一个新的进程,这时可以认为光标焦点所在的位置是句首。In some embodiments, the judging whether the position of the cursor focus in the upper screen area of the character is the beginning of a sentence includes: judging whether the process associated with the input method application is a newly started process; if judging whether the process associated with the input method application is In the newly started process, the position where the cursor focus is located in the upper screen area of the character is determined as the beginning of the sentence. For example, if the user has just opened the application word, then the process associated with the input method application is the word process, which is a newly started process. At this time, the user has not entered any content, and the current cursor focus position is generally the beginning of the sentence. . As another example, when a user opens an application program such as a chat window of QQ, it can be regarded as starting a new process, and at this time, it can be considered that the position of the cursor focus is the beginning of a sentence.
当然,以上介绍了可能的几种实现方式,不视为对本发明的限制。Certainly, several possible implementation manners are described above, which are not considered to be limitations of the present invention.
S103,若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词。S103, if it is judged that the position where the cursor focus is located in the upper screen area of the character is the beginning of a sentence, judge whether there is an input word matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence; wherein, the The set of input words at the beginning of the sentence includes each input word appearing at the beginning of the sentence.
需要说明的是,可以预先建立句首输入词集合,句首输入词集合包括出现在句首位置的各输入词。举例说明,由于汉语的使用习惯,部分词语只适合放在句首或者大部分情况下出现在句首,而一些词语鲜有出现在句首。因此,可以基于汉语词语的特性统计出一部分常见的句首输入词,建立句首输入词集合。当然,也可以统计用户的历史输入数据,将出现在句首位置的输入词加入句首输入词集合,并可以统计其在句首位置出现的次数。当然,也可以两种方式结合适用,先基于汉语词语特性统计常见的句首输入词,再结合用户历史输入数据补充句首输入词集合,使之更加适应用户的个性化输入习惯。当用户在句首位置输入编码字符串和/或语音输入时,将有较大频率出现在句首的输入词尽量展示在候选词的前列,以提高用户选择输入词的效率。It should be noted that a set of input words at the beginning of a sentence may be established in advance, and the set of input words at the beginning of a sentence includes each input word that appears at the beginning of a sentence. For example, due to the usage habits of Chinese, some words are only suitable to be placed at the beginning of a sentence or appear at the beginning of a sentence in most cases, while some words rarely appear at the beginning of a sentence. Therefore, based on the characteristics of Chinese words, some common input words at the beginning of a sentence can be counted, and a set of input words at the beginning of a sentence can be established. Of course, the historical input data of the user can also be counted, the input words appearing at the beginning of the sentence are added to the set of input words at the beginning of the sentence, and the number of times they appear at the beginning of the sentence can be counted. Of course, it can also be applied in combination of two methods. First, the common input words at the beginning of sentences are counted based on the characteristics of Chinese words, and then combined with the user's historical input data to supplement the input word set at the beginning of the sentence, so that it is more suitable for the user's personalized input habits. When the user inputs a coded string and/or voice input at the beginning of a sentence, the input words that appear at the beginning of the sentence with greater frequency are displayed as far as possible in the front row of the candidate words, so as to improve the efficiency of the user in selecting the input words.
S104,若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。S104, if it is judged that there is an input word matching the encoded string and/or the voice input in the set of input words at the beginning of the sentence, increase the weight of the matched input word, and adjust the encoded string according to the adjusted weight. and/or the arrangement order of each candidate input word corresponding to the speech input.
举例说明,针对编码字符串“shoux”,可以存在“手写”“首先”、“受限”“寿险”“手续”等候选输入词。若判断字符上屏区当前光标焦点所在的位置为句首,并通过查找匹配,确定在句首输入词集合存在与编码字符串“shoux”匹配的句首输入词“首先”,则提高匹配的输入词“首先”的权重,并根据调整后的权重调整各输入词的排列属性,例如将句首输入词“首先”排在首选项的位置。For example, for the encoded string "shoux", there may be candidate input words such as "handwriting", "first", "restricted", "life insurance", and "procedure". If it is judged that the position of the current cursor focus in the screen area on the character is the beginning of the sentence, and by searching for a match, it is determined that the input word "first" at the beginning of the sentence matching the encoded string "shoux" exists in the input word set at the beginning of the sentence. Input the weight of the word "first", and adjust the arrangement attribute of each input word according to the adjusted weight, for example, rank the input word "first" at the beginning of the sentence in the position of the preference item.
又举例说明,针对编码字符串“haoma”,可以存在“号码”、“好吗”、“好嘛”“好马”等各候选输入词。当判断当前光标焦点在句首时,通过查找匹配,确定存在句首输入词“好吗”,则提高候选输入词“好吗”的权重,并根据调整后的权重调整各候选输入词的排列顺序。在一些情况下,也可以提高候选输入词“好吗”的权重,使之排在前列,例如排在首选项的位置。当然,也可以在提高权重后,结合用户使用候选输入词的频率调整各输入词的排序。As another example, for the encoded character string "haoma", there may be candidate input words such as "number", "how are you", "how are you", and "good horse". When it is judged that the current cursor focus is at the beginning of the sentence, it is determined that there is the input word "okay" at the beginning of the sentence by searching for a match, then the weight of the candidate input word "okay" is increased, and the arrangement of each candidate input word is adjusted according to the adjusted weight. order. In some cases, it is also possible to increase the weight of the candidate input word "how are you" so that it ranks at the top, for example, in the position of preference. Of course, after increasing the weight, the ranking of each input word may be adjusted in combination with the frequency of the user's use of the candidate input words.
具体实现时,若判断在句首输入词集合中存在多个与所述编码字符串和/或语音输入匹配的输入词时,比较匹配的各输入词出现在句首位置的次数,调整各匹配的各输入词的权重,其中,次数多的输入词的权重大于次数少的输入词的权重。举例说明,若针对编码字符串“qic”,当判断当前光标焦点在句首时,通过查找匹配,确定存在句首输入词“其次”和“汽车”,而句首输入词“其次”出现在句首的次数大于“汽车”出现在句首的次数,则“其次”权重大于“汽车”,在排序时,出现在句首次数多的候选输入词的排序也更靠前。During specific implementation, if it is judged that there are multiple input words matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence, the number of times that each matched input word appears at the beginning of the sentence is compared, and each matching input word is adjusted. The weight of each input word, wherein the weight of the input word with more frequency is greater than the weight of the input word with less frequency. For example, for the encoded string "qic", when it is judged that the current cursor focus is at the beginning of the sentence, it is determined that the input words "second" and "car" exist at the beginning of the sentence by searching for a match, and the input word "second" at the beginning of the sentence appears at the beginning of the sentence. If the number of times at the beginning of a sentence is greater than the number of times that "car" appears at the beginning of a sentence, the weight of "secondary" is greater than that of "car". When sorting, the candidate input words that appear at the first time of the sentence are also ranked higher.
在一些实施方式中,所述方法还包括:若判断所述字符上屏区中光标焦点所在的位置为句首且判断在句首输入词集合中不存在与所述编码字符串和/或语音输入匹配的输入词,响应于用户针对候选输入词的选择操作,将用户选择的候选输入词添加至句首输入词集合,并标记所述候选输入词出现在句首位置的次数。举例说明,若针对编码字符串“haoma”,当判断当前光标焦点在句首时,通过查找,确定不存在与句首输入词集合匹配的输入词,而用户选择的上屏输入词为“好吗”,则将“好吗”添加至句首输入词集合,并标记所述候选输入词出现在句首位置的次数。In some embodiments, the method further includes: if it is determined that the position where the cursor focus is located in the upper screen area of the character is the beginning of a sentence and it is determined that there is no input word set at the beginning of the sentence that is related to the encoded character string and/or voice The matching input words are input, and in response to the user's selection operation on the candidate input words, the candidate input words selected by the user are added to the set of input words at the beginning of the sentence, and the number of times the candidate input words appear at the beginning of the sentence is marked. For example, for the encoded string "haoma", when it is judged that the current cursor focus is at the beginning of the sentence, it is determined by searching that there is no input word matching the set of input words at the beginning of the sentence, and the input word selected by the user on the upper screen is "OK". ?”, then add “How are you” to the set of input words at the beginning of the sentence, and mark the number of times the candidate input word appears at the beginning of the sentence.
在一些实施方式中,所述方法还包括:若判断所述字符上屏区中光标焦点所在的位置为句首且判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,响应于用户匹配的输入词的选择操作,增加用户选择的输入词出现在句首位置的次数。举例说明,若针对编码字符串“shoux”,当判断当前光标焦点在句首时,通过查找,确定存在与句首输入词集合匹配的输入词“首先”,而用户选择的上屏输入词也为“首先”,则将“首先”出现在句首位置的次数加1。In some embodiments, the method further includes: if it is determined that the position where the cursor focus is located in the upper screen area of the character is the beginning of a sentence, and it is determined that there is an input word set at the beginning of the sentence that is related to the encoded character string and/or voice input For the matched input word, in response to the user's selection operation of the matched input word, the number of times that the input word selected by the user appears at the beginning of the sentence is increased. For example, for the encoded string "shoux", when it is judged that the current cursor focus is at the beginning of the sentence, it is determined by searching that there is an input word "first" that matches the set of input words at the beginning of the sentence, and the upper-screen input word selected by the user is also If it is "first", add 1 to the number of times that "first" appears at the beginning of a sentence.
为了便于本领域技术人员更清楚地理解本申请在具体场景下的实施方式,下面以一个具体示例对本申请实施方式进行介绍。需要说明的是,该具体示例仅为使得本领域技术人员更清楚地了解本发明,但本发明的实施方式不限于该具体示例。In order to facilitate those skilled in the art to more clearly understand the implementation manner of the present application in a specific scenario, the implementation manner of the present application is described below with a specific example. It should be noted that this specific example is only to make the present invention more clearly understood by those skilled in the art, but the embodiments of the present invention are not limited to this specific example.
S201,接收用户输入的第一编码字符串和/或第一语音输入。S201. Receive a first encoded character string and/or a first voice input input by a user.
举例说明,假设用户首次输入编码字符串“qic”。As an example, suppose the user enters the encoded string "qic" for the first time.
S202,判断字符上屏区中光标焦点所在的位置是否为句首。S202, judging whether the position where the cursor focus is located in the upper screen area of the character is the beginning of a sentence.
S203,若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词。S203, if it is determined that the position where the cursor focus is located in the upper screen area of the character is the beginning of the sentence, determine whether there is an input word matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence.
S204,若判断在句首输入词集合中不存在与所述编码字符串和/或语音输入匹配的输入词,按照预定的策略展示各候选输入词。S204, if it is determined that there is no input word matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence, display each candidate input word according to a predetermined strategy.
其中,预定的策略与现有技术相同。Among them, the predetermined strategy is the same as that of the prior art.
S205,响应于用户针对候选输入词的选择操作,在字符上屏区输出所述候选输入词。S205, in response to the user's selection operation on the candidate input word, output the candidate input word in the character upper screen area.
举例说明,若用户选择候选输入词为“其次”,则上屏输出“其次”For example, if the user selects the candidate input word as "Next", the upper screen will output "Next"
S206,将所述候选输入词添加至句首输入词集合,并标记所述候选输入词出现在句首位置的次数。S206 , adding the candidate input word to the sentence start input word set, and marking the number of times the candidate input word appears at the sentence start position.
具体实现时,可以用二元词的方式记录该词,即:空内容+输入词。例如,可以用二元词记录为:空+“其次”。此外,还可以通过以下方式记录句首输入词:预设标识符+输入词,例如:*输入词。当然,也可以采用其他标识符。需要说明的是,若当前光标位置不在句首,也可以标记用户选择的候选输入词为普通用户词,同样地,也可以标记其在非句首位置出现的次数。During specific implementation, the word can be recorded in the form of a bigram, namely: empty content + input word. For example, it can be recorded with a bigram as: empty + "secondary". In addition, the input word at the beginning of the sentence can also be recorded in the following ways: preset identifier + input word, for example: * input word. Of course, other identifiers may also be used. It should be noted that, if the current cursor position is not at the beginning of a sentence, the candidate input word selected by the user can also be marked as a common user word, and similarly, the number of times it appears at a position other than the beginning of a sentence can also be marked.
S207,接收用户输入的编码字符串和/或语音输入。S207: Receive the encoded character string and/or the voice input input by the user.
举例说明,当用户再次输入编码字符串“qic”。For example, when the user enters the encoded string "qic" again.
S208,判断字符上屏区中光标焦点所在的位置是否为句首。S208, it is judged whether the position where the cursor focus is located in the upper screen area of the character is the beginning of a sentence.
S209,若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词。S209, if it is determined that the position where the cursor focus is located in the upper screen area of the character is the beginning of the sentence, determine whether there is an input word matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence.
举例说明,若判断光标在句首,优先查找该编码字符串和/或语音输入在句首输入词集合中是存在匹配的输入词,确定存在匹配的句首输入词“其次”。For example, if it is determined that the cursor is at the beginning of a sentence, it is first to find that the encoded character string and/or the voice input has a matching input word in the sentence-beginning input word set, and it is determined that there is a matching sentence-beginning input word "second".
需要说明的是,在本发明中,句首输入词集合中的各输入词并不必然存储在一起,可以仅用标识例如预设的标识符“*”或特殊的二元记录方式标识其为句首输入词。因此,在判断句首输入词集合是否存在与编码字符串和/或语音输入匹配的输入词时,可以通过判断所述与编码字符串和/或语音输入匹配的输入词输入词是否包括预设的标识符来判断其是否为句首输入词。It should be noted that, in the present invention, each input word in the set of input words at the beginning of a sentence is not necessarily stored together, and can only be identified as a preset identifier "*" or a special binary record. Enter the word at the beginning of the sentence. Therefore, when judging whether the input word set at the beginning of the sentence has an input word that matches the coded string and/or the voice input, it can be determined whether the input word matching the coded string and/or the voice input includes a preset to determine whether it is the first input word of a sentence.
S210,若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。S210, if it is determined that there is an input word matching the encoded string and/or the voice input in the set of input words at the beginning of the sentence, increase the weight of the matched input word, and adjust the encoded string according to the adjusted weight and/or the arrangement order of each candidate input word corresponding to the speech input.
举例说明,存在句首输入词“其次”,则给予其较高加权。尽管候选输入词“汽车”的输入频率远大于“汽车”,但由于候选输入词“汽车”从未出现在句首,因此,当用户在句首位置输入时,句首输入词“汽车”则会在候选项区域中优先展示,例如展示在首选项位置。For example, if the word "second" exists at the beginning of a sentence, it is given a higher weight. Although the input frequency of the candidate input word "car" is much higher than that of "car", since the candidate input word "car" never appears at the beginning of the sentence, when the user inputs the word "car" at the beginning of the sentence, the input word "car" at the beginning of the sentence is It will be displayed preferentially in the candidate area, for example, in the preference position.
S211,响应于用户针对匹配的输入词的选择操作,增加用户选择的输入词出现在句首位置的次数。S211 , in response to the user's selection operation on the matched input word, increase the number of times that the input word selected by the user appears at the beginning of the sentence.
在本发明这一实施例中,根据用户的输入习惯,当识别出当前光标焦点在句首且与编码字符串和/或语音输入对应的各候选输入词存在句首输入词时,调整各候选输入词的排列顺序,更灵活、准确地显示候选输入词的排序,减少用户的选词操作,提高输入效率。In this embodiment of the present invention, according to the user's input habits, when it is recognized that the current cursor focus is at the beginning of a sentence and each candidate input word corresponding to the encoded character string and/or voice input has a sentence start input word, adjust each candidate input word. The arrangement order of input words can display the order of candidate input words more flexibly and accurately, reduce the user's word selection operation, and improve the input efficiency.
参见图3,为本发明一实施例提供的输入装置示意图。Referring to FIG. 3 , it is a schematic diagram of an input device according to an embodiment of the present invention.
一种输入装置300,包括:An
接收单元301,用于接收用户输入的编码字符串和/或语音输入。其中,所述接收单元301的具体实现可以参照图1所示实施例的步骤101而实现。The receiving
第一判断单元302,用于判断字符上屏区中光标焦点所在的位置是否为句首。其中,所述第一判断单元302的具体实现可以参照图1所示实施例的步骤102而实现。The
第二判断单元303,用于若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词。其中,所述第二判断单元303的具体实现可以参照图1所示实施例的步骤103而实现。The
调整单元304,用于若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。其中,所述第二判断单元304的具体实现可以参照图1所示实施例的步骤304而实现。The
在一些实施方式中,所述第一判断单元302具体用于:判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是否是语句结束符或者换行符;若判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是语句结束符或者换行符,确定所述字符上屏区中光标焦点所在的位置为句首。In some embodiments, the
在一些实施方式中,所述第一判断单元302具体用于:判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是否是字符;若判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象不是字符,确定所述字符上屏区中光标焦点所在的位置为句首。In some embodiments, the
在一些实施方式中,所述第一判断单元302具体用于:判断与输入法应用关联的进程是否为新启动的进程;若判断与输入法应用关联的进程为新启动的进程,确定所述字符上屏区中光标焦点所在的位置为句首。In some embodiments, the
在一些实施方式中,所述装置还包括:In some embodiments, the apparatus further comprises:
添加单元,用于若判断所述字符上屏区中光标焦点所在的位置为句首且判断在句首输入词集合中不存在与所述编码字符串和/或语音输入匹配的输入词,响应于用户针对匹配的输入词的选择操作,将用户选择的输入词添加至句首输入词集合,并标记所述候选输入词出现在句首位置的次数。The adding unit is configured to respond if it is judged that the position of the cursor focus in the upper screen area of the character is the beginning of a sentence and that there is no input word matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence Based on the user's selection operation for the matched input word, the input word selected by the user is added to the set of input words at the beginning of the sentence, and the number of times the candidate input word appears at the beginning of the sentence is marked.
在一些实施方式中,所述装置还包括:In some embodiments, the apparatus further comprises:
标记单元,用于若判断所述字符上屏区中光标焦点所在的位置为句首且判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,响应于用户针对匹配的输入词的选择操作,增加用户选择的输入词出现在句首位置的次数。The marking unit is used for judging that the position of the cursor focus in the upper screen area of the character is the beginning of a sentence and judging that there is an input word matching the encoded character string and/or voice input in the set of input words at the beginning of the sentence, in response to The user's selection operation for the matched input word increases the number of times that the input word selected by the user appears at the beginning of the sentence.
在一些实施方式中,所述调整单元304具体用于:若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,比较匹配的各输入词出现在句首位置的次数,调整匹配的各输入词的权重,其中,次数多的输入词的权重大于次数少的输入词的权重。In some embodiments, the adjusting
其中,本发明装置各单元或模块的设置可以参照图1至图2所示的方法而实现,在此不赘述。The setting of each unit or module of the apparatus of the present invention may be implemented with reference to the methods shown in FIG. 1 to FIG. 2 , and details are not described here.
参见图4,为根据一示例性实施例示出的一种用于网页收藏装置的框图。例如,装置400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。Referring to FIG. 4 , it is a block diagram of an apparatus for collecting webpages according to an exemplary embodiment. For example,
参照图4,装置400可以包括以下一个或多个组件:处理组件402,存储器404,电源组件406,多媒体组件408,音频组件410,输入/输出(I/O)的接口412,传感器组件414,以及通信组件416。4, the
处理组件402通常控制装置400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件402可以包括一个或多个处理器420来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件402可以包括一个或多个模块,便于处理组件402和其他组件之间的交互。例如,处理部件402可以包括多媒体模块,以方便多媒体组件408和处理组件402之间的交互。The
存储器404被配置为存储各种类型的数据以支持在设备400的操作。这些数据的示例包括用于在装置400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件406为装置400的各种组件提供电力。电源组件406可以包括电源管理系统,一个或多个电源,及其他与为装置400生成、管理和分配电力相关联的组件。
多媒体组件408包括在所述装置400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件408包括一个前置摄像头和/或后置摄像头。当设备400处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件410被配置为输出和/或输入音频信号。例如,音频组件410包括一个麦克风(MIC),当装置400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器404或经由通信组件416发送。在一些实施例中,音频组件410还包括一个扬声器,用于输出音频信号。
I/O接口412为处理组件402和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。The I/
传感器组件414包括一个或多个传感器,用于为装置400提供各个方面的状态评估。例如,传感器组件414可以检测到设备400的打开/关闭状态,组件的相对定位,例如所述组件为装置400的显示器和小键盘,传感器组件414还可以检测装置400或装置400一个组件的位置改变,用户与装置400接触的存在或不存在,装置400方位或加速/减速和装置400的温度变化。传感器组件414可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件414还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件414还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件416被配置为便于装置400和其他设备之间有线或无线方式的通信。装置400可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件414经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信部件414还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置400可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。In an exemplary embodiment,
具体地,本申请实施例提供了一种输入装置400,包括有存储器404,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器404中,且经配置以由一个或者一个以上处理器420执行所述一个或者一个以上程序包含用于进行以下操作的指令:接收用户输入的编码字符串和/或语音输入;判断字符上屏区中光标焦点所在的位置是否为句首;若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词;若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序。Specifically, the embodiments of the present application provide an
进一步地,所述处理器420具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是否是语句结束符或者换行符;若判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是语句结束符或者换行符,确定所述字符上屏区中光标焦点所在的位置为句首。Further, the
进一步地,所述处理器420具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象是否是字符;若判断所述字符上屏区内在用户输入编码字符串和/或语音输入之前的输出对象不是字符,确定所述字符上屏区中光标焦点所在的位置为句首。Further, the
进一步地,所述处理器420具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:判断与输入法应用关联的进程是否为新启动的进程;若判断与输入法应用关联的进程为新启动的进程,确定所述字符上屏区中光标焦点所在的位置为句首。Further, the
进一步地,所述处理器420具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:若判断所述字符上屏区中光标焦点所在的位置为句首且判断在句首输入词集合中不存在与所述编码字符串和/或语音输入匹配的输入词,响应于用户针对候选输入词的选择操作,将用户选择的候选输入词添加至句首输入词集合,并标记所述候选输入词出现在句首位置的次数。Further, the
进一步地,所述处理器420具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令:若判断所述字符上屏区中光标焦点所在的位置为句首且判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,响应于用户针对匹配的输入词的选择操作,增加用户选择的输入词出现在句首位置的次数。Further, the
进一步地,所述处理器420具体还用于执行所述一个或者一个以上程序包含用于进行以下操作的指令若判断在句首输入词集合中存在多个与所述编码字符串和/或语音输入匹配的输入词,比较匹配的各输入词出现在句首位置的次数,调整各匹配的输入词的权重,其中,次数多的输入词的权重大于次数少的输入词的权重。Further, the
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器404,上述指令可由装置400的处理器420执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an exemplary embodiment, there is also provided a non-transitory computer-readable storage medium including instructions, such as a
一种机器可读介质,例如该机器可读介质可以为非临时性计算机可读存储介质,当所述介质中的指令由装置(终端或者服务器)的处理器执行时,使得装置能够执行一种输入方法,所述方法包括:接收用户输入的编码字符串和/或语音输入;判断字符上屏区中光标焦点所在的位置是否为句首;若判断所述字符上屏区中光标焦点所在的位置为句首,判断在句首输入词集合中是否存在与所述编码字符串和/或语音输入匹配的输入词;其中,所述句首输入词集合包括出现在句首位置的各输入词;若判断在句首输入词集合中存在与所述编码字符串和/或语音输入匹配的输入词,提高匹配的输入词的权重,根据调整后的权重调整所述与所述编码字符串和/或语音输入对应的各候选输入词的排列顺序A machine-readable medium, for example, the machine-readable medium may be a non-transitory computer-readable storage medium, when the instructions in the medium are executed by the processor of the device (terminal or server), the device can execute a Input method, the method includes: receiving a coded string and/or voice input input by a user; judging whether the position where the cursor focus is located in the upper screen area of the character is the beginning of a sentence; The position is the beginning of a sentence, and it is judged whether there is an input word matching the encoded character string and/or the voice input in the set of input words at the beginning of the sentence; wherein, the set of input words at the beginning of the sentence includes each input word that appears at the beginning of the sentence. If it is judged that there is an input word matched with the encoded character string and/or voice input in the first sentence input word set, improve the weight of the matched input word, adjust the described encoded character string and / or the arrangement order of each candidate input word corresponding to the voice input
图5是本发明实施例中服务器的结构示意图。该服务器500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)522(例如,一个或一个以上处理器)和存储器532,一个或一个以上存储应用程序542或数据544的存储介质530(例如一个或一个以上海量存储设备)。其中,存储器532和存储介质530可以是短暂存储或持久存储。存储在存储介质530的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器522可以设置为与存储介质530通信,在服务器500上执行存储介质530中的一系列指令操作。FIG. 5 is a schematic structural diagram of a server in an embodiment of the present invention. The
服务器500还可以包括一个或一个以上电源526,一个或一个以上有线或无线网络接口550,一个或一个以上输入输出接口558,一个或一个以上键盘556,和/或,一个或一个以上操作系统541,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本发明的其它实施方案。本发明旨在涵盖本发明的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本发明的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本发明的真正范围和精神由下面的权利要求指出。Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. The present invention is intended to cover any modifications, uses or adaptations of the present invention that follow the general principles of the invention and include common knowledge or common technical means in the art not disclosed by this disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the invention being indicated by the following claims.
应当理解的是,本发明并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本发明的范围仅由所附的权利要求来限制It should be understood that the present invention is not limited to the precise structures described above and illustrated in the accompanying drawings, and that various modifications and changes may be made without departing from its scope. The scope of the present invention is limited only by the appended claims
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included in the protection of the present invention. within the range.
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。本发明可以在由计算机执行的计算机可执行指令的一般上下文中描述,例如程序模块。一般地,程序模块包括执行特定任务或实现特定抽象数据类型的例程、程序、对象、组件、数据结构等等。也可以在分布式计算环境中实践本发明,在这些分布式计算环境中,由通过通信网络而被连接的远程处理设备来执行任务。在分布式计算环境中,程序模块可以位于包括存储设备在内的本地和远程计算机存储介质中。It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including storage devices.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。以上所述仅是本发明的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for related parts. The device embodiments described above are only illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in One place, or it can be distributed over multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution in this embodiment. Those of ordinary skill in the art can understand and implement it without creative effort. The above are only specific embodiments of the present invention. It should be pointed out that for those skilled in the art, without departing from the principles of the present invention, several improvements and modifications can also be made. It should be regarded as the protection scope of the present invention.
Claims (12)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710501132.6A CN109144286B (en) | 2017-06-27 | 2017-06-27 | An input method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710501132.6A CN109144286B (en) | 2017-06-27 | 2017-06-27 | An input method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109144286A CN109144286A (en) | 2019-01-04 |
CN109144286B true CN109144286B (en) | 2022-08-02 |
Family
ID=64805298
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710501132.6A Active CN109144286B (en) | 2017-06-27 | 2017-06-27 | An input method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109144286B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111880668A (en) * | 2020-06-15 | 2020-11-03 | 维沃移动通信有限公司 | Input display method and device and electronic equipment |
CN117632106B (en) * | 2023-11-21 | 2024-07-16 | 广州致远电子股份有限公司 | Code complement method, device, equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101661331A (en) * | 2008-08-28 | 2010-03-03 | 北京搜狗科技发展有限公司 | Character and phrase input method and input method system |
CN101661466A (en) * | 2009-09-08 | 2010-03-03 | 刘道宇 | Sentence input method and sentence display mode thereof |
CN101989128A (en) * | 2009-08-03 | 2011-03-23 | 北京搜狗科技发展有限公司 | Method and device for showing candidate words in fixed position |
CN102081677A (en) * | 2011-02-17 | 2011-06-01 | 珠海全志科技有限公司 | Generation method of long sentences in Pinyin input method |
CN102750088A (en) * | 2012-06-04 | 2012-10-24 | 华为终端有限公司 | Method and electronic device for prompting character inputting |
CN104281649A (en) * | 2014-09-09 | 2015-01-14 | 北京搜狗科技发展有限公司 | Input method and device and electronic equipment |
CN106774970A (en) * | 2015-11-24 | 2017-05-31 | 北京搜狗科技发展有限公司 | The method and apparatus being ranked up to the candidate item of input method |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102109951A (en) * | 2010-12-30 | 2011-06-29 | 刘津立 | Method for inputting Chinese characters by combination of input characters and background hidden characters |
CN105549760B (en) * | 2016-01-27 | 2018-07-20 | 百度在线网络技术(北京)有限公司 | Data inputting method and device |
CN106468960A (en) * | 2016-09-07 | 2017-03-01 | 北京新美互通科技有限公司 | A kind of method and system of candidates of input method sequence |
-
2017
- 2017-06-27 CN CN201710501132.6A patent/CN109144286B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101661331A (en) * | 2008-08-28 | 2010-03-03 | 北京搜狗科技发展有限公司 | Character and phrase input method and input method system |
CN101989128A (en) * | 2009-08-03 | 2011-03-23 | 北京搜狗科技发展有限公司 | Method and device for showing candidate words in fixed position |
CN101661466A (en) * | 2009-09-08 | 2010-03-03 | 刘道宇 | Sentence input method and sentence display mode thereof |
CN102081677A (en) * | 2011-02-17 | 2011-06-01 | 珠海全志科技有限公司 | Generation method of long sentences in Pinyin input method |
CN102750088A (en) * | 2012-06-04 | 2012-10-24 | 华为终端有限公司 | Method and electronic device for prompting character inputting |
CN104281649A (en) * | 2014-09-09 | 2015-01-14 | 北京搜狗科技发展有限公司 | Input method and device and electronic equipment |
CN106774970A (en) * | 2015-11-24 | 2017-05-31 | 北京搜狗科技发展有限公司 | The method and apparatus being ranked up to the candidate item of input method |
Also Published As
Publication number | Publication date |
---|---|
CN109144286A (en) | 2019-01-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017114020A1 (en) | Speech input method and terminal device | |
US10296201B2 (en) | Method and apparatus for text selection | |
WO2017088247A1 (en) | Input processing method, device and apparatus | |
CN104268151A (en) | Contact person grouping method and device | |
CN110929122A (en) | Data processing method and device and data processing device | |
CN109144286B (en) | An input method and device | |
CN109901726B (en) | Candidate word generation method and device and candidate word generation device | |
US20160349947A1 (en) | Method and device for sending message | |
CN110389666B (en) | Input error correction method and device | |
CN110780749B (en) | Character string error correction method and device | |
CN112015281B (en) | Cloud association method and related device | |
CN103970831A (en) | Icon recommending method and device | |
WO2019214234A1 (en) | Input prediction method and device | |
CN112905023B (en) | Input error correction method, device and device for input error correction | |
CN112068793B (en) | Voice input method and device | |
CN111273786B (en) | Intelligent input method and device | |
CN109917927B (en) | A candidate determination method and device | |
CN109388328B (en) | Input method, device and medium | |
CN109271037B (en) | A method and device for establishing an error correction thesaurus | |
CN108983992B (en) | Method and device for displaying candidate items with punctuation marks | |
CN107688400B (en) | Input error correction method and device for input error correction | |
CN114967939B (en) | Input method, device and medium | |
CN114594861B (en) | Recommendation method and device and electronic equipment | |
CN111427459B (en) | Method and related device for optimizing input during user communication | |
CN111124141B (en) | Neural network model training method and device for determining candidate items |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TG01 | Patent term adjustment | ||
TG01 | Patent term adjustment |