CN109426359B - Input method, device and machine readable medium - Google Patents

Input method, device and machine readable medium Download PDF

Info

Publication number
CN109426359B
CN109426359B CN201710792125.6A CN201710792125A CN109426359B CN 109426359 B CN109426359 B CN 109426359B CN 201710792125 A CN201710792125 A CN 201710792125A CN 109426359 B CN109426359 B CN 109426359B
Authority
CN
China
Prior art keywords
character string
string
candidate
syllable
completion
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
Application number
CN201710792125.6A
Other languages
Chinese (zh)
Other versions
CN109426359A (en
Inventor
王凌云
刘辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sogou Technology Development Co Ltd
Original Assignee
Beijing Sogou Technology Development Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Sogou Technology Development Co Ltd filed Critical Beijing Sogou Technology Development Co Ltd
Priority to CN201710792125.6A priority Critical patent/CN109426359B/en
Publication of CN109426359A publication Critical patent/CN109426359A/en
Application granted granted Critical
Publication of CN109426359B publication Critical patent/CN109426359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements 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/0233Character input methods
    • G06F3/0237Character input methods using prediction or retrieval techniques

Abstract

The embodiment of the invention provides an input method, an input device and a machine readable medium, wherein the method specifically comprises the following steps: receiving an input string input by a user; if the input string is a full spelling string, performing final syllable completion on the full spelling string to obtain a corresponding complete character string; determining a candidate item corresponding to the completion character string; and sorting the candidate items corresponding to the completion character string. By the input scheme provided by the embodiment of the invention, the full spelling character string expected to be input by the user can be obtained by complementing the last syllable, so that the key cost of the user can be saved, and the input efficiency of the user is improved.

Description

Input method, device and machine readable medium
Technical Field
The present invention relates to the field of input methods, and in particular, to an input method, an input device, and a machine-readable medium.
Background
With the popularization and development of computer technology and internet technology, input method programs have become important tools for users to interact with computers. Users in different professional fields, different interests and use habits have higher and higher requirements on the intelligence of input method programs.
In the input process of the existing input method program, corresponding candidate items can be provided for a user according to a pinyin input string input by the user. The obtaining process of the candidate may include: if the pinyin input string is a simple pinyin character string, acquiring a corresponding candidate item aiming at a full pinyin character string corresponding to the simple pinyin character string; and if the pinyin input string is a full pinyin character string, directly acquiring a corresponding candidate item aiming at the pinyin input string.
In practical applications, in the case that the number of characters contained in the full spelling string is large, the user usually needs to obtain the required candidate item through a large number of times of pressing keys, which undoubtedly affects the input efficiency. For example, if the user inputs "door and window" through the pinyin character string "menchuang" in advance, the "people go through" waiting option provided by the input method program does not meet the input intention of the user when the user inputs the pinyin character string such as "menchua" input before the user inputs "menchuang", and the user needs to enter all the characters contained in the pinyin character string to obtain the required candidate, so that the user needs to spend more key-press cost and input time.
Disclosure of Invention
The embodiment of the invention provides an input method, an input device and a machine readable medium, which can save the key cost of a user and improve the input efficiency of the user.
In order to solve the above problem, in one aspect, an embodiment of the present invention discloses an input method, where the method includes: receiving an input string input by a user; if the input string is a full spelling string, performing final syllable completion on the full spelling string to obtain a corresponding complete character string; determining a candidate item corresponding to the completion character string; and sorting the candidate items corresponding to the completion character string.
In another aspect, an embodiment of the present invention discloses an input device, including: the receiving module is used for receiving an input string input by a user; the completion module is used for performing tail syllable completion on the full-spelling character string to obtain a corresponding completion character string if the input string is the full-spelling character string; the first determining module is used for determining the candidate item corresponding to the completion string; and the sorting module is used for sorting the candidate items corresponding to the completion character strings.
Optionally, the completion module is specifically configured to:
and when the candidate items corresponding to the full spelling character string are not in the preset word bank, performing final syllable completion on the full spelling character string.
Optionally, the completion module includes:
the syllable complementing submodule is used for complementing the tail syllable corresponding to the full spelling character string to obtain a corresponding complemented syllable;
and the replacing submodule is used for replacing the last syllable by the complementary syllable to obtain a complementary character string corresponding to the full spelling character string.
Optionally, the first determining module is specifically configured to:
and searching the entry corresponding to the completion character string from a preset word bank as a candidate item corresponding to the completion character string.
Optionally, the apparatus further comprises:
the second determining module is used for determining candidate items corresponding to the full spelling character string;
the sorting module is specifically configured to: and sorting the candidate items corresponding to the complementing character strings and the candidate items corresponding to the full spelling character strings.
Optionally, the candidate corresponding to the completion string includes: a system candidate and a user candidate, the user candidate being ranked ahead of the system candidate.
Optionally, the candidate corresponding to the completion string includes: system candidate and user candidate, the ranking module comprising:
the score determining sub-module is used for respectively determining candidate items corresponding to the completion character strings and ranking scores corresponding to the candidate items corresponding to the spelling character strings;
the first ordering submodule is used for carrying out first ordering on the user candidate items according to the ordering scores; performing second sorting on the system candidate items and the candidate items corresponding to the full spelling character string according to the sorting scores;
and the second sequencing submodule is used for sequencing the obtained first sequencing result and the second sequencing result in sequence.
Optionally, the score determining submodule includes:
the adjusting unit is used for adjusting the word frequency corresponding to the system candidate item;
and the ranking score determining unit is used for determining the ranking score corresponding to each system candidate item according to the adjusted word frequency, wherein the word frequency is in inverse proportion to the ranking score.
In yet another aspect, an embodiment of the present invention discloses a device 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 executed by one or more processors, the one or more programs including instructions for: receiving an input string input by a user; if the input string is a full spelling string, performing final syllable completion on the full spelling string to obtain a corresponding complete character string; determining a candidate item corresponding to the completion character string; and sorting the candidate items corresponding to the completion character string.
In yet another aspect, the present invention also discloses a machine-readable medium, on which instructions are stored, which when executed by one or more processors, cause an apparatus to perform any one of the input methods as described in the present invention.
Compared with the prior art, the embodiment of the invention has the following advantages:
the input method, the input device and the machine readable medium provided by the embodiment of the invention can be used for performing final syllable completion on the full spelling character string input by a user and displaying the candidate item corresponding to the obtained complete character string. The embodiment of the invention can obtain the full spelling character string expected to be input by the user through the final syllable complement, thereby saving the key cost of the user and improving the input efficiency of the user.
In addition, the embodiment of the invention displays the candidate item based on the full spelling character string expected to be input by the user, thereby improving the reliability of the candidate item and improving the use experience of the user.
Drawings
FIG. 1 is a flow chart of the steps of an input method according to a first embodiment of the invention;
FIG. 2 is a flow chart of the steps of an input method according to a second embodiment of the invention;
fig. 3 is a block diagram of an input device according to a third embodiment of the present invention;
fig. 4 is a block diagram of an input device according to a fourth embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for inputting according to a fifth embodiment of the present invention;
fig. 6 is a block diagram of a server according to a fifth embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The embodiment of the present invention may be applied to input method programs of input modes such as keyboard symbol input, handwriting input, and the like, and for convenience of description, the embodiment of the present invention refers to a code character string input by a user in the above input modes as an input string. In the field of input methods, for input method programs in, for example, chinese, japanese, korean, or other languages, an input string input by a user may be generally converted into a candidate for a corresponding language. The input process of the embodiment of the invention is mainly explained by taking Chinese as an example, and other languages can be referred to each other. It is to be understood that the chinese input method may include, but is not limited to, a full pinyin and the like, and the embodiment of the present invention does not limit a specific input method program corresponding to a certain language.
The input method program can be run on the intelligent terminal, and the intelligent terminal specifically includes but is not limited to: smart phones, tablet computers, e-book readers, MP3 (moving Picture Experts Group Audio Layer III) players, MP4 (moving Picture Experts Group Audio Layer IV) players, laptop portable computers, car-mounted computers, desktop computers, set-top boxes, smart televisions, wearable devices, and the like.
According to some embodiments, the input string may include, but is not limited to: a key symbol or a combination of a plurality of key symbols input by a user through a key. The key symbol may specifically include: pinyin, strokes, kana, etc.
Example one
Referring to fig. 1, a flowchart illustrating steps of an input method according to a first embodiment of the present invention is shown.
The input method of the embodiment of the invention comprises the following steps:
step 101, receiving an input string input by a user.
The input string entered by the user may be a full pinyin string or a non-full pinyin string. The input method program can judge whether the character string input by the user is a full spelling character string through the preset syllables; specifically, if the string hits a predetermined syllable (i.e., the string matches a predetermined syllable), the string is determined to be a full-spelling string. The syllable is the smallest phonetic structure unit formed by phoneme combination, and the preset syllable can be the syllable in accordance with the language rule, for example, the number of syllables in accordance with the Chinese rule can exceed 421.
And 102, if the input string is a full spelling string, performing final syllable completion on the full spelling string to obtain a corresponding complete character string.
In practical applications, the full-spelling string may be segmented into a plurality of sub-strings according to a preset syllable, wherein one sub-string may correspond to one preset syllable. In the embodiment of the invention, the last syllable is complemented. The last syllable, i.e. the syllable contained in the full pinyin string, is positioned last. For example: the full spelling string is ' menchua ', the segmentation result is ' men ' chua ', and the ' chua ' is the last syllable.
The process of end syllable completion for the full pinyin string may include: matching characters for the last syllable by taking the last syllable as a prefix to obtain at least one complete syllable; and finally, combining the initial consonants and the expanded vowels into complete syllables. And replacing the last syllable by the complementing syllable to obtain a corresponding complementing character string. For example: the syllable "chua" is complemented to obtain complemented syllables "chuai", "chuan" and "chuang", and the complemented character strings are "men ' chuai", "men ' chuan" and "men ' chuang", respectively.
And 103, determining candidate items corresponding to the complementary character strings.
The candidate item corresponding to the character string can be obtained by searching the preset word bank aiming at the complete character string. The preset word stock can be a user word stock, a system word stock and the like.
The user word bank is used for storing the entries input by the user and the corresponding word frequency. In practical application, the content on the screen input by the user can be recorded as entries to the user word stock. In practical applications, the user thesaurus corresponding to the user can be obtained through the user account and/or the device identification. The user account may be an account registered by the user, and the device identifier may be an identifier of a device used by the user.
The system word stock can be used for storing entries obtained by the input method program and corresponding word frequencies.
In the embodiment of the present invention, the candidate items obtained from the user lexicon may be referred to as user candidate items, the candidate items obtained from the system lexicon may be referred to as system candidate items, and the user candidate items and the system candidate items may participate in the ranking and presentation of the candidate items together.
Of course, in addition to the user lexicon and the system lexicon, the preset lexicon may further include: cell thesaurus, multi-element thesaurus, professional thesaurus and the like, and the embodiment of the invention does not limit the specific preset thesaurus.
And 104, sorting the candidate items corresponding to the completion character strings.
Since multiple candidates may be determined in step 103, the candidates need to be sorted.
A preferred preset ordering rule may be: the user candidates take precedence over the system candidates. The preset sorting rule can recommend the user candidate preference to the user in the process that the user uses the input method for a long time, so that the personalized requirements of the user in the character input are met, and the user preference rate is improved. In addition, the priority of the candidate item corresponding to the completion character string can be set to be higher than the priority of the candidate item of the spelling character string input by the user, and the sorting rule can effectively avoid the problem of the mixed arrangement of the candidate item obtained by the spelling character string input by the user and the candidate item corresponding to the completion character string.
In summary, the input method provided by the embodiment of the present invention can perform final syllable completion on the pinyin character string input by the user, and display the candidate item corresponding to the obtained complete character string. The embodiment of the invention can obtain the full spelling character string expected to be input by the user through the final syllable complement, thereby saving the key cost of the user and improving the input efficiency of the user.
In addition, the embodiment of the invention displays the candidate item based on the full spelling character string expected to be input by the user, thereby improving the reliability of the candidate item and improving the use experience of the user.
Example two
Referring to fig. 2, a flowchart illustrating steps of an input method according to a second embodiment of the present invention is shown.
The input method of the embodiment of the invention specifically comprises the following steps:
step 201, receiving an input string input by a user.
Step 202, if the input string is a full spelling string, determining a candidate item corresponding to the full spelling string.
When the candidate item corresponding to the full spelling character string is determined, the candidate item matched with the full spelling character string in each preset word stock is searched, if the candidate item matched with the full spelling character string does not exist in the word stock, the full spelling character string is cut into a plurality of sub character strings, each sub character string corresponds to at least one syllable, the corresponding character is determined aiming at each syllable, and finally the candidate items are combined.
In an optional embodiment of the present invention, it is determined whether all the candidate items corresponding to the full-spelling character string miss the preset lexicon, if yes, the last syllable completion is performed on the full-spelling character string to obtain a corresponding complete-complement character string; and if not, displaying the candidate item corresponding to the full spelling character string. By judging whether the candidate item hitting the preset word stock exists or not, the quality condition of the candidate item corresponding to the full spelling character string can be judged. Specifically, if none of the predetermined lexicons is hit, the candidate quality is not ideal, and the final syllable of the full-spelling string needs to be complemented, which is specifically implemented as shown in steps 203 to 204.
The preset word stock can be a user word stock, a system word stock and the like; correspondingly, if the candidate items of the user or the system exist, the quality of the candidate items is ideal; otherwise, if the candidate items do not have the user candidate items or the system candidate items, or the number of the candidate items is smaller than the preset value, the quality of the candidate items is not ideal. The user candidate items are entries matched with the full spelling character strings in the user word bank; the system candidate is the entry matched with the full spelling character string in the system word stock.
And 203, completing the last syllable corresponding to the full spelling character string to obtain a corresponding completed syllable when the candidate items corresponding to the full spelling character string do not hit the preset word bank.
And step 204, replacing the last syllable by the complementary syllable to obtain a complementary character string corresponding to the full spelling character string.
One or more completion strings corresponding to the full spelling string may be used, and after the completion strings are obtained, the candidate item corresponding to each completion string needs to be determined, where the specific determination manner is shown in step 205.
And step 205, searching the entry corresponding to the completion character string from the preset word library as a candidate item corresponding to the completion character string.
The preset lexicon may include, but is not limited to, at least one of the following lexicons: a user thesaurus and a system thesaurus. Specifically, the preset lexicon may be set as only the user lexicon or only the system lexicon, and certainly, the preset lexicon may also be set as the user lexicon and the system lexicon.
When the preset word stock is the user word stock and the system word stock, the candidate items corresponding to the complete character strings comprise: system candidates and user candidates.
In the embodiment of the invention, after the candidate items corresponding to the full spelling character string and the candidate items corresponding to the complement character string are determined, the determined candidate items are ranked. Therefore, in order to ensure the reliability of the recommended candidate, in the embodiment of the present invention, the user candidate corresponding to the completion string is ranked in front of the system candidate corresponding to the completion string and the candidate corresponding to the spelling string, and the specific ranking manner is as described in step 206 to step 208.
And step 206, determining the ranking scores corresponding to the candidate item corresponding to the complementary full character string and the candidate item corresponding to the full spelling character string respectively.
When determining the ranking score corresponding to the candidate item, the word frequency corresponding to the candidate item may be determined first, and the ranking score of the candidate item may be calculated according to the word frequency corresponding to each candidate item.
One preferred way to determine the ranking scores corresponding to the candidate corresponding to the complement string and the candidate corresponding to the spell string is as follows:
firstly, adjusting the word frequency corresponding to a system candidate item;
and adjusting the word frequency corresponding to the system candidate item to punish the word frequency for the system candidate item. When the word frequency is adjusted, the word frequency corresponding to the system candidate item may be increased by a preset value, multiplied or divided by a preset coefficient, and the like. The preset value and the preset coefficient may be set by those skilled in the art according to actual requirements, and are not particularly limited in the embodiment of the present invention. Taking the example that the word frequency corresponding to the system candidate item is increased by a preset value, if the preset value is X and the word frequency corresponding to the system candidate item is Y, the adjusted word frequency is X + Y.
The word frequency corresponding to the user candidate item and the word frequency corresponding to the candidate item corresponding to the full spelling string may not be adjusted.
And secondly, determining a sorting score corresponding to each system candidate item according to the adjusted word frequency.
Wherein the word frequency is inversely proportional to the rank score.
The ranking rules of the system candidate items and the candidate items corresponding to the full-spelling character string are different from the ranking rules of the user candidate items, and the ranking rules of the system candidate items and the candidate items corresponding to the full-spelling character string may be: the smaller the word frequency value is, the better the quality of the entry is, and the better the entry is, the better the entry is pushed to the user; and the larger the frequency value of the candidate term of the user is, the better the quality of the term is, and the more preferentially the term is pushed to the user.
In the preferred mode, word frequency punishment processing is carried out on the system candidate items, and the ranking scores of the system candidate items are calculated according to the word frequency subjected to punishment processing. And for each determined user candidate item, not carrying out word frequency punishment, and directly calculating the ranking score of each user candidate item according to the word frequency corresponding to each user candidate item. And for the candidate items corresponding to the full spelling character string, calculating the ranking scores of the candidate items directly according to the word frequency corresponding to the candidate items.
And step 207, performing first sorting on the user candidate items according to the sorting scores, and performing second sorting on the system candidate items and the candidate items corresponding to the full spelling character strings according to the sorting scores.
The method comprises the steps of sorting user candidate items individually to obtain a first sorting result; and comprehensively sorting the system candidate items and the candidate items corresponding to the full spelling character creation to obtain a second sorting result.
And step 208, sequencing the obtained first sequencing result and the second sequencing result in turn.
In the embodiment of the invention, in order to improve the user preference rate, the user candidate items are ranked at the top in the final ranking, the system candidate items are ranked secondly, and the candidate items corresponding to the full spelling character strings are ranked finally.
The input method in the embodiment of the invention is suitable for the full spelling character string, and the non-full spelling character string is processed by adopting the prior art, which is not specifically explained in the embodiment of the invention.
The input method provided by the embodiment of the invention has the beneficial effects of the input method shown in the first embodiment, the condition for triggering the final syllable completion of the full-spelling character string is increased, and the final syllable completion of the full-spelling character string is carried out only when the quality of the candidate item of the preset word bank is determined not to be met by the candidate items corresponding to the full-spelling character string; otherwise, the final syllable completion is not carried out on the full spelling character string, and unnecessary character string completion operation can be avoided, so that the work load of the input method client side is reduced.
EXAMPLE III
Referring to fig. 3, a block diagram of an input device according to a third embodiment of the present invention is shown.
The input device of the embodiment of the invention may include: a receiving module 301, configured to receive an input string input by a user; a completion module 302, configured to perform final syllable completion on the full-pinyin character string to obtain a corresponding complete character string if the input string is the full-pinyin character string; a first determining module 303, configured to determine a candidate item corresponding to the completion string; and the sorting module 304 is configured to sort the candidate items corresponding to the completion string.
By the input device provided by the embodiment of the invention, the final syllable completion of the full spelling character string input by the user can be carried out, and the candidate item corresponding to the obtained complete character string is displayed. According to the embodiment of the invention, the full spelling character string expected to be input by the user can be obtained through the tail syllable completion, so that the key pressing cost of the user can be saved, and the input efficiency of the user is improved.
In addition, the embodiment of the invention sorts the candidate items based on the full spelling character string expected to be input by the user, so that the reliability of the candidate items can be improved, and the use experience of the user can be improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of motion combinations, but those skilled in the art should understand that the present invention is not limited by the described motion sequences, because some steps may be performed in other sequences or simultaneously according to the present invention. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred and that no moving act is required as an embodiment of the invention.
Example four
Referring to fig. 4, a block diagram of an input device according to a fourth embodiment of the present invention is shown.
The embodiment of the present invention is a further optimization of the input device in the third embodiment, and the optimized input device may include: a receiving module 401, configured to receive an input string input by a user; a completion module 402, configured to perform final syllable completion on the full-pinyin character string to obtain a corresponding complete character string if the input string is the full-pinyin character string; a first determining module 403, configured to determine a candidate item corresponding to the completion string; a sorting module 404, configured to sort the candidate items corresponding to the completion string.
Optionally, the completion module 402 is specifically configured to: and when the candidate items corresponding to the full spelling character string do not hit a preset word bank, performing tail syllable completion on the full spelling character string.
Optionally, the completing module 402 may include: a syllable completion sub-module 4021, configured to complete a last syllable corresponding to the full-spelling character string to obtain a corresponding completed syllable; a replacing submodule 4022, configured to replace the last syllable with the complementary syllable, to obtain a complementary character string corresponding to the full-spelling character string.
Optionally, the first determining module 403 is specifically configured to: and searching the entry corresponding to the completion character string from a preset word bank as a candidate item corresponding to the completion character string.
Optionally, the apparatus may further include: a second determining module 405, configured to determine a candidate item corresponding to the full-spelling character string; the sorting module 404 is specifically configured to: and sorting the candidate items corresponding to the complementing character strings and the candidate items corresponding to the full spelling character strings.
Optionally, the candidate corresponding to the completion string may include: a system candidate and a user candidate, the user candidate being ranked ahead of the system candidate.
Optionally, the candidate corresponding to the completion string may include: the ranking module 404 may include: the score determining submodule 4041 is configured to determine candidate items corresponding to the complementary character strings and ranking scores corresponding to the candidate items corresponding to the full-spelling character strings respectively; the first sorting sub-module 4042 is configured to perform first sorting on the user candidate items according to the sorting scores, and perform second sorting on the system candidate items and the candidate items corresponding to the full-spelling character string according to the sorting scores; the second sorting sub-module 4043 is configured to sequentially sort the obtained first sorting result and the second sorting result.
Optionally, the score determining sub-module 4041 may include: the adjusting unit is used for adjusting the word frequency corresponding to the system candidate item; and the sorting score determining unit is used for determining the sorting score corresponding to each system candidate item according to the adjusted word frequency, wherein the word frequency is in inverse proportion to the sorting score.
The input device of the embodiment of the present invention is used to implement the corresponding input methods in the first embodiment and the second embodiment, and has the beneficial effects of the corresponding method embodiments, which are not described herein again. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
EXAMPLE five
Embodiments of the present invention also 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 for execution by the one or more processors to include instructions for: receiving an input string input by a user; if the input string is a full spelling string, performing tail syllable completion on the full spelling string to obtain a corresponding full spelling string; determining a candidate item corresponding to the completion character string; and sorting the candidate items corresponding to the completion character string.
Optionally, the performing last syllable completion on the full spelling string comprises:
and when the candidate items corresponding to the full spelling character string are not in the preset word bank, performing final syllable completion on the full spelling character string.
Optionally, the performing last syllable completion on the full spelling string comprises:
complementing the last syllable corresponding to the full spelling character string to obtain a corresponding complemented syllable;
and replacing the last syllable by the complementary syllable to obtain a complementary character string corresponding to the full spelling character string.
Optionally, the determining the candidate item corresponding to the completion string includes:
and searching the entry corresponding to the completion character string from a preset word bank to serve as a candidate item corresponding to the completion character string.
Optionally, the device is also configured to execute the one or more programs by the one or more processors including instructions for:
determining a candidate item corresponding to the full spelling character string;
and sorting the candidate items corresponding to the completion character string and the candidate items corresponding to the spelling character string.
Optionally, the candidate corresponding to the completion string includes: a system candidate and a user candidate, the user candidate being ranked ahead of the system candidate.
Optionally, the candidate corresponding to the completion string includes: the system candidate item and the user candidate item, the sorting of the candidate item corresponding to the completion string and the candidate item corresponding to the spelling string, includes:
respectively determining the candidate item corresponding to the completion character string and the ranking score corresponding to the candidate item corresponding to the full spelling character string;
performing first ranking on the user candidate items according to ranking scores;
performing second sorting on the system candidate items and the candidate items corresponding to the full spelling character string according to the sorting scores;
and sequencing the obtained first sequencing result and the second sequencing result in turn.
Optionally, the determining the ranking scores corresponding to the candidate item corresponding to the completion string and the candidate item corresponding to the spelling string respectively includes:
adjusting the word frequency corresponding to the system candidate item;
and determining the sorting fraction corresponding to each system candidate item according to the adjusted word frequency, wherein the word frequency is inversely proportional to the sorting fraction.
Referring to fig. 5, a block diagram of an apparatus for inputting according to a fifth embodiment of the present invention is shown.
FIG. 5 is a block diagram illustrating an apparatus 600 for input according to an example embodiment. For example, the apparatus 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 5, apparatus 600 may include one or more of the following components: processing component 602, memory 604, power component 606, multimedia component 608, audio component 610, input/output (I/O) interface 612, sensor component 614, and communication component 616.
The processing component 602 generally controls overall operation of the device 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing elements 602 may include one or more processors 620 to execute instructions to perform all or a portion of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 can include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operation at the device 600. Examples of such data include instructions for any application or method operating on device 600, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 604 may be implemented by any type or combination of volatile and non-volatile storage devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A power supply component 606 provides power to the various components of the device 600. The power components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.
The multimedia component 608 includes a screen that provides an output interface between the device 600 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 600 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 610 is configured to output and/or input audio signals. For example, audio component 610 includes a Microphone (MIC) configured to receive external audio signals when apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor component 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor component 614 may detect the open/closed state of the device 600, the relative positioning of the components, such as a display and keypad of the apparatus 600, the change in position of the apparatus 600 or a component of the apparatus 600, the presence or absence of user contact with the apparatus 600, the orientation or acceleration/deceleration of the apparatus 600, and the change in temperature of the apparatus 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communications between the apparatus 600 and other devices in a wired or wireless manner. The apparatus 600 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described methods.
In an exemplary embodiment, a machine-readable storage medium comprising instructions, such as the memory 604 comprising instructions, executable by the processor 620 of the apparatus 600 to perform the above-described method is also provided. For example, the machine-readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and so forth.
Fig. 6 is a schematic structural diagram of a server in an embodiment of the present invention. The server 1900 may vary widely by configuration or performance and may include one or more Central Processing Units (CPUs) 1922 (e.g., one or more processors) and memory 1932, one or more storage media 1930 (e.g., one or more mass storage devices) storing applications 1942 or data 1944. Memory 1932 and storage medium 1930 can be, among other things, transient or persistent storage. The program stored in the storage medium 1930 may include one or more modules (not shown), each of which may include a series of instructions operating on a server. Still further, a central processor 1922 may be provided in communication with the storage medium 1930 to execute a series of instruction operations in the storage medium 1930 on the server 1900.
The server 1900 may also include one or more power supplies 1926, one or more wired or wireless network interfaces 1950, one or more input-output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, etc.
A machine-readable storage medium in which instructions, when executed by a processor of an apparatus (terminal or server), enable the apparatus to perform an input method, the method comprising: receiving an input string input by a user; if the input string is a full spelling string, performing final syllable completion on the full spelling string to obtain a corresponding complete character string; determining a candidate item corresponding to the completion character string; and sorting the candidate items corresponding to the completion character strings.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The above detailed description of the input method, the input device and the machine-readable medium provided by the present invention has been presented, and the principles and embodiments of the present invention are described herein by using specific examples, and the above descriptions of the embodiments are only used to help understand the method and the core idea of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (16)

1. An input method, comprising:
receiving an input string input by a user;
if the input string is a full spelling string, performing tail syllable completion on the full spelling string to obtain a corresponding full spelling string; the full spelling character string is matched with a preset syllable; segmenting a full-spelling character string into a plurality of sub-character strings, wherein each sub-character string corresponds to a preset syllable which is a syllable according with language rules; the last syllable is the last syllable of at least one syllable contained in the full spelling character string;
determining a candidate item corresponding to the completion character string;
sorting the candidate items corresponding to the completion character string;
wherein, it is right to carry out tail syllable completions to the full spelling string, include:
and when the candidate items corresponding to the full spelling character string are not in the preset word bank, performing final syllable completion on the full spelling character string.
2. The method of claim 1, wherein said end syllable completion of said full pinyin string comprises:
complementing the last syllable corresponding to the full spelling character string to obtain a corresponding complemented syllable;
and replacing the last syllable by the complementary syllable to obtain a complementary character string corresponding to the full spelling character string.
3. The method of claim 1, wherein the determining the candidate corresponding to the completion string comprises:
and searching the entry corresponding to the completion character string from a preset word bank to serve as a candidate item corresponding to the completion character string.
4. The method of claim 1, further comprising:
determining a candidate item corresponding to the full spelling character string;
and sorting the candidate items corresponding to the complementing character strings and the candidate items corresponding to the full spelling character strings.
5. The method of claim 4, wherein the candidate corresponding to the completion string comprises: a system candidate and a user candidate, the user candidate being ranked ahead of the system candidate.
6. The method of claim 4, wherein the candidate corresponding to the completion string comprises: the system candidate item and the user candidate item, the sorting of the candidate item corresponding to the completion string and the candidate item corresponding to the spelling string, includes:
respectively determining the candidate item corresponding to the completion character string and the ranking score corresponding to the candidate item corresponding to the full spelling character string;
performing first sorting on the user candidate items according to the sorting scores;
performing second sorting on the system candidate items and the candidate items corresponding to the full spelling character strings according to the sorting scores;
and sequencing the obtained first sequencing result and the second sequencing result in turn.
7. The method of claim 6, wherein the determining the ranking scores corresponding to the candidate item corresponding to the completion string and the candidate item corresponding to the spelling string respectively comprises:
adjusting the word frequency corresponding to the system candidate item;
and determining the sorting fraction corresponding to each system candidate item according to the adjusted word frequency, wherein the word frequency is inversely proportional to the sorting fraction.
8. An input device, comprising:
the receiving module is used for receiving an input string input by a user;
the completion module is used for performing final syllable completion on the full spelling character string to obtain a corresponding complete character string if the input string is the full spelling character string; the full spelling character string is matched with a preset syllable; segmenting a full-spelling character string into a plurality of sub-character strings, wherein each sub-character string corresponds to a preset syllable which is a syllable according with language rules;
the last syllable is the last syllable of at least one syllable contained in the full spelling character string;
the first determining module is used for determining the candidate item corresponding to the completion string;
the sorting module is used for sorting the candidate items corresponding to the completion character strings;
wherein, the completion module is specifically configured to: and when the candidate items corresponding to the full spelling character string do not hit a preset word bank, performing tail syllable completion on the full spelling character string.
9. The input device of claim 8, wherein the completion module comprises:
the syllable complementing submodule is used for complementing the last syllable corresponding to the full spelling character string to obtain a corresponding complemented syllable;
and the replacing submodule is used for replacing the last syllable by adopting the complementing syllable to obtain a complementing character string corresponding to the full spelling character string.
10. The input device according to claim 8, wherein the first determining module is specifically configured to:
and searching the entry corresponding to the completion character string from a preset word bank to serve as a candidate item corresponding to the completion character string.
11. The input device of claim 8, wherein the device further comprises:
the second determining module is used for determining candidate items corresponding to the full spelling character string;
the sorting module is specifically configured to:
and sorting the candidate items corresponding to the completion character string and the candidate items corresponding to the spelling character string.
12. The input device as claimed in claim 11, wherein the candidates corresponding to the completion string comprise: a system candidate and a user candidate, the user candidate being ranked ahead of the system candidate.
13. The input device as claimed in claim 11, wherein the candidates corresponding to the completion string comprise: system candidate and user candidate, the ranking module comprising:
the score determining submodule is used for respectively determining the candidate item corresponding to the complementing character string and the ranking score corresponding to the candidate item corresponding to the full spelling character string;
the first ordering submodule is used for carrying out first ordering on the user candidate items according to the ordering scores and carrying out second ordering on the system candidate items and the candidate items corresponding to the full spelling character strings according to the ordering scores;
and the second sequencing submodule is used for sequencing the obtained first sequencing result and the second sequencing result in sequence.
14. The input device of claim 13, wherein the score determination submodule comprises:
the adjusting unit is used for adjusting the word frequency corresponding to the system candidate item;
and the sorting score determining unit is used for determining the sorting score corresponding to each system candidate item according to the adjusted word frequency, wherein the word frequency is in inverse proportion to the sorting score.
15. 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 executed by one or more processors the one or more programs include instructions for:
receiving an input string input by a user;
if the input string is a full spelling string, performing final syllable completion on the full spelling string to obtain a corresponding complete character string; the full spelling character string is matched with a preset syllable; segmenting a full-spelling character string into a plurality of sub-character strings, wherein each sub-character string corresponds to a preset syllable which is a syllable according with language rules; the last syllable is the last syllable of at least one syllable contained in the full spelling character string;
determining a candidate item corresponding to the completion character string;
sorting the candidate items corresponding to the completion character string;
wherein the performing last syllable completion on the full spelling string comprises:
and when the candidate items corresponding to the full spelling character string are not in the preset word bank, performing final syllable completion on the full spelling character string.
16. A machine-readable medium having stored thereon instructions, which when executed by one or more processors, cause an apparatus to perform an input method as recited in one or more of claims 1-7.
CN201710792125.6A 2017-09-05 2017-09-05 Input method, device and machine readable medium Active CN109426359B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710792125.6A CN109426359B (en) 2017-09-05 2017-09-05 Input method, device and machine readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710792125.6A CN109426359B (en) 2017-09-05 2017-09-05 Input method, device and machine readable medium

Publications (2)

Publication Number Publication Date
CN109426359A CN109426359A (en) 2019-03-05
CN109426359B true CN109426359B (en) 2022-10-21

Family

ID=65513560

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710792125.6A Active CN109426359B (en) 2017-09-05 2017-09-05 Input method, device and machine readable medium

Country Status (1)

Country Link
CN (1) CN109426359B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035597B (en) * 2020-09-04 2023-11-21 常州新途软件有限公司 Vehicle-mounted input method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727271A (en) * 2008-10-22 2010-06-09 北京搜狗科技发展有限公司 Method and device for providing error correcting prompt and input method system
JP2012085249A (en) * 2010-09-14 2012-04-26 Yasuhiko Satake Input system of chinese electronic apparatus
CN103257719A (en) * 2012-02-21 2013-08-21 腾讯科技(深圳)有限公司 Generation method and system of candidate words in input method
CN106774975A (en) * 2016-11-30 2017-05-31 百度在线网络技术(北京)有限公司 Input method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108829266A (en) * 2018-04-03 2018-11-16 科大讯飞股份有限公司 Syllable complementing method and device, storage medium, electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101727271A (en) * 2008-10-22 2010-06-09 北京搜狗科技发展有限公司 Method and device for providing error correcting prompt and input method system
JP2012085249A (en) * 2010-09-14 2012-04-26 Yasuhiko Satake Input system of chinese electronic apparatus
CN103257719A (en) * 2012-02-21 2013-08-21 腾讯科技(深圳)有限公司 Generation method and system of candidate words in input method
CN106774975A (en) * 2016-11-30 2017-05-31 百度在线网络技术(北京)有限公司 Input method and device

Also Published As

Publication number Publication date
CN109426359A (en) 2019-03-05

Similar Documents

Publication Publication Date Title
CN107608532B (en) Association input method and device and electronic equipment
CN107305438B (en) Method and device for sorting candidate items
CN107918496B (en) Input error correction method and device for input error correction
CN107688399B (en) Input method and device and input device
CN107422872B (en) Input method, input device and input device
CN107665218B (en) Searching method and device and electronic equipment
CN107291260B (en) Information input method and device for inputting information
CN108628461B (en) Input method and device and method and device for updating word stock
CN109388249B (en) Input information processing method and device, terminal and readable storage medium
CN109521888B (en) Input method, device and medium
CN108536653B (en) Input method, input device and input device
CN109426359B (en) Input method, device and machine readable medium
CN108073293B (en) Method and device for determining target phrase
CN108073294B (en) Intelligent word forming method and device for intelligent word forming
CN109917927B (en) Candidate item determination method and device
CN114610163A (en) Recommendation method, apparatus and medium
CN107977089B (en) Input method and device and input device
CN112181163A (en) Input method, input device and input device
CN111103986A (en) User word stock management method and device and input method and device
CN111381685B (en) Sentence association method and sentence association device
CN110716653B (en) Method and device for determining association source
CN112987941B (en) Method and device for generating candidate words
CN110244861B (en) Data processing method and device
CN110858100B (en) Method and device for generating association candidate words
CN109271094B (en) Text editing method, device and equipment

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