This application claims priority to Chinese Patent Application No. 201210070159.1, filed on Mar. 16, 2012, which is hereby incorporated by reference in its entirety.
The present invention relates to the field of communication technologies, and in particular, to an input method, an input apparatus, and a terminal.
At present, all Chinese input methods are capable of making association only according to frequently used words when a user inputs a character. For example, when we input characters “lianx” by using the Sogou pinyin input method, the input method may automatically display such words as “”, “”, “”, “”, and “”, thereby facilitating the input. When we do not input characters, the cursor is located somewhere in a file.
The Chinese/English input method may be used to associate words according to social hot expressions, sports terms, and frequently used information words when the user inputs characters, which can speed up the typing and increase the input efficiency. However, this association method is used only when Pinyin characters are input.
During the research and practice of the prior art, the inventor of the present invention discovers that the input method in the prior art is capable of associating related expressions only when characters are input; once the user presses an input end key, for example, the space key, to end the input of a character or a word, no association is made.
Embodiments of the present invention provide an input method, which is capable of associating a next text according to an input previous text for a user to select after the user presses an input end key to end the input of a character or a word, so that the input efficiency is increased. The embodiments of the present invention also provide an input apparatus and a terminal.
An input method includes:
receiving input end indication information sent by an input module, where the input end indication information indicates that input of a character or a word ends;
obtaining a location of a cursor;
identifying the input character or word forward from the location of the cursor until a first punctuation input before the character or the word is identified;
using the identified character or word as a previous text, and querying a word library for a next text associated with the previous text; and
outputting the associated next text to a display module for displaying.
An input apparatus includes:
a receiving unit, configured to receive input end indication information, where the input end indication information indicates that input of a character or a word ends;
an obtaining unit, configured to obtain a location of a cursor after the receiving unit receives the input end indication information;
an identifying unit, configured to identify the input character or word forward from the location of the cursor obtained by the obtaining unit until a first punctuation input before the character or the word is identified;
a querying unit, configured to use the character or the word identified by the identifying unit as a previous text, and query a word library for a next text associated with the previous text; and
an outputting unit, configured to output the next text, which is found by the querying unit and associated with the previous text, to a display module for displaying.
A terminal includes an input apparatus, an input module, and a display module, where:
the input module inputs, to the input apparatus, input end indication information of a character or a word, where the input end indication information indicates that input of the character or the word ends;
the input apparatus obtains a location of a cursor after receiving the input end indication information of the character or the word; identifies the input character or word forward from the location of the cursor until a first punctuation input before the character or the word is identified; uses the identified character or word as a previous text, and queries a word library for a next text associated with the previous text; and outputs the associated next text; and
the display module displays the next text input by the input apparatus for a user to select to input.
In the embodiments of the present invention, input end indication information sent by an input module is received, where the input end indication information indicates that input of a character or a word ends; a location of a cursor is obtained; the input character or word is identified forward from the location of the cursor until a first punctuation is identified; the identified character or word are used as a previous text, and a word library is queried for a next text associated with the previous text; the associated next text is output to a display module for displaying. Compared with the prior art, the input method provided in the embodiments of the present invention is capable of associating a next text according to an input previous text for the user to select after the user presses an input end key, for example, the space key, to end the input of a character or a word, so that the input efficiency is increased.
An embodiment of the present invention provides an input method, which is capable of associating a next text according to an input previous text for a user to select after the user presses an input end key, for example, the space key, to end the input of a character or a word, so that the input efficiency is increased. An embodiment of the present invention also provides an input apparatus and a terminal. The embodiments are respectively described in detail below.
Referring to
101. An input apparatus receives input end indication information sent by an input module, where the input end indication information indicates that input of a character or a word ends.
The input module may be a module having an input function, for example, a computer keyboard, handset keys, and the like.
The input end indication information is implemented by the user by pressing an input end key, for example, the space key, and the like. If the input apparatus receives the input end indication information, it means that input of the previous input character or word is completed. The input end indication information of the Chinese input method and that of the English input method are the same, and the input end indication information is sent when the user presses the space key or a punctuation key.
102. Obtain a location of a cursor.
The input method in the prior art is capable of making association according to frequently used words only when characters are input. For example, when we input characters “lianx” by using the Sogou pinyin input method, the input method may automatically display such words as “”, “”, “”, “”, and “”. When the input of characters is completed, for example, when the words “” are input, the cursor is located after the word “” and the input method displays nothing until the user inputs a character again.
By using the input method provided in the embodiment of the present invention, when a user presses an input end key, for example, the space key, to end the input of a character or a word, a next text may be associated according to the input previous text, that is, when the cursor is located after a character or a word, the input method may be used to associate an expression or a sentence related to the input character or word, for example, when the expression “” is input and the cursor is located after the word “”, the input method provided in the embodiment of the present invention may associate the expression “”. In this way, the user can directly select the displayed “”, without the need of inputting any character.
For the input apparatus, after the user inputs the input end indication information of a character or a word by using the input module, the input apparatus begins to obtain the location of the cursor.
103. Identify the input character or word forward from the location of the cursor until a first punctuation input before the character or the word is identified.
A next text needs to be associated according to the previous text; the range of previous text contents needs to be firstly determined; the previous text contents provided in the embodiment of the present invention refer to a segment of contents starting from the location of the cursor to the identified first punctuation. For example, when the input characters include “: ,” and the cursor is located after the word “” or after the comma “,”, according to the method in step 101, it is firstly determined that the cursor is located after the word “” or after the comma “,”, and then the input characters are identified forward from the location of the cursor until the colon “:” input before the characters or the words is identified; and the identified segment of contents “” is used as the previous text contents.
Only a Chinese example is provided herein. Actually, English may also be input, for example, if “teacher said: good good study,” is input and the cursor is located at an adjacent location after the comma “,”, “good good study” may be used as a previous text, so that a corresponding next text is associated.
104. Use the identified character or word as a previous text, and query a word library for a next text associated with the previous text.
In step 103, a segment of a character or a word starting from the location of the cursor to the identified first punctuation input before the character or the word is identified, and the identified character or word are used as the previous text; and the word library is queried for a next text associated with the previous text. The specific querying solution includes:
querying the word library for all expressions and sentences including the previous text, and using an expression or a sentence that exists in the found expressions and sentences but does not exist in the previous text as a next text; for example, if the previous text is “”, it may be found that a sentence including “” is a line in the poem “”, that is, “, ”. In this way, when the cursor is located after the word “”, it is determined that the next text associated with the previous text is “, ”; when the cursor is located after the comma “,”, it is determined that the next text is “”.
When the previous text is “good good study”, it may be found that a sentence including “good good study” is “good good study, day day up”; when the cursor is located after the comma “,”, a next text associated with the previous text is “day day up”.
The example illustrated in the foregoing solution is special, that is, it is a poem, where a whole sentence can be associated. Actually, sometimes it is not necessary to use an input segment of words for query and association based on the entire previous text, for example, if the input previous text is “” and the cursor is located after the word “”, an expression or a sentence including the previous text “” may not exist according to the foregoing solution. At this time, no next text may be associated. In this case, the embodiment of the present invention also provides another association solution. Specific details are as follows:
The previous text is grouped according to an input sequence and frequently used words, and a last input group of characters or words is used as an index; the word library is queried for expressions and sentences including the index, and an expression or a sentence that exists in the found expressions and sentences but does not exist in the index is used as the next text. The group last input according to the input time sequence is a group closest to the location of the cursor.
For example, according to this solution, the previous text is “”, which can be divided into two groups, namely, “” and “”; according to the input time sequence, the “” is the last input group. In this case, the group “” is the group closest to the location of the cursor; “” is used as an index to query for an expression and a sentence including the “”, and an expression like “” can be found easily. In this way, “” can be used as the next text of the index “” according to this solution.
105. Output the associated next text to a display module for displaying.
In step 104, multiple next texts may be associated. For example, when the previous text is “”, the associated next text may include a series of expressions, such as “”, “”, and “”. The input apparatus outputs these expressions to a display module, for example, a display screen for displaying. At this time, the user may select an associated next text directly according to actual needs, without the need of inputting pinyin or words, thereby increasing the input efficiency of the input method.
In the embodiment of the present invention, input end indication information sent by an input module is received, where the input end indication information indicates that input of a character or a word ends; a location of a cursor is obtained; the input character or word is identified forward from the location of the cursor until a first punctuation is identified; the identified character or word is used as a previous text, and a word library is queried for a next text associated with the previous text; the associated next text is output to a display module for displaying. Compared with the prior art, according to the input method provided in the embodiment of the present invention, it is capable of associating a next text according to an input previous text for the user to select after the user presses an input end key, for example, the space key, to end the input of a character or a word, so that the input efficiency is increased.
Referring to
a receiving unit 201, configured to receive input end indication information sent by an input module, where the input end indication information indicates that input of a character or a word ends;
an obtaining unit 202, configured to obtain a location of a cursor after the receiving unit 201 receives the input end indication information;
an identifying unit 203, configured to identify the input character or word forward from the location of the cursor obtained by the obtaining unit 202 until a first punctuation input before the character or the word is identified;
a querying unit 204, configured to use the character or the word identified by the identifying unit 202 as a previous text, and query a word library for a next text associated with the previous text; and
an outputting unit 205, configured to output the next text, which is found by the querying unit 204 and associated with the previous text, to a display module for displaying.
In the embodiment of the present invention, the receiving unit 201 receives input end indication information sent by an input module, where the input end indication information indicates that input of a character or a word ends; after the receiving unit 201 receives the input end indication information, the obtaining unit 202 obtains a location of a cursor; the identifying unit 203 identifies the input character or word forward from the location of the cursor obtained by the obtaining unit 202 until a first punctuation input before the character or the word is identified; the querying unit 204 uses the character or the word identified by the identifying unit 202 as a previous text, and queries a word library for a next text associated with the previous text; the outputting unit 205 outputs the next text, which is found by the querying unit 204 and associated with the previous text, to a display module for displaying. The input apparatus provided in the embodiment of the present invention is capable of associating a next text according to an input previous text for the user to select after the user presses an input end key, for example, the space key, to end the input of a character or a word, so that the input efficiency is increased.
On the basis of the embodiment illustrated in
the querying unit 204 is specifically configured to query the word library for all expressions and sentences including the previous text, and use an expression or a sentence that exists in the found expressions and sentences but does not exist in the previous text as a next text.
Referring to
a grouping unit 206, configured to group the previous text according to an input sequence and a frequently used word, and use a last input group of a character or a word as an index; where
the querying unit 204 is specifically configured to query the word library for expressions and sentences including the index determined by the grouping unit 206, and use an expression or a sentence that exists in the found expressions and sentences but does not exist in the index as a next text.
The input apparatus provided in the embodiment of the present invention is capable of associating a next text according to an input previous text for the user to select after the user presses an input end key to end the input of a character or a word, so that the input efficiency is increased.
In the input apparatus provided in the embodiment of the present invention, the receiving unit, the obtaining unit, the identifying unit, the querying unit, the outputting unit, and the grouping unit may be parts of a processor. The functions of these units may be executed by the processor.
The input apparatus provided in the embodiment of the present invention may be a processor.
Referring to
The input module 10 is configured to input, to the input apparatus, input end indication information of a character or a word, where the input end indication information indicates that input of the character or the word ends.
The input apparatus 20 is configured to: obtain a location of a cursor after receiving the input end indication information of the character or the word; identify the input character or word forward from the location of the cursor until a first punctuation input before the character or the word is identified; use the identified character or word as a previous text, and query a word library for a next text associated with the previous text; and output the associated next text.
The display module 30 is configured to display the next text input by the input apparatus for a user to select to input.
The terminal provided in the embodiment of the present invention is capable of associating a next text according to an input previous text for the user to select after the user presses an input end key to end the input of a character or a word, so that the input efficiency is increased.
The terminal provided in the embodiment of the present invention is not limited to such devices as a handset, a portable computer, and a desktop computer. The input method provided in the embodiments of the present invention is not limited to the Chinese input method or the English input method.
Persons of ordinary skill in the art may understand that all or part of the steps of the methods in the foregoing embodiments may be implemented by a computer program instructing relevant hardware. The program may be stored in a computer readable storage medium. The storage medium may include a ROM, a RAM, a magnetic disk, or an optical disk, and so on.
An input method, an input apparatus, and a terminal that are provided in the embodiments of the present invention are introduced in detail in the foregoing. Specific examples are used for illustrating principles and implementation manners of the present invention. The foregoing descriptions of the embodiments are merely used to help understand the methods and core ideas of the present invention. Meanwhile, persons of ordinary skill in the art may make modifications to the specific implementation manners and application scopes according to the idea of the present invention. In conclusion, the content of the specification shall not be construed as a limitation to the present invention.
Number | Date | Country | Kind |
---|---|---|---|
2012 1 0070159 | Mar 2012 | CN | national |
Number | Name | Date | Kind |
---|---|---|---|
7809719 | Furuuchi et al. | Oct 2010 | B2 |
9659002 | Medlock | May 2017 | B2 |
20020019731 | Masui et al. | Feb 2002 | A1 |
20020038207 | Mori et al. | Mar 2002 | A1 |
20050017954 | Kay et al. | Jan 2005 | A1 |
20080072143 | Assadollahi | Mar 2008 | A1 |
20080195571 | Furuuchi | Aug 2008 | A1 |
20080204421 | Hsu | Aug 2008 | A1 |
20090234632 | Hasegawa et al. | Sep 2009 | A1 |
20110093497 | Poon | Apr 2011 | A1 |
20120117101 | Unruh | May 2012 | A1 |
20130275119 | Wei et al. | Oct 2013 | A1 |
Number | Date | Country |
---|---|---|
1389778 | Jan 2003 | CN |
1908864 | Feb 2007 | CN |
1908866 | Feb 2007 | CN |
101308515 | Nov 2008 | CN |
101634905 | Jan 2010 | CN |
101957724 | Jan 2011 | CN |
102629160 | Aug 2012 | CN |
09069086 | Mar 1997 | JP |
11212967 | Aug 1999 | JP |
2007-506184 | Mar 2007 | JP |
2011-138252 | Jul 2011 | JP |
WO 2005036413 | Apr 2005 | WO |
Entry |
---|
Masui, “An Efficient Text Input Method for Pen-based Computers”, 1998, In Proceedings of CHI'98, pp. 328-335. |
Number | Date | Country | |
---|---|---|---|
20130275119 A1 | Oct 2013 | US |