WO2018076450A1 - 一种输入方法和装置、一种用于输入的装置 - Google Patents
一种输入方法和装置、一种用于输入的装置 Download PDFInfo
- Publication number
- WO2018076450A1 WO2018076450A1 PCT/CN2016/107989 CN2016107989W WO2018076450A1 WO 2018076450 A1 WO2018076450 A1 WO 2018076450A1 CN 2016107989 W CN2016107989 W CN 2016107989W WO 2018076450 A1 WO2018076450 A1 WO 2018076450A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- input
- word
- input string
- string
- candidate
- Prior art date
Links
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/274—Converting codes to words; Guess-ahead of partial word inputs
-
- 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
-
- 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/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0354—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
- G06F3/03547—Touch pads, in which fingers can move on a surface
-
- 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/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- 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/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04886—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/284—Lexical analysis, e.g. tokenisation or collocates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/40—Processing or translation of natural language
- G06F40/42—Data-driven translation
- G06F40/44—Statistical methods, e.g. probability models
Definitions
- the present application relates to the field of information input technologies, and in particular, to an input method and apparatus, and an apparatus for input.
- the input method refers to an encoding method used to input various characters into a smart terminal such as a smartphone or a desktop computer.
- the key rate is an important indicator to measure the performance of the input method; the key rate is the number of key times required to input N characters on average. Generally, the smaller the number of key presses, the higher the key rate and the corresponding input efficiency. In order to improve the input efficiency, users of English, Italian, Portuguese, and Malaysian languages can interact with intelligent terminals through input method programs.
- the general input method program When inputting English words, the general input method program mostly adopts the prefix matching strategy to realize the fast input of English words, so that the user can input the English words through as few keystrokes as possible.
- the English word can be recorded in the dictionary in advance, and after receiving the input string of the user, the input string is matched with the front part of the English word in the dictionary, and the English word matching the success is used as a candidate. For example, if the user wants to enter "before”, when inputting the input string "be”, the input method will search for English words beginning with "be” in the dictionary to get “before”, “befall”, “beguile”, Candidates such as "beneath” allow the user to enter the English word to be entered by the candidate without the complete input.
- the prefix matching strategy requires the user to accurately memorize the front part of the English word, which not only increases the user's memory difficulty; but also fails to prepare the user to prepare to memorize the front part of the English word.
- Quick input of English words In this case, the user needs to obtain the front part or the complete character of the English word by referring to the data. String, thus affecting the input efficiency of English words.
- the input method program returns more candidates, and the user needs to perform operations such as page flipping.
- the operation of turning pages several times makes the operation and time cost of the user large, resulting in low input efficiency.
- embodiments of the present application have been made in order to provide an input method, an input device, and an apparatus for input that overcome the above problems or at least partially solve the above problems, and the embodiments of the present application can not only improve the flexibility of fast input and Scope of application, and can improve the quality of word candidates and / or phrase candidates, thereby improving input efficiency.
- an input method including:
- the quick input is intended to input a word or a phrase by the input string corresponding to a shorthand information of a word or a phrase;
- the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string;
- the word candidates and/or phrase candidates are presented to the user.
- an input device including:
- An input string receiving module for receiving an input string having a quick input intent; the fast input is intended to input a word or a phrase by the input string corresponding to a shorthand information of a word or a phrase;
- a candidate acquiring module configured to acquire a word candidate and/or a phrase candidate corresponding to the input string according to a language model; the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string;
- a candidate presentation module for presenting the word candidate and/or phrase candidate to a user.
- the candidate obtaining module includes:
- a first determining submodule configured to determine a complete word that meets the fast input intent of the input string
- a first model processing submodule configured to input context data corresponding to the complete word and the input string to a language model, and output the complete word and the context data by the language model The probability of the corresponding combination;
- a first selection submodule configured to select a word candidate corresponding to the input string from the complete words according to the probability of the combination.
- the first determining submodule includes:
- a first determining unit configured to use the complete word with the error string corresponding to the input string or the input string as a complete word corresponding to the fast input intention of the input string;
- a second determining unit configured to map the characters in the input string to corresponding alphabetic characters according to the pronunciation, to obtain a complete word corresponding to the fast input intention of the input string.
- the first determining unit includes:
- a first search subunit configured to search, in a vocabulary, a complete word with the error string corresponding to the input string or the input string as a part, to obtain a fast input intention corresponding to the input string according to a preset shorthand rule Complete word;
- a second search subunit configured to search, in the language model corresponding data, a complete word that is part of the input string or the error correction string corresponding to the input string, according to the input string and the corresponding context data, To get the complete word of the input string corresponding to the quick input intent.
- the context data is adjacent to or not adjacent to the input string.
- the candidate obtaining module includes:
- a second determining submodule configured to determine a vocabulary entry that meets the fast input intent of each substring
- a second model processing submodule configured to input a vocabulary item combination corresponding to the plurality of substrings into a language model, and output, by the language model, a probability of the vocabulary item combination; the vocabulary entry combination is based on vocabulary of all substrings The combination of entries is obtained;
- a second selection submodule configured to select a phrase candidate corresponding to the input string from the combination of the vocabulary entries according to a probability of combining the vocabulary entries.
- the second determining submodule includes:
- the mapping obtaining unit is configured to obtain a vocabulary entry corresponding to each substring according to a preset mapping rule.
- the preset mapping rule includes: a pronunciation mapping rule, where the mapping obtaining unit is specifically configured to map the characters in the substring to corresponding letter characters according to the pronunciation mapping rule. a character to obtain a vocabulary entry corresponding to the substring.
- the present application discloses an apparatus for inputting, including a memory, and one or more programs, wherein one or more programs are stored in a memory and configured to be comprised by one or more processors Executing the one or more programs includes instructions for performing the following operations:
- the quick input is intended to input a word or a phrase by the input string corresponding to a shorthand information of a word or a phrase;
- the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string;
- the word candidates and/or phrase candidates are presented to the user.
- the embodiment of the present application obtains the word candidate and/or the phrase candidate corresponding to the input string according to the language model; since the language model can obtain various probability parameters according to the language model corresponding data statistics, the embodiment of the present application utilizes the language model
- the probability parameter can estimate the possibility of occurrence of each word or each word sequence in the natural language, instead of simply judging whether the word or the word sequence conforms to the grammar. Therefore, the character that can be omitted in the input string can be located in the word in the embodiment of the present application.
- a word candidate that conforms to the idiom of the data corresponding to the language model is given, or when the character omitted by the input string is located at any position of each word of the phrase, the data corresponding to the language model is given.
- the phrase candidate of the idiom that is, the embodiment of the present application can not only improve the flexibility and application range of the fast input, but also improve the quality of the word candidate and/or the phrase candidate, thereby improving the input efficiency.
- the word candidate and/or the phrase candidate presented on the first page can better conform to the user's quick input intention, so that the user passes less.
- the key operation completes the input of the word or the phrase to improve the input efficiency; and, the candidate that meets the fast input intention can be selected without turning the page, and the page turning operation can be saved, thereby effectively reducing the operation cost of the user and improving Input efficiency. For example, if the user wants to input the phrase "talk to you later", the traditional input method needs to input 4 words respectively, and the input of the 4 words requires 4, 2, 3, and 5 for 14 letter keystrokes, 4 selections.
- Embodiment 1 is a flow chart showing the steps of Embodiment 1 of an input method of the present application
- Embodiment 2 is a flow chart showing the steps of Embodiment 2 of an input method of the present application
- Embodiment 3 is a flow chart showing the steps of Embodiment 3 of an input method of the present application.
- Figure 5 is a block diagram of an apparatus 900 for input of the present application.
- FIG. 6 is a schematic structural diagram of a server in some embodiments of the present application.
- FIG. 7 is a block diagram of a computing device for performing an input method in accordance with the present application.
- 8 is a storage unit for holding or carrying program code that implements an input method in accordance with the present application.
- FIG. 1 a flow chart of a first embodiment of an input method of the present application is shown, which may specifically include the following steps:
- Step 101 Receive an input string having a fast input intention; the quick input is intended to input a word or a phrase by using the input string corresponding to a shorthand information of a word or a phrase;
- Step 102 Acquire a word candidate and/or a phrase candidate corresponding to the input string according to a language model; the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string;
- Step 103 Present the word candidate and/or phrase candidate to the user.
- the embodiments of the present application can be applied to English, Italian, Portuguese, Malaysian, etc.
- the fast input of the Ding alphabet language can also be applied to the fast input of non-Latin alphabet languages such as Russian, so that the user can quickly input a word or a phrase through an input string characterizing the shorthand information of a word or a phrase.
- the input string and the word may be expressed in the same text form, that is, the language of the input string may be directly obtained without converting the input string.
- Word candidates if corresponding to English, the input string can be expressed in the form of letters, and the English words can also be expressed in the form of letters.
- any language in which the input string is the same as the text of the word is within the protection scope of the embodiment of the present application.
- the embodiment of the present application mainly describes the input process of the English as an example, and the input process of other languages can be referred to each other. .
- the embodiment of the present application can be applied to input method programs of various input modes.
- the input manner may specifically include input manners such as keyboard symbols, handwritten information, and voice input, that is, the user may input the information by using a code string, handwriting input information, or voice input information. Wait for the input string.
- the input string only the input mode of the encoded string (hereinafter referred to as the input string) is taken as an example, and other input modes can be referred to each other.
- the input method provided by the embodiment of the present application can be applied to an application environment corresponding to a client of the input method program and the server, wherein the client and the server of the input method program can be located in a wired or wireless network, through the wired or wireless network,
- the client and the server perform data interaction, that is, the input method of the embodiment of the present application may be performed by any one of the client and the server.
- the embodiment of the present application does not limit the specific execution subject of each step in the input method.
- the client of the input method program can run on the smart terminal, and the client can capture the input string of the user during the input process.
- the smart terminal may specifically include, but is not limited to, a smart phone, a tablet computer, an e-book reader, an MP3 (Moving Picture Experts Group Audio Layer III) player, and an MP4 (Motion Picture Expert Compression Standard) Audio Level 4, Moving Picture Experts Group Audio Layer IV) Players, laptop portable computers, on-board computers, desktop computers, set-top boxes, smart TVs, wearable devices, and the like.
- a quick input of a word or a phrase can be realized by an input string corresponding to a shorthand information of a word or a phrase.
- the input string corresponds to the shorthand information of the word or phrase
- the input string can be part of a word or a phrase.
- the characters contained in the input string are all characters contained in the word, but the number of characters included in the input string is smaller than the characters contained in the word.
- the number, etc. can support the abbreviated information of any character contained in the word or phrase, that is, the character of the word at any position (such as the front position, the middle position, the back position, etc.) can be omitted, thereby improving the speed.
- the flexibility and scope of input can support the abbreviated information of any character contained in the word or phrase, that is, the character of the word at any position (such as the front position, the middle position, the back position, etc.) can be omitted, thereby improving the speed.
- the input string can be mapped to a whole or a portion of a word or phrase.
- the input string may include a numeric character or an alphabetic character that has a mapping relationship with the pronunciation of the word, for example, 8/4 may be used to map the English word to /eit/ and Or the whole word or fragment; or, for the Indonesian/Malay word “selamat", since "slmt" can determine its approximate pronunciation, it can be abbreviated with the input string “slmt", of course, “selmt", “slmat” Wait for other forms to be abbreviated. Therefore, the above-mentioned numerical characters having a mapping relationship with the pronunciation of a word can input a word or a phrase with as few keystrokes as possible, and thus the input efficiency can be greatly improved.
- the mapping relationship between the input string and the whole or part of the word or phrase may specifically include: homophonic, mapping shorthand, and the like.
- the homophonic can map the whole or part of the word or phrase according to the pronunciation of the word or phrase, for example, fore ⁇ 4, eat ⁇ 8, see ⁇ c, ticks ⁇ tix, your ⁇ ur, are ⁇ r, see ⁇ s Wait.
- the mapping abbreviations may be based on the general shorthand habits of the current language, and may also be based on the user's personal habits.
- the mapping abbreviations of the embodiments of the present application may include: please ⁇ pls, tomorrow ⁇ tml, by the way ⁇ btw, as soon as possible ⁇ ASAP, could you ⁇ cy and so on.
- the input string of the embodiment of the present application may include: letters, numbers, etc. Any or combination of other characters.
- the letter can be located at any position of the word. For example, if the user wants to input the English word "before”, he can input any letter included in the English word such as "be” or "fo".
- the plurality of letters included in the input string may be adjacent or not adjacent, and the order between the plurality of letters contained in the input string may be in the word
- the order in the inconsistency that is, since the input string of the embodiment of the present application may include any bit located in the word
- the letters are set so that the flexibility and scope of fast input can be improved.
- the sequence of the plurality of letters included in the input string may be inconsistent with the order in the word.
- the embodiment of the present application may use the context data of the input string to adjust the sequence of the plurality of letters included in the input string. Finally, a more reasonable word candidate is obtained.
- the number can be a numeric character that has a mapping relationship with the pronunciation of the word. For example, you can use 8/4 to map English words to /eit/ and The whole or fragment, specifically, the whole sounded as /eit/ may include "eat", the fragment pronounced /eit/ (such as the fragment of the word “great”) may include “eit”; The whole can include "for", “four", etc., pronounced as A fragment (such as a fragment of the word "before”) may include “fore” or the like.
- step 101 can receive an input string by inputting a keyboard symbol, handwritten information, voice input, or the like.
- the received input string can be directly used as an input string with a fast input intent, that is, once the input method receives an input string of user input, it can be used as an input string with a fast input intent and The input method applied to the embodiment of the present application.
- it can be determined whether the received input string has a fast input intention; wherein, the manner of determining whether the received input string has a fast input intention may be various, for example, whether the input string is a complete word or a phrase, and if not
- the received input string can be determined to have a fast input intention. For example, it can be determined whether the input string includes non-alphabetic characters. If yes, it can be determined that the received input string has a fast input intention. It can be understood that the embodiment of the present application is specific to The way of judging is not limited.
- Step 102 may acquire word candidates and/or phrase candidates corresponding to the input string according to a language model.
- the language model can obtain various probability parameters according to the language model corresponding data statistics.
- the embodiment of the present application can estimate the possibility of occurrence of each word or each word sequence in the natural language by means of the probability parameter of the language model. It is not simple to judge whether the word or the word sequence conforms to the grammar. Therefore, the embodiment of the present application can give a word candidate that conforms to the idiom of the corresponding data of the language model when the character of the input string is located at an arbitrary position of the word.
- phrase candidate that conforms to the idiom of the language model corresponding data may be given when the character omitted by the input string is located at any position of each word of the phrase, that is, the embodiment of the present application can be more flexibly processed with fast input. Input string of intent, and give a more reasonable word candidate or phrase candidate selected.
- the language model is a language abstract mathematical modeling based on the objective facts of the language, which can establish a certain correspondence between the language model and the objective facts of the language.
- the embodiment of the present application mainly takes the statistical language model as an example. To illustrate, non-statistical language models can be cross-referenced.
- the statistical language model may describe the possibility that the arbitrary word sequence S belongs to a certain language set in the form of a probability distribution.
- the word sequence S is not required to be grammatically complete, and the statistical language model may be any word sequence.
- S can give a probability parameter value, and the corresponding calculation formula can be expressed as:
- S includes n letters, and in the formula (1), w i represents the i-th word in the word sequence.
- the process of training the "language model” is a process of estimating the model parameters P(w i
- the existing statistical language model can process the preset corpus based on the statistical algorithm to give the probability of the word sequence, or, in the case of given context data, predict the next most likely occurrence. word.
- an arbitrary statistical language model may be used to implement the input method of the embodiment of the present application.
- the above statistical language model may specifically include: a context-independent model, an N-gram model, a Hidden Markov Model, a Maximum Entropy Model, and a cyclic neural network. Model (RNN, Recurrent Neural Networks Model).
- the context-independent model can be independent of the context, and the N-gram grammar model, the HMM model, the maximum entropy model, the RMM model, and the like need to depend on the context, the N-gram model, the HMM model, the maximum entropy model, and the machine used by the RMM model.
- the machine learning method used by the HMM model, the maximum entropy model, and the RMM model not only considers the relationship between the preset corpus (that is, the training text), but also uses the timing characteristics of the training text; and the N-gram grammar model The connection between the training texts can be ignored.
- the preset corpus required for the statistical language model may be derived from the existing corpus.
- the existing corpus may include an English corpus, or the preset corpus required for the statistical language model may also be derived from famous books, Internet corpus, and historical input records recorded by the input method. It can be understood that any corpus is within the protection scope of the preset corpus of the embodiment of the present application.
- the user wants to input the English word "before”, assuming that it can input an input string corresponding to any letter contained in the English word, such as "be” or "fo” or "bf"
- the probability that the input string corresponds to the complete word can be obtained according to the statistical language model, or the probability that the input string corresponds to the complete word and the corresponding context data can be obtained.
- the statistical language model that does not depend on the context can give the probability of a complete word containing the fragment of "fo”, then the reasonable word corresponding to the input string can be given according to the magnitude of the probability. Candidates such as "for", "before”, etc.
- the user wants to quickly input “before” through the input string "fo” during the input of "The bus had left before I got there", assuming that the above data of the input string includes “The bus had left”, below The data includes "I”, and the statistical language model depending on the context can give the probability of the complete word containing the segment "fo” and the sequence of words corresponding to the context data, and finally obtain the word candidate corresponding to the sequence of words with the highest probability. "before”.
- the user wants to input the English phrase "what's happening now to Peter", assuming that it can input an input string omitting a character located at any position of each word of the phrase, such as "whn2p"
- the embodiment of the present application may obtain a probability of the input string corresponding vocabulary item combination according to a statistical language model, and give a reasonable phrase candidate corresponding to the input string according to the probability, such as “what's happening now to Peter”, “we have nothing to present” and so on.
- the embodiment of the present application maps the character “P” to a person name.
- the “Peter” is only an example of the person name corresponding to the character “P”.
- a person skilled in the art can map the character “P” to a name other than “Peter” according to actual application requirements, such as English name “Pavel”, “Pinto”, “pinto”, “Pascal”, or Chinese name “Peijian”. Wait.
- the person name with a higher frequency may be obtained from the historical input content of the current user, as the character “P” corresponding to the person name, etc., to meet the personalized input requirement of the user.
- users can also pass input strings other than "whn2p"
- the input of the English phrase “what's happening now to Peter" is made, for example, the input string other than "whn2p” may be "whntp” or the like.
- the acquisition scheme of word candidates or phrase candidates may be mutually independent schemes.
- an input string can be interpreted as both a word and a phrase, and two candidates can be given at the same time for the user to select as needed.
- whether the input string can be interpreted as a word or a phrase can be determined according to the probability of the word candidate or the phrase candidate. Alternatively, if the probability that the input string corresponds to the word candidate or the phrase candidate is higher than the corresponding probability threshold, the input string can be considered as Interpreted as a word or phrase.
- the input method program can present the word candidate and/or the phrase candidate to the user through the candidate window for the user to select.
- word candidates and/or phrase candidates may be presented in any order, for example, first displaying a plurality of word candidates and then presenting a plurality of phrase candidates, or alternatively, alternately presenting one word candidate to a phrase candidate, or by word
- the probability of the candidate or the phrase candidate is displayed in the order of the largest and the smallest. It can be understood that the embodiment of the present application does not limit the specific manner of presentation.
- the input method of the embodiment of the present application obtains the word candidate and/or the phrase candidate corresponding to the input string according to the language model; since the language model can obtain various probability parameters according to the language model corresponding data statistics, the present application
- the embodiment can estimate the possibility of occurrence of each word or each word sequence in the natural language by means of the probability parameter of the language model, instead of simply judging whether the word or the word sequence conforms to the grammar, therefore, the embodiment of the present application can When the character whose input string is omitted is located at any position of the word, a word candidate that conforms to the idiom of the data corresponding to the language model is given, or the character that is omitted when the input string is omitted is located at any position of each word of the phrase
- the language model corresponds to the phrase candidate of the idiom of the data, that is, the embodiment of the present application can not only improve the flexibility and application range of the fast input, but also improve the quality of the word candidate and/or the phrase candidate, thereby improving the input efficiency.
- the word candidate and/or the phrase candidate presented on the first page can better conform to the user's quick input intention, so that the user does not turn over.
- a candidate that meets the fast input intention is selected, and since the page turning operation can be saved, the operation cost of the user can be effectively reduced, and the input efficiency can be improved.
- the second embodiment of the method is an optional embodiment of the first embodiment of the method shown in FIG. 1.
- the method for obtaining the word candidate corresponding to the input string according to the language model is performed on the basis of the first embodiment of the method shown in FIG. Detailed introduction.
- a language model that does not depend on the context such as a context-independent model
- a context-dependent language model such as an N-gram grammar model
- the language model that does not depend on the context has the advantage of simple operation, and the language model depending on the context can make the word candidates more reasonable, that is, the quality of the word candidates can be improved.
- FIG. 2 a flow chart of the steps of the second embodiment of the input method of the present application is shown, which may specifically include the following steps:
- Step 201 Receive an input string having a fast input intention; the quick input is intended to input a word or a phrase by using the input string corresponding to a shorthand information of a word or a phrase;
- Step 202 Determine a complete word that meets the fast input intention of the input string
- Step 203 Input the context data corresponding to the complete word and the input string to a language model, and output, by the language model, a probability of corresponding combination of the complete word and the context data;
- Step 204 Select, according to the probability of the combination, a word candidate corresponding to the input string from the complete words;
- Step 205 Acquire a phrase candidate corresponding to the input string according to a language model; the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string;
- Step 206 Present the word candidate and/or phrase candidate to the user.
- step 202-step 204 The process of obtaining the word candidate corresponding to the input string by using the context-dependent language model (such as the N-gram grammar model) is described in detail in the foregoing step 202-step 204.
- the context-dependent language model such as the N-gram grammar model
- the input string corresponds to the shorthand information of the word or phrase
- the input string can be part of a word or phrase, or the input string can have a mapping relationship with the whole or part of the word or phrase, so step 202 can be determined according to the scheme of the input string.
- the step 202 of determining the complete word that corresponds to the fast input intention of the input string may specifically include:
- Step A1 The complete word with the error string corresponding to the input string or the input string as a part is used as a complete word corresponding to the quick input intention of the input string.
- Step A1 may be applied to the case where the input string is a part of a word or a phrase, and specifically, the complete word may be a part of the error correction string corresponding to the input string or the input string. Assuming that the input string corresponding to English is “fo", the complete word with "fo" as part may include “for", "before”, and the like.
- the searching manner corresponding to the foregoing step A1 may specifically include:
- Searching mode 1 According to the preset shorthand rule, searching for a complete word in the lexicon with the error string corresponding to the input string or the input string as a part to obtain a complete word corresponding to the fast input intention of the input string; or
- Searching mode 2 searching for the complete word in the language model corresponding data, which is part of the error string corresponding to the input string or the input string, according to the input string and its corresponding context data, to obtain the The input string corresponds to the complete word of the quick input intent; or
- Search mode 3 according to the segment included in the input string and the preset string for marking the vacancy, search for a complete word in the lexicon with the segment as part, to obtain the complete input of the input string corresponding to the fast input intention a word; wherein the segment may be a character other than the preset character string in the input string.
- the search ranges of the search mode 1 and the search mode 2 are respectively: the lexicon and the language model corresponding data, and the search basis is: the input string or the error correction string corresponding to the input string, and the input string and the corresponding context data thereof. .
- the preset shorthand rule may include: a prefix shorthand rule and a non-prefix shorthand rule, and the like, wherein the non-prefix shorthand rule may further include: a provincial vowel shorthand rule and an arbitrary alphabet shorthand rule. Since the consonant letters can determine the approximate pronunciation of the words, the provincial vowel abbreviation rules can accurately realize the positioning of the words. For example, for the Indonesian/Malay word “selamat”, due to "slmt" It is possible to determine its general pronunciation, so it can be abbreviated with the input string "slmt", and of course, it can be abbreviated by other forms such as “selmt", “slmat”.
- the search process of the search mode 1 may be: determining the position of each character of the input string in the complete word according to the preset shorthand rule, and then performing a complete word search according to the position.
- the position of the input string in the complete word is the beginning;
- the characters in the input string are at the beginning of the complete word, some characters are at the end, and some characters are at In the middle;
- the characters in the input string can be located anywhere in the complete word, and the order of the characters in the input string can be consistent or inconsistent with the order of the characters in the complete word.
- the search mode 1 may adopt a processing method similar to word spelling correction, and search for one or more of the shortest edit distances of the input string and the term in the thesaurus in the thesaurus.
- Complete word refers to the minimum number of edit operations required between two strings, one from one to another.
- the allowed editing operations may specifically include inserting, deleting, replacing, exchanging, etc.
- the processing method of the above-mentioned similar word spelling correction can be to some extent Guarantee the legitimacy of complete words.
- the term in the vocabulary of the embodiment of the present application may be an existing term, or may be a self-created term, a customized term, or the like, and the specific lexicon and specific words thereof in the embodiment of the present application. Articles are not restricted.
- the search mode 2 may search for the complete word of the given context data, which is an input string or an error correction string corresponding to the input string, from the language model corresponding data according to the context data corresponding to the input string. For example, in the process of inputting "The bus had left before I got there", the user wants to quickly input “before” through the input string "fo", and the above data of the input string “fo” includes “The bus had left”. The following data includes “I”, and the complete words "before”, “for”, etc., which are part of the input string "fo”, can be found in the language model corresponding data.
- the error correction string corresponding to the input string may be obtained by correcting the input string under the assumption that the input string has an error.
- an error correction process based on an edit distance and an error correction scheme based on statistics may be employed. Among them, based on the editing distance
- the error correction scheme can perform the following error correction attempts on each position of the input string: inserting a character, deleting a character, replacing a character, and replacing the two character positions before and after, etc., to generate an error correction string corresponding to the input string.
- the statistical-based error correction scheme can generate an error correction model through big data mining, and the error correction model can be used to learn the probability that the error correction string is mis-translated into an input string. It can be understood that the specific error correction process of the input string is not limited in the embodiment of the present application.
- Lookup mode 3 can mark gaps with preset strings.
- the preset character string may be any character string used for marking a gap, such as "*", "?", “%", "#”, etc., which is preset by a technician or a user according to actual application requirements. It is a character that is input by the user and does not represent any meaning, such as "(", ">", etc., it can be understood that the embodiment of the present application does not limit the specific preset character string.
- the user wants to input the English word "phenomenon", but it does not remember some of the characters, so the preset character string can be used to mark the vacancy, and the preset character string is performed by the input method program.
- the embodiment of the present application may supplement the two "*"s.
- the foregoing search mode 3 may match the segment in the input string with the word term in the thesaurus according to the character position, to obtain a complete word corresponding to the input string; wherein the segment is in the The position in the complete word is consistent with the position of the segment in the input string, so the search space can be reduced and the search efficiency can be improved.
- search mode 1 the search mode 2 and the search mode 3 are only an optional embodiment for acquiring a complete word that is part of the input string or the error correction string corresponding to the input string.
- the application embodiment does not limit the specific acquisition process of the complete word that is part of the input string or the error correction string corresponding to the input string.
- Step A2 According to the pronunciation, map the characters in the input string to corresponding alphabet characters to obtain a complete word corresponding to the fast input intention of the input string.
- letters or numeric characters in an input string can be mapped to corresponding alphabetic characters according to the pronunciation of the word. For example, if the input string in English is “b4", then the numeric character “4" can be mapped to the pronunciation. The fragment “fore”, and further, find the complete word “before” with “bfore” as part. For example, if the input string in Malaysian is “slmt”, the Malay word “selamat” can be obtained by pronunciation mapping.
- the user wants to input the Spanish word "afecta”, which can input a character string "afkt” which represents the approximate pronunciation of the Spanish word, and the embodiment of the present application can utilize k ⁇ c The pronunciation of the map, the corresponding complete words "afecta”, “afecto”, “afectar” and so on.
- step 203 may input the complete word and the context data corresponding to the input string into a language model, and output the complete word and the language model by the language model
- the context data corresponds to the probability of the combination.
- the target context data to be input to the language model can be selected from the context data, the target context.
- the data can form a corresponding combination with the input string.
- the target context data may be adjacent to or not adjacent to the input string.
- the user wants to quickly input the English word “blue” through the input string “bl", and the above data of the input string “bl” includes: “the sky in the Friday morning is”, according to the parsing result, the user can
- the target context data "sky is” is selected from the above data, whereby a more reasonable word candidate "blue” can be output from the language model.
- the user wants to quickly input the English word “French” through the input string “Fr"
- the above data of the input string “Fr” includes: “he have lived in France for 5 years and he can speak fluent”, then
- the target context data "France speak” or the like is selected from the above data, whereby a more reasonable word candidate "French” can be output from the language model.
- the input string may also have the following data.
- the following data of the input string may also be input to the language model. For example, if the user moves the cursor somewhere in the input content and retypes the input string, the data before and after the cursor can be acquired as context data at the same time.
- step 204 may sort the complete words according to the probability of the combination, and select the complete words in the top M position from the complete words in order from the largest to the smallest.
- M is a positive integer greater than or equal to 1.
- a complete word larger than the probability threshold may be selected from the complete words as a word candidate according to the probability of the combination. It can be understood that the specific selection process of the word candidate is not limited in the embodiment of the present application.
- the input method of the embodiment of the present application relies on a language model of the context (such as an N-gram model) to obtain a word candidate corresponding to the input string, thereby making the word candidate more reasonable, that is, improving the quality of the word candidate. Input efficiency.
- a language model of the context such as an N-gram model
- the word candidate displayed on the top page can better conform to the user's quick input intention, so that the user can select the candidate that meets the fast input intention without turning the page, because Saves page turning operations, so it can effectively reduce user operating costs and improve input efficiency.
- the third embodiment of the method is an optional embodiment of the method embodiment 1 shown in FIG. 1 or the second embodiment of the method shown in FIG. 2 , which is based on the method embodiment 1 shown in FIG. 1 or the second embodiment of the method shown in FIG. 2 .
- the process of acquiring the phrase candidate corresponding to the input string according to the language model is described in detail.
- a language model that depends on the context (such as an N-gram grammar model) can be used to obtain a phrase candidate corresponding to the input string, so that the phrase candidate can be made more reasonable, that is, the quality of the phrase candidate can be improved.
- the method may include the following steps:
- Step 301 Receive an input string with a fast input intention; the fast input is intended to input a word or a phrase by using the input string corresponding to a shorthand information of a word or a phrase;
- Step 302 Perform segmentation on the input string to obtain corresponding multiple substrings.
- Step 303 Determine a vocabulary entry that meets the fast input intent of each substring.
- Step 304 Input a combination of vocabulary entries corresponding to the plurality of substrings to a language model, and output, by the language model, a probability of combining the vocabulary entries; the lexical entry combination is obtained according to a combination of vocabulary entries of all substrings;
- Step 305 Select, according to a probability of combining the vocabulary entries, a phrase candidate corresponding to the input string from the combination of vocabulary entries;
- Step 306 Acquire a word candidate corresponding to the input string according to a language model; the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string;
- Step 307 Present the word candidate and/or phrase candidate to the user.
- each substring obtained by the step 302 can be used to represent an independent word.
- the input string can have multiple segmentation schemes.
- the input string can be segmented in units of characters, such that each substring obtained by segmentation can have one or more characters.
- the input string “whn2p” as an example, it can be divided into substrings such as “w”, “h”, “n”, “2”, and “p” in units of a single character.
- the input string “in2tix” can be divided into substrings such as “in”, "2", and “tix”.
- the input string “cu” can be divided into substrings such as "c” and "u”. It can be understood that each segmentation scheme can have a corresponding segmentation result, so an input string can correspond to one or more segmentation results.
- the vocabulary entry obtained in step 303 can be used to indicate a complete word corresponding to each substring when it is a shorthand information of a word.
- the step 303 of determining the vocabulary entry corresponding to the fast input intention of each substring may include: acquiring the vocabulary entry corresponding to each substring according to the preset mapping rule.
- the preset mapping rule may be a mapping rule corresponding to a word or a phrase.
- step 303 may map each substring to a corresponding vocabulary entry in Table 1, that is, the vocabulary entry corresponding to the quick input intent of each substring may be a word or a phrase.
- Mapping rule type Mapping example Initial mapping See ⁇ s,you ⁇ y Non-initial mapping You ⁇ u, are ⁇ r,of ⁇ f Homophone mapping See ⁇ c,ticks ⁇ tix Multi-letter mapping Your ⁇ ur,ticks ⁇ tix, Digital mapping Eit/eat ⁇ 8, for/four/fore ⁇ 4,to/too/tu ⁇ 2 Custom mapping Im ⁇ I am,im ⁇ I’m,am ⁇ I’m,cy ⁇ could you,
- the preset mapping rule may specifically include: a pronunciation mapping rule, where the step of acquiring a vocabulary entry corresponding to each substring according to the preset mapping rule may specifically include: The pronunciation mapping rule maps characters in the substring to corresponding alphabet characters to obtain a vocabulary entry corresponding to the substring.
- the pronunciation mapping rule may include the homophonic letter mapping or the digital mapping in Table 1. The mapping of each substring may be performed according to the mapping relationship corresponding to the above homophonic letter mapping or digital mapping.
- the vocabulary entry may form at least one vocabulary entry combination. For example, multiple substrings “w”, “h”, “n”, “2”, “p” of the input string “whn2p” may form "what's happening now to Peter", “we have nothing to present”, “we have No to park” and so on. It should be noted that the same or different preset mapping rules may be used for different sub-strings, and one or more preset mapping rules may be used for one sub-string. The specific use of the preset mapping rules in this embodiment of the present application. The process is not limited.
- Step 304 may input a combination of vocabulary entries corresponding to the plurality of substrings to a language model, and output a probability of the vocabulary entry combination by the language model.
- a quantity threshold such as 3
- the vocabulary item combination may also be input to the language model along with the corresponding context data, thereby improving the phrase The quality of the candidate.
- the language model can use a sliding window with n entries to see if there is a relationship between two or three or more vocabulary entries that are consecutive or discontinuous, and if so, the vocabulary entries can be combined.
- the association relationship is marked on the path, and the probability of the vocabulary entry is calculated according to all the association relationships on the complete path corresponding to the vocabulary entry combination. It can be understood that the specific process of the language model calculating the probability of the vocabulary entry is not limited in the embodiment of the present application.
- step 305 may sort the vocabulary item combinations according to the probability of lexical item combination, and select the vocabulary item combination of the top P bits from the lexical item combination in order from the largest to the smallest, as a phrase.
- a candidate wherein P is a positive integer greater than or equal to 1.
- a vocabulary greater than the probability threshold can be selected from the lexical item combination based on the probability of lexical item combination Combination of entries as a candidate for a phrase. It can be understood that the specific selection process of the phrase candidate is not limited in the embodiment of the present application.
- the input method of the embodiment of the present application relies on a language model of the context (such as an N-gram grammar model) to obtain a phrase candidate corresponding to the input string, thereby enabling the phrase candidate to be more reasonable, that is, the quality of the phrase candidate can be improved.
- a language model of the context such as an N-gram grammar model
- the phrase candidate displayed on the first page can better conform to the user's quick input intention, so that the user can select the candidate that meets the fast input intention without turning the page, because Saves page turning operations, so it can effectively reduce user operating costs and improve input efficiency.
- FIG. 4 a structural block diagram of an input device embodiment of the present application is shown, which may specifically include: an input string receiving module 401, a candidate obtaining module 402, and a candidate presentation module 403;
- the input string receiving module 401 is configured to receive an input string having a quick input intention; the fast input is intended to input a word or a phrase by using the input string corresponding to a shorthand information of a word or a phrase;
- a candidate obtaining module 402 configured to acquire a word candidate and/or a phrase candidate corresponding to the input string according to a language model; the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string;
- the candidate presentation module 403 is configured to present the word candidate and/or the phrase candidate to the user.
- the candidate obtaining module 402 may specifically include:
- a first determining submodule configured to determine a complete word that meets the fast input intent of the input string
- a first model processing submodule configured to input context data corresponding to the complete word and the input string to a language model, and output, by the language model, a probability of a corresponding combination of the complete word and the context data;
- a first selection submodule configured to select a word candidate corresponding to the input string from the complete words according to the probability of the combination.
- the first determining submodule may specifically include:
- a first determining unit configured to use the complete word with the error string corresponding to the input string or the input string as a complete word corresponding to the fast input intention of the input string;
- a second determining unit configured to map the characters in the input string to corresponding alphabetic characters according to the pronunciation, to obtain a complete word corresponding to the fast input intention of the input string.
- the first determining unit may specifically include:
- a first search subunit configured to search, in a vocabulary, a complete word with the error string corresponding to the input string or the input string as a part, to obtain a fast input intention corresponding to the input string according to a preset shorthand rule Complete word;
- a second search subunit configured to search, in the language model corresponding data, a complete word that is part of the input string or the error correction string corresponding to the input string, according to the input string and the corresponding context data, To get the complete word of the input string corresponding to the quick input intent.
- the context data is adjacent to or not adjacent to the input string.
- the candidate obtaining module 402 may specifically include:
- a second determining submodule configured to determine a vocabulary entry that meets the fast input intent of each substring
- a second model processing submodule configured to input a vocabulary item combination corresponding to the plurality of substrings into a language model, and output, by the language model, a probability of the vocabulary item combination; the vocabulary entry combination is based on vocabulary of all substrings The combination of entries is obtained;
- a second selection submodule configured to select a phrase candidate corresponding to the input string from the combination of the vocabulary entries according to a probability of combining the vocabulary entries.
- the second determining submodule may specifically include:
- the mapping obtaining unit is configured to obtain a vocabulary entry corresponding to each substring according to a preset mapping rule.
- the preset mapping rule may include: a pronunciation mapping rule, where the mapping obtaining unit is specifically configured to map the characters in the substring to corresponding alphabet characters according to the pronunciation mapping rule, A vocabulary entry corresponding to the substring is obtained.
- the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
- FIG. 5 is a block diagram of an apparatus 900 for input, according to an exemplary embodiment.
- device 900 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a gaming console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.
- apparatus 900 can include one or more of the following components: processing component 902, memory 904, power component 906, multimedia component 908, audio component 910, input/output (I/O) interface 912, sensor component 914, And a communication component 916.
- Processing component 902 typically controls the overall operation of device 900, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
- Processing component 902 can include one or more processors 920 to execute instructions to perform all or part of the steps described above.
- processing component 902 can include one or more modules to facilitate interaction between component 902 and other components.
- processing component 902 can include a multimedia module to facilitate interaction between multimedia component 908 and processing component 902.
- Memory 904 is configured to store various types of data to support operation at device 900. Examples of such data include instructions for any application or method operating on device 900, Person data, phone book data, messages, pictures, videos, etc.
- Memory 904 can be implemented by any type of volatile or non-volatile storage device, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM, Electrically Erasable). Programmable Read-Only Memory), Erasable Programmable Read Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash memory, disk or CD.
- SRAM static random access memory
- EEPROM electrically erasable programmable read only memory
- EPROM Erasable Programmable Read Only Memory
- PROM Programmable Read-Only Memory
- ROM Read Only Memory
- Magnetic Memory Flash memory
- flash memory flash memory
- Power component 906 provides power to various components of device 900.
- Power component 906 can include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for device 900.
- the multimedia component 908 includes a screen between the device 900 and the user that provides an output interface.
- the screen may include a liquid crystal display (LCD) and a touch panel (TP, Touch Panel). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user.
- the touch panel includes one or more touch sensors to sense touches, slides, and gestures on the touch panel. The touch sensor may sense not only the boundary of the touch or sliding motion action, but also the duration and pressure associated with the touch or slide operation.
- the multimedia component 908 includes a front camera and/or a rear camera. When the device 900 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
- the audio component 910 is configured to output and/or input an audio signal.
- audio component 910 includes a microphone (MIC) that is configured to receive an external audio signal when device 900 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode.
- the received audio signal may be further stored in memory 904 or transmitted via communication component 916.
- the audio component 910 also includes a speaker for outputting an audio signal.
- the I/O interface 912 provides an interface between the processing component 902 and the peripheral interface module, which may be a keyboard, a click wheel, a button, or the like. These buttons may include, but are not limited to, a home button, a volume button, a start button, and a lock button.
- Sensor assembly 914 includes one or more sensors for providing various aspects to device 900 State assessment.
- sensor component 914 can detect an open/closed state of device 900, relative positioning of components, such as the display and keypad of device 900, and sensor component 914 can also detect a change in position of one component of device 900 or device 900. The presence or absence of user contact with device 900, device 900 orientation or acceleration/deceleration, and temperature variation of device 900.
- Sensor assembly 914 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
- Sensor component 914 may also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) or a charge-coupled device (CCD) image sensor for use in imaging applications.
- CMOS complementary metal oxide semiconductor
- CCD charge-coupled device
- the sensor component 914 can also include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
- Communication component 916 is configured to facilitate wired or wireless communication between device 900 and other devices.
- the device 900 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof.
- the communication component 916 receives a broadcast signal or broadcast associated information from an external broadcast management system via a broadcast channel.
- the communication component 916 also includes a Near Field Communication (NFC) module to facilitate short range communication.
- NFC Near Field Communication
- the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT, BlueTooth) technology, and other technologies.
- RFID Radio Frequency Identification
- IrDA Infrared Data Association
- UWB Ultra Wideband
- Bluetooth BT, BlueTooth
- the device 900 may be implemented by one or more Application Specific Integrated Circuits (ASICs), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), and a programmable A Programmable Logic Device (PLD), Field-Programmable Gate Array (FPGA), controller, microcontroller, microprocessor or other electronic component implementation for performing the above method.
- ASICs Application Specific Integrated Circuits
- DSP Digital Signal Processor
- DSPD Digital Signal Processing Device
- PLD programmable A Programmable Logic Device
- FPGA Field-Programmable Gate Array
- non-transitory computer readable storage medium comprising instructions, such as a memory 904 comprising instructions executable by processor 920 of apparatus 900 to perform the above method.
- the non-transitory computer readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device.
- the smart terminal When executed by the processor, the smart terminal is enabled to perform an input method, the method comprising: receiving an input string having a quick input intent; the fast input is intended to be used by the input corresponding to the shorthand information of the word or phrase a string, inputting a word or a phrase; acquiring a word candidate and/or a phrase candidate corresponding to the input string according to a language model; the word candidate and the phrase candidate are respectively a complete word and a complete phrase corresponding to the input string; Word candidates and/or phrase candidates.
- the server 1900 can vary considerably depending on configuration or performance, and can include one or more central processing units (CPUs) 1922 (eg, one or more processors) and memory 1932, one or one The above storage medium 1942 or storage medium 1930 of data 1944 (eg, one or one storage device in Shanghai).
- the memory 1932 and the storage medium 1930 may be short-term storage or persistent storage.
- the program stored on storage medium 1930 may include one or more modules (not shown), each of which may include a series of instruction operations in the server.
- central processor 1922 can be configured to communicate with storage medium 1930, which performs a series of instruction operations in storage medium 1930.
- Server 1900 may also include one or more power sources 1926, one or more wired or wireless network interfaces 1950, one or more input and output interfaces 1958, one or more keyboards 1956, and/or one or more operating systems 1941.
- power sources 1926 For example, Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
- Figure 7 shows a computing device for performing an input method in accordance with the present application.
- the computing device conventionally includes a processor 1410 and a program product or readable medium in the form of a memory 1420.
- the memory 1420 may be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read Only Memory), an EPROM, or a ROM.
- Memory 1420 has a memory space 1430 for program code 1431 for performing any of the method steps described above.
- storage space 1430 for program code may include various program code 1431 for implementing various steps in the above methods, respectively.
- These program codes can be read from or written to one or more program products.
- These program products include program code carriers such as memory cards.
- Such a program product is typically a portable or fixed storage unit as described with reference to FIG.
- the storage unit may have a storage segment, storage similar to the storage 1420 in the computing device of FIG. Space, etc.
- the program code can be compressed, for example, in an appropriate form.
- the storage unit includes readable code 1431', ie, code that can be read by, for example, a processor such as 1410, which when executed by the computing device causes the computing device to perform various steps in the methods described above .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Document Processing Apparatus (AREA)
Abstract
一种输入方法和装置、一种用于输入的装置,其中的方法具体包括:接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组(101);依据统计语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组(102);向用户展现所述单词候选和/或词组候选(103)。本方法可以提高快速输入的灵活性和适用范围,而且可以提高单词候选和/或词组候选的质量,进而提高输入效率。
Description
本申请要求在2016年10月31日提交中国专利局、申请号为201610932804.4、发明名称为“一种输入方法和装置、一种用于输入的装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及信息输入技术领域,特别是涉及一种输入方法和装置、一种用于输入的装置。
输入法是指为了将各种文字输入例如智能手机、台式计算机的智能终端而采用的编码方法。目前,按键率是衡量输入法性能的一个重要指标;该按键率也即平均输入N个字符所需的按键次数,通常,该按键次数越小,则按键率和对应的输入效率越高。为了提高输入效率,对于英文、意大利文、葡萄牙文、马来西亚文等语言的用户而言,可以通过输入法程序与智能终端进行交互。
在输入英文单词时,一般的输入法程序,大多采用前缀匹配的策略来实现英文单词的快速输入,以使用户通过尽可能少的按键次数来实现英文单词的输入。其中,可以预先在字典中收录英文单词,在接收到用户的输入串后,将该输入串与字典中英文单词的前面部分进行匹配,并将匹配成功的英文单词作为候选。例如,用户欲要输入“before”,当输入“be”这个输入串时,输入法程序会查找字典中以“be”开头的英文单词,以得到“before”、“befall”、“beguile”、“beneath”等候选,使得用户可以不用完整输入,通过候选就可以上屏欲要输入的英文单词。
发明人在实施本申请的过程中发现,上述前缀匹配的策略需要用户准确记忆英文单词的前面部分,这不仅增加了用户的记忆难度;并且,当用户无法准备记忆英文单词的前面部分将无法实现英文单词的快速输入,此种情况下,用户需要通过查阅资料等方式获得英文单词的前面部分或者完整字符
串,因此影响了英文单词的输入效率。
并且,如果输入串属于多个英文单词的前缀,输入法程序会返回较多候选,用户需要经过多次翻页等操作进行查找。而多次翻页等操作使得用户的操作和时间成本很大,导致输入效率很低。
发明内容
鉴于上述问题,提出了本申请实施例以便提供一种克服上述问题或者至少部分地解决上述问题的输入方法、输入装置及用于输入的装置,本申请实施例不仅可以提高快速输入的灵活性和适用范围,而且可以提高单词候选和/或词组候选的质量,进而提高输入效率。
为了解决上述问题,本申请公开了一种输入方法,包括:
接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;
依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;
向用户展现所述单词候选和/或词组候选。
另一方面,本申请公开了一种输入装置,包括:
输入串接收模块,用于接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;
候选获取模块,用于依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;以及
候选展现模块,用于向用户展现所述单词候选和/或词组候选。
可选地,所述候选获取模块包括:
第一确定子模块,用于确定符合所述输入串对应快速输入意图的完整单词;
第一模型处理子模块,用于将所述完整单词和所述输入串对应的上下文数据输入至语言模型,由所述语言模型输出所述完整单词和所述上下文数据
对应组合的概率;
第一选择子模块,用于依据所述组合的概率,从所述完整单词中选择所述输入串对应的单词候选。
可选地,所述第一确定子模块包括:
第一确定单元,用于将以所述输入串或者所述输入串对应的纠错串为部分的完整单词,作为符合所述输入串对应快速输入意图的完整单词;或者
第二确定单元,用于按照发音,将所述输入串中字符映射为对应的字母字符,以得到所述输入串对应快速输入意图的完整单词。
可选地,所述第一确定单元包括:
第一查找子单元,用于按照预置简写规则,在词库中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;或者
第二查找子单元,用于依据所述输入串及其对应的上下文数据,在所述语言模型对应数据中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词。
可选地,所述上下文数据与所述输入串相邻或者不相邻。
可选地,所述候选获取模块包括:
切分子模块,用于对所述输入串进行切分,以得到对应的多个子串;
第二确定子模块,用于确定符合各子串对应快速输入意图的词汇条目;
第二模型处理子模块,用于将所述多个子串对应的词汇条目组合输入至语言模型,由所述语言模型输出所述词汇条目组合的概率;所述词汇条目组合依据所有子串的词汇条目组合得到;
第二选择子模块,用于依据所述词汇条目组合的概率,从所述词汇条目组合中选择所述输入串对应的词组候选。
可选地,所述第二确定子模块包括:
映射获取单元,用于按照预置映射规则,获取各子串对应的词汇条目。
可选地,所述预置映射规则包括:发音映射规则,则所述映射获取单元,具体用于按照所述发音映射规则,将所述子串中字符映射为对应的字母字
符,以得到所述子串对应的词汇条目。
再一方面,本申请公开了一种用于输入的装置,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:
接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;
依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;
向用户展现所述单词候选和/或词组候选。
本申请实施例包括以下优点:
本申请实施例依据语言模型获取输入串对应的单词候选和/或词组候选;由于上述语言模型可以依据所述语言模型对应数据统计得到各种概率参数,这样,本申请实施例借助于语言模型的概率参数,可以估计出自然语言中各单词或者各词序列出现的可能性,而不是简单的判断该单词或者该词序列是否符合文法,因此,本申请实施例可以在输入串省略的字符位于单词的任意位置时,给出符合所述语言模型对应数据的习惯用法的单词候选,或者,可以在输入串省略的字符位于词组的各单词的任意位置时,给出符合所述语言模型对应数据的习惯用法的词组候选,也即,本申请实施例不仅可以提高快速输入的灵活性和适用范围,而且可以提高单词候选和/或词组候选的质量,进而提高输入效率。
而在单词候选或词组候选符合所述语言模型对应数据的习惯用法的情况下,展现在首页的单词候选和/或词组候选可以较好地符合用户的快速输入意图,以使用户通过较少的按键操作完成单词或者词组的输入,提高输入效率;并且,可以使在不进行翻页的情况下选择符合快速输入意图的候选,由于可以节省翻页操作,因此可以有效降低用户的操作成本,提高输入效率。例如,用户欲要输入词组“talk to you later”,传统的输入方法需要分别输入4个单词,该4个单词的输入各需要4、2、3、5共14次字母击键,4次选
择候选击键和3次空格击键,共计21次按键操作;而应用本申请实施例,用户可以通过输入串“ttyl”完成词组“talk to you later”的输入,需要4次字母击键和1次候选击键,共计5次按键操作,因此能够极大地提升输入效率。
图1是本申请的一种输入方法实施例一的步骤流程图;
图2是本申请的一种输入方法实施例二的步骤流程图;
图3是本申请的一种输入方法实施例三的步骤流程图;
图4是本申请的一种输入装置的结构框图;
图5是本申请的一种用于输入的装置900的框图;
图6是本申请的一些实施例中服务器的结构示意图;
图7是用于执行根据本申请的输入方法的计算设备的框图;
图8是用于保持或者携带实现根据本申请的输入方法的程序代码的存储单元。
为使本申请的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本申请作进一步详细的说明。
方法实施例一
参照图1,示出了本申请的一种输入方法实施例一的步骤流程图,具体可以包括如下步骤:
步骤101、接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;
步骤102、依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;
步骤103、向用户展现所述单词候选和/或词组候选。
本申请实施例可以适用于英文、意大利文、葡萄牙文、马来西亚文等拉
丁字母语言的快速输入,也可以适用于俄罗斯文等非拉丁字母语言的快速输入,以使用户通过表征单词或者词组的简写信息的输入串实现单词或者词组的快速输入。可选地,对于本申请实施例所适用的语言而言,其输入串与单词可以表现为相同的文本形式,也即,无需对输入串进行语言的转换而可以直接得到与输入串文本形式相同的单词候选,如对应英文而言,输入串可以表现为字母形式,而英文单词也可以表现为字母形式。可以理解,输入串与单词的文本形式相同的任意语言均在本申请实施例的保护范围之内,本申请实施例主要以英文的输入过程为例进行说明,其他语言的输入过程相互参照即可。
本申请实施例可以应用于各种输入方式的输入法程序,例如上述输入方式具体可以包括键盘符号、手写信息、语音输入等输入方式,即用户可以通过编码字符串、手写输入信息、语音输入信息等输入输入串。下面仅以编码字符串(以下简称输入串)的输入方式为例进行说明,其它输入方式相互参见即可。
本申请实施例提供的输入方法可应用于输入法程序的客户端与服务器对应的应用环境中,其中,输入法程序的客户端与服务器可以位于有线或无线网络中,通过该有线或无线网络,客户端与服务器进行数据交互,也即,本申请实施例的输入方法可由客户端和服务器中的任一来执行,本申请实施例对于输入方法中各步骤的具体执行主体不加以限制。
具体地,输入法程序的的客户端可以运行在智能终端上,该客户端可以捕获用户在输入过程中的输入串。上述智能终端具体可以包括但不限于:智能手机、平板电脑、电子书阅读器、MP3(动态影像专家压缩标准音频层面3,Moving Picture Experts Group Audio Layer III)播放器、MP4(动态影像专家压缩标准音频层面4,Moving Picture Experts Group Audio Layer IV)播放器、膝上型便携计算机、车载电脑、台式计算机、机顶盒、智能电视机、可穿戴设备等等。
在实际应用中,用户在具有快速输入意图时,可通过与单词或者词组的简写信息相应的输入串,实现单词或词组的快速输入。
由于输入串与单词或词组的简写信息相应,故输入串可以为单词或词组的一部分,例如,输入串所包含字符均为单词所包含字符,但输入串所包含字符的数量小于单词所包含字符的数量等,这样,可以支持在省略单词或词组所包含任意字符的简写信息,也即,可以省略单词的位于任意位置(如前面位置、中间位置、后面位置等)的字符,因此能够提高快速输入的灵活性和适用范围。
或者,输入串可以与单词或词组的整体或部分具有映射关系。其中,输入串中可以包括与单词的发音具有映射关系的数字字符或者字母字符,如可以用8/4分别来映射英文单词中发音为/eit/和的整体或片段;或者,对于印尼语/马来语单词“selamat”,由于“slmt”能够确定其大致发音,故可以用输入串“slmt”来简写,当然也可用“selmt”、“slmat”等其他形式来简写。因此,本申请的上述与单词的发音具有映射关系的数字字符,可以通过尽可能少的按键次数输入单词或词组,因此能够大大提升输入效率。
在本申请的一种可选实施例中,上述输入串与单词或词组的整体或部分具有映射关系具体可以包括:谐音、映射简写等。其中,谐音可以按照单词或者词组的发音对单词或词组的整体或者部分进行映射,例如,fore→4、eat→8、see→c、ticks→tix、your→ur,are→r,see→s等。映射简写可以基于当前语言的普遍简写习惯,也可以基于用户的个人习惯,例如,本申请实施例的映射简写可以包括:please→pls、tomorrow→tml、by the way→btw、as soon as possible→ASAP,could you→cy等等。
通过输入串的两种方案(为单词或词组的一部分,或者,与单词或词组的整体或部分具有映射关系)可知,在文本形式方面,本申请实施例的输入串可以包括:字母、数字等其他字符的任一或者组合。其中,当输入串包括字母时,该字母可以位于单词的任意位置,例如,用户欲要输入英文单词“before”,则其可以输入该英文单词所包含的任意字母如“be”或者“fo”或者“bf”、“rb”等,可以看出,该输入串所包含的多个字母可以相邻或者不相邻,并且,该输入串所包含的多个字母之间的顺序可以与其在单词中的顺序不一致,也即,由于本申请实施例的输入串可以包括位于单词的任意位
置的字母,因此能够提高快速输入的灵活性和适用范围。其中,当该输入串所包含的多个字母之间的顺序可以与其在单词中的顺序不一致时,本申请实施例可以利用该输入串的上下文数据调整该输入串所包含的多个字母的顺序,最终得到较为合理的单词候选。
当输入串包括数字时,该数字可以与单词的发音具有映射关系的数字字符。如可以用8/4分别来映射英文单词中发音为/eit/和的整体或片段,具体地,发音为/eit/的整体可以包括“eat”,发音为/eit/的片段(如单词“great”的片段)可以包括“eit”;发音为的整体可以包括“for”、“four”等,发音为的片段(如单词“before”的片段)可以包括“fore”等。
在实际应用中,步骤101可以键盘符号、手写信息、语音输入等输入方式接收输入串。可选地,可以将所接收输入串直接作为具有快速输入意图的输入串,也即,一旦输入法程序接收到用户输入的输入串,均可以将其作为具有快速输入意图的输入串并将其应用于本申请实施例的输入方法。或者,还可以判断所接收输入串是否具有快速输入意图;其中,判断所接收输入串是否具有快速输入意图的方式可以有多种,例如,可以判断输入串是否为完整的单词或者词组,若否,则可以确定所接收输入串具有快速输入意图;又如,可以判断输入串中是否包括非字母字符,若是,则可以确定所接收输入串具有快速输入意图,可以理解,本申请实施例对于具体的判断方式不加以限制。
步骤102可以依据语言模型获取所述输入串对应的单词候选和/或词组候选。上述语言模型可以依据所述语言模型对应数据统计得到各种概率参数,这样,本申请实施例借助于语言模型的概率参数,可以估计出自然语言中各单词或者各词序列出现的可能性,而不是简单的判断该单词或者该词序列是否符合文法,因此,本申请实施例可以在输入串省略的字符位于单词的任意位置时,给出符合所述语言模型对应数据的习惯用法的单词候选,或者,可以在输入串省略的字符位于词组的各单词的任意位置时,给出符合所述语言模型对应数据的习惯用法的词组候选,也即,本申请实施例可以更加灵活地处理具有快速输入意图的输入串,并给出较为合理的单词候选或词组候
选。
本申请实施例中,语言模型是根据语言客观事实而进行的语言抽象数学建模,其可以在语言模型与语言客观事实之间建立某种对应关系,本申请实施例主要以统计语言模型为例进行说明,非统计语言模型相互参照即可。
可选地,统计语言模型可以概率分布的形式描述任意词序列S属于某种语言集合的可能性,这里并不要求词序列S在语法上是完备的,该统计语言模型可以对任意的词序列S可以给出一个概率参数值,相应的计算公式可以表示为:
p(S)=p(w1,w2,w3,w4,w5,…,wn)
=p(w1)p(w2|w1)p(w3|w1,w2)...p(wn|w1,w2,...,wn-1) (1)
公式(1)中,S包括n个字母,公式(1)中wi表示词序列中的第i个词。可选地,训练“语言模型”的过程,就是估计模型参数P(wi|wi-n+1,...,wi-1)的过程,其中,P(wi|wi-n+1,...,wi-1)可用于表示前n-1个词为wi-n+1,...,wi-1、后词为wi出现的概率。
依据统计语言模型的概念,现有的统计语言模型可以基于统计算法对预置语料进行处理,以给出词序列的概率,或者,在给定上下文数据的情况下,预测下一个最可能出现的单词。
在实际应用中,可以采用任意的统计语言模型来实施本申请实施例的输入方法。例如,上述统计语言模型具体可以包括:上下文无关模型、N元文法模型(N-gram Model)、隐马尔科夫模型(HMM,Hidden Markov Model)、最大熵模型(Maximum Entropy Model)、循环神经网络模型(RNN,Recurrent Neural Networks Model)。其中,上下文无关模型可以不依赖于上下文环境,N元文法模型、HMM模型、最大熵模型、RMM模型等需要依赖于上下文环境,N元文法模型、HMM模型、最大熵模型、RMM模型使用的机器学习方法不同,HMM模型、最大熵模型、RMM模型所使用的机器学习方法不仅考虑了预置语料(也即训练文本)之间的联系,而且使用了训练文本的时序特性;而N元文法模型可以不考虑训练文本之间的联系。
本申请实施例中,统计语言模型所需的预置语料可以来源于已有的语料
库,如对于英文的快速输入,已有的语料库可以包括英文语料库等,或者,统计语言模型所需的预置语料还可以来源于著名书籍、互联网语料、输入法程序记载的历史输入记录等。可以理解,任意的语料均在本申请实施例的预置语料的保护范围之内。
在本申请的一种应用示例1中,用户欲要输入英文单词“before”,假设其可以输入该英文单词所包含的任意字母对应的输入串,如“be”或者“fo”或者“bf”、“rb”等,则本申请实施例可以依据统计语言模型获得该输入串对应完整单词的概率,或者,可以获得该输入串对应完整单词及其对应的上下文数据的概率。假设在未考虑上下文数据的情况下,不依赖于上下文环境的统计语言模型可以给出包含“fo”这个片段的完整单词的概率,则可以依据该概率的大小给出该输入串对应的合理单词候选,如“for”、“before”等。或者,用户在输入“The bus had left before I got there”的过程中,欲要通过输入串“fo”快速输入“before”,假设该输入串的上文数据包括“The bus had left”,下文数据包括“I”,则依赖于上下文环境的统计语言模型可以给出包含“fo”这个片段的完整单词及其上下文数据所对应词序列的概率,最终得到概率最大的词序列所对应的单词候选“before”。
在本申请的一种应用示例2中,用户欲要输入英文词组“what’s happening now to Peter”,假设其可以输入省略位于词组的各单词的任意位置的字符的输入串,如“whn2p”,则本申请实施例可以依据统计语言模型获得该输入串对应词汇条目组合的概率,并依据该概率从大到小的顺序给出该输入串对应的合理词组候选,如“what’s happening now to Peter”、“we have nothing to present”等。本申请实施例在获取该输入串对应的合理词组候选的过程中,将字符“P”映射为人名,可以理解,上述“Peter”只是作为字符“P”对应人名的一种示例,实际上,本领域技术人员可以根据实际应用需求将字符“P”映射为除了“Peter”之外的人名,如英文人名“Pavel”、“Pinto”、“pinto”、“Pascal”、或者中文人名“Peijian”等。可选地,还可以从当前用户的历史输入内容中获取频率较高的人名,作为字符“P”对应人名等等,以符合用户的个性化输入需求。另外,用户还可以通过除了“whn2p”之外的输入串
进行英文词组“what’s happening now to Peter”的输入,如除了“whn2p”之外的输入串可以为“whntp”等。
在实际应用中,单词候选或者词组候选的获取方案可以为相互独立的方案。并且,一个输入串既能解释为单词,又能解释为词组,则可以同时给出两种候选,供用户按需选择。其中,可以根据单词候选或者词组候选的概率判断输入串是否能够解释为单词或词组,可选地,若输入串对应单词候选或者词组候选的概率高于相应的概率阈值,则可以认为输入串能够解释为单词或词组。
另外,在获得单词候选和/或词组候选后,输入法程序可以通过候选窗口向用户展现单词候选和/或词组候选,以供用户选择。可选地,可以按照任意顺序对单词候选和/或词组候选进行展现,例如,首先展现多个单词候选然后展现多个词组候选,或者,一个单词候选一个词组候选的交替展现,或者,按照单词候选或者词组候选的概率从大到小的顺序进行展现等,可以理解,本申请实施例对于具体的展现方式不加以限制。
综上,本申请实施例的输入方法,依据语言模型获取输入串对应的单词候选和/或词组候选;由于上述语言模型可以依据所述语言模型对应数据统计得到各种概率参数,这样,本申请实施例借助于语言模型的概率参数,可以估计出自然语言中各单词或者各词序列出现的可能性,而不是简单的判断该单词或者该词序列是否符合文法,因此,本申请实施例可以在输入串省略的字符位于单词的任意位置时,给出符合所述语言模型对应数据的习惯用法的单词候选,或者,可以在输入串省略的字符位于词组的各单词的任意位置时,给出符合所述语言模型对应数据的习惯用法的词组候选,也即,本申请实施例不仅可以提高快速输入的灵活性和适用范围,而且可以提高单词候选和/或词组候选的质量,进而提高输入效率。
而在单词候选或词组候选符合所述语言模型对应数据的习惯用法的情况下,展现在首页的单词候选和/或词组候选可以较好地符合用户的快速输入意图,以使用户在不进行翻页的情况下选择符合快速输入意图的候选,由于可以节省翻页操作,因此可以有效降低用户的操作成本,提高输入效率。
方法实施例二
方法实施例二为图1所示方法实施例一的可选实施例,其在图1所示方法实施例一的基础上,对依据语言模型获取所述输入串对应的单词候选的过程进行了详细介绍。
在实际应用中,可以采用不依赖于上下文环境的语言模型(如上下文无关模型)或者依赖于上下文环境的语言模型(如N元文法模型)获取输入串对应的单词候选。其中,不依赖于上下文环境的语言模型具有运算简单的优点,依赖于上下文环境的语言模型能够使得单词候选更加合理,也即能够提高单词候选的质量。
参照图2,示出了本申请的一种输入方法实施例二的步骤流程图,具体可以包括如下步骤:
步骤201、接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;
步骤202、确定符合所述输入串对应快速输入意图的完整单词;
步骤203、将所述完整单词和所述输入串对应的上下文数据输入至语言模型,由所述语言模型输出所述完整单词和所述上下文数据对应组合的概率;
步骤204、依据所述组合的概率,从所述完整单词中选择所述输入串对应的单词候选;
步骤205、依据语言模型获取所述输入串对应的词组候选;上述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;
步骤206、向用户展现所述单词候选和/或词组候选。
本申请实施例通过上述步骤202-步骤204对依赖于上下文环境的语言模型(如N元文法模型)获取输入串对应的单词候选的过程进行了详细介绍。
由于输入串与单词或词组的简写信息相应,故输入串可以为单词或词组的一部分,或者,输入串可以与单词或词组的整体或部分具有映射关系,因此步骤202可以依据输入串的方案确定符合所述输入串对应快速输入意图的完整单词。
可选地,上述确定符合所述输入串对应快速输入意图的完整单词的步骤202,具体可以包括:
步骤A1、将以所述输入串或者所述输入串对应的纠错串为部分的完整单词,作为符合所述输入串对应快速输入意图的完整单词。
步骤A1可以适用于输入串为单词或词组的一部分的情形,具体的,可以将以所述输入串或者所述输入串对应的纠错串为部分的完整单词。假设英文对应的输入串为“fo”,则以“fo”为部分的完整单词可以包括“for”、“before”等。
在本申请的一种可选实施例中,上述步骤A1对应的查找方式,具体可以包括:
查找方式1、按照预置简写规则,在词库中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;或者
查找方式2、依据所述输入串及其对应的上下文数据,在所述语言模型对应数据中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;或者
查找方式3、依据所述输入串包括的片段和用于标记空缺的预置字符串,在词库中查找以所述片段为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;其中,所述片段可以为所述输入串中除所述预置字符串之外的字符。
其中,查找方式1和查找方式2的查找范围分别为:词库和语言模型对应数据,查找依据分别为:输入串或者所述输入串对应的纠错串、以及输入串及其对应的上下文数据。
可选地,预置简写规则具体可以包括:前缀简写规则和非前缀简写规则等,其中,非前缀简写规则可以进一步包括:省元音简写规则和省任意字母简写规则等。由于辅音字母能确定单词的大致发音,故省元音简写规则能够准确地实现单词的定位。例如,对于印尼语/马来语单词“selamat”,由于“slmt”
能够确定其大致发音,故可以用输入串“slmt”来简写,,当然也可用“selmt”、“slmat”等其他形式来简写。
在实际应用中,查找方式1的查找过程可以为:按照预置简写规则确定输入串的各字符在完整单词中的位置,然后依据该位置进行完整单词的查找。例如,对于省元音简写规则,输入串在完整单词中的位置为开头;对于省元音简写规则,输入串中有的字符在完整单词中的开头,有的字符在末尾,有的字符在中间;对于省任意字母简写规则,则输入串中字符可以位于完整单词的任意位置,且输入串中字符的顺序可以与完整单词中字符的顺序一致或者不一致。
在本申请的一种可选实施例中,查找方式1可以采用类似单词拼写校正的处理方法,在词库中寻找输入串与词库中词条编辑距离(edit distance)最短的一个或多个完整单词。其中,词条编辑距离是指两个字符串之间,由一个转成另一个所需的最少编辑操作次数。允许的编辑操作具体可以包括***、删除、替换、交换等,一般来说,编辑距离越小,两个字符串的相似度越大,因此,上述类似单词拼写校正的处理方法能够在一定程度上保证完整单词的合理性。
需要说明的是,本申请实施例的词库中词条可以为已有词条,也可以为自造词条、自定义词条等,本申请实施例对于具体的词库及其中的具体词条不加以限制。
查找方式2可以依据输入串对应的上下文数据,从所述语言模型对应数据中查找给定上下文数据的、以输入串或者所述输入串对应的纠错串为部分的完整单词。例如,用户在输入“The bus had left before I got there”的过程中,欲要通过输入串“fo”快速输入“before”,输入串“fo”的上文数据包括“The bus had left”,下文数据包括“I”,则可以在所述语言模型对应数据中查找以输入串“fo”为部分的完整单词“before”、“for”等。
需要说明的是,本申请实施例中,输入串对应的纠错串可以在假定输入串具有错误的情况下,对输入串进行纠错得到。可选地,可以采用基于编辑距离的纠错方案和基于统计的纠错方案进行纠错处理。其中,基于编辑距离
的纠错方案可以对输入串的每个位置进行如下纠错尝试:***一个字符、删除一个字符、替换一个字符和替换前后两个字符位置等,以产生该输入串对应的纠错串。基于统计的纠错方案可以通过大数据挖掘生成纠错模型,该纠错模型可用于学习纠错串被错输为输入串的概率。可以理解,本申请实施例对于输入串的具体纠错过程不加以限制。
查找方式3可以采用预置字符串标记空缺。上述预置字符串可以为本领域技术人员或者用户根据实际应用需求预置的、用于标记空缺的任意字符串,如“*”、“?”、“%”、“#”等,也可以是用户随手输入的不代表任何含义的字符,如“(”、“>”等,可以理解,本申请实施例对于具体的预置字符串不加以限制。
在本申请的一种应用示例3中,用户欲要输入英文单词“phenomenon”,但其不记得其中的一些字符,故可以采用预置字符串标记空缺,由输入法程序对预置字符串进行补充,假设用户的输入串“phen*m*”中包括2处“*”,则本申请实施例可以对该2处“*”进行补充。
可选地,上述查找方式3可以按照字符位置,将所述输入串中片段与所述词库中单词词条进行匹配,以得到所述输入串对应的完整单词;其中,所述片段在所述完整单词中的位置与所述片段在所述输入串中的位置是一致的,故可以减小查找空间,提高查找效率。
可以理解,上述查找方式1、查找方式2和查找方式3只是作为获取以所述输入串或者所述输入串对应的纠错串为部分的完整单词的一种可选实施例,实际上,本申请实施例对于以所述输入串或者所述输入串对应的纠错串为部分的完整单词的具体获取过程不加以限制。
步骤A2、按照发音,将所述输入串中字符映射为对应的字母字符,以得到所述输入串对应快速输入意图的完整单词。
在实际应用中,可以按照单词的发音,将输入串中字母或者数字字符映射为对应的字母字符。例如,英文的输入串为“b4”,则可以将其中的数字字符“4”映射为发音的片段“fore”,并进一步,查找以“bfore”为部
分的完整单词“before”。又如,马来西亚文的输入串为“slmt”,则可以通过发音映射得到马来语单词“selamat”。
在本申请的一种应用示例4中,用户欲要输入西班牙文单词“afecta”,其可以输入表征该西班牙文单词的大致发音的字符串“afkt”,则本申请实施例可以利用k→c的发音映射,得到对应的完整单词“afecta”、“afecto”、“afectar”等。同理,还可以利用ft→photo的发音映射进行完整单词的获取,可以通过输入串“ftgrf”快速输入英语单词“photograph”。
在步骤202得到符合所述输入串对应快速输入意图的完整单词后,步骤203可以将所述完整单词和所述输入串对应的上下文数据输入至语言模型,由该语言模型输出该完整单词和该上下文数据对应组合的概率。在实际应用中,由于语言模型所涉及词序列所包含单词的数目通常不会太大,该数目通常为3,则可以从上下文数据中选择欲要输入至语言模型的目标上下文数据,该目标上下文数据可以与输入串形成对应的组合。其中,该目标上下文数据可以与输入串相邻或者不相邻。
例如,用户欲要通过输入串“bl”快速输入英文单词“blue”,该输入串“bl”的上文数据包括:“the sky in the Friday morning is”,则按照语法分析结果,可以从该上文数据中选择目标上下文数据“sky is”,由此可以由语言模型输出较为合理的单词候选“blue”。再如,用户欲要通过输入串“Fr”快速输入英文单词“French”,该输入串“Fr”的上文数据包括:“he have lived in France for 5 years and he can speak fluent”,则可以根据语句分析结果,从该上文数据中选择目标上下文数据“France speak”等,由此可以由语言模型输出较为合理的单词候选“French”。
需要说明的是,在实际应用中,在用户对已输入内容进行编辑的场景下,输入串也可以具有下文数据,此种情况下也可以将输入串的下文数据输入至语言模型。例如,用户将光标移动至已输入内容的某处,并重新键入输入串,则可以同时获取光标处前后的数据作为上下文数据。
在实际应用中,步骤204可以依据所述组合的概率对完整单词进行排序,并按照从概率从大到小的顺序,从完整单词中选取排在前M位的完整单词,
作为单词候选,其中,M为大于等于1的正整数。或者,可以依据所述组合的概率,从完整单词中选取大于概率阈值的完整单词,作为单词候选。可以理解,本申请实施例对于单词候选的具体选取过程不加以限制。
综上,本申请实施例的输入方法,依赖于上下文环境的语言模型(如N元文法模型)获取输入串对应的单词候选,因此能够使得单词候选更加合理,也即能够提高单词候选的质量和输入效率。
而在单词候选的质量较高的情况下,展现在首页的单词候选可以较好地符合用户的快速输入意图,以使用户在不进行翻页的情况下选择符合快速输入意图的候选,由于可以节省翻页操作,因此可以有效降低用户的操作成本,提高输入效率。
方法实施例三
方法实施例三为图1所示方法实施例一或图2所示方法实施例二的可选实施例,其在图1所示方法实施例一或图2所示方法实施例二的基础上,对依据语言模型获取所述输入串对应的词组候选的过程进行了详细介绍。
在实际应用中,可以采用依赖于上下文环境的语言模型(如N元文法模型)获取输入串对应的词组候选,故能够使得词组候选更加合理,也即能够提高词组候选的质量。
参照图3,示出了本申请的一种输入方法实施例三的步骤流程图,具体可以包括如下步骤:
步骤301、接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;
步骤302、对所述输入串进行切分,以得到对应的多个子串;
步骤303、确定符合各子串对应快速输入意图的词汇条目;
步骤304、将所述多个子串对应的词汇条目组合输入至语言模型,由所述语言模型输出所述词汇条目组合的概率;所述词汇条目组合依据所有子串的词汇条目组合得到;
步骤305、依据所述词汇条目组合的概率,从所述词汇条目组合中选择所述输入串对应的词组候选;
步骤306、依据语言模型获取所述输入串对应的单词候选;上述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;
步骤307、向用户展现所述单词候选和/或词组候选。
步骤302切分得到的各子串可用于表示独立的单词。在实际应用中,输入串可以具有多种切分方案,例如,可以以字符为单位对输入串进行切分,这样,切分得到的各子串可以具有一个或者多个字符。以输入串“whn2p”为例,可以将以单个字符为单位,将其切分为:“w”、“h”、“n”、“2”、“p”等子串。同理,可以将输入串“in2tix”切分为“in”、“2”、“tix”等子串。或者,可以将输入串“cu”切分为“c”、“u”等子串。可以理解,每种切分方案可以具有对应的切分结果,故一个输入串可以对应一个或者多个切分结果。
步骤303所得到的词汇条目可用于表示,当各子串为单词的简写信息时对应的完整单词。可选地,上述确定符合各子串对应快速输入意图的词汇条目的步骤303,具体可以包括:按照预置映射规则,获取各子串对应的词汇条目。其中,该预置映射规则可以为单词或者词组对应的映射规则。
参照表1,示出了本申请的多种预置映射规则的示意,其具体可以包括:映射规则类型和映射规则示例,该映射规则类型具体可以包括:首字母映射、非首字母映射、谐音字母映射、多字母映射、数字映射、自定义映射等。则步骤303可以将各子串映射为表1中的对应词汇条目,也即,各子串对应快速输入意图的词汇条目可以为单词,也可以为词组。
表1
映射规则类型 | 映射举例 |
首字母映射 | see→s,you→y |
非首字母映射 | you→u,are→r,of→f |
谐音字母映射 | see→c,ticks→tix |
多字母映射 | your→ur,ticks→tix, |
数字映射 | eit/eat→8,for/four/fore→4,to/too/tu→2 |
自定义映射 | im→I am,im→I’m,am→I’m,cy→could you, |
ov→of,tml→tomorrow |
在本申请的一种可选实施例中,所述预置映射规则具体可以包括:发音映射规则,所述按照预置映射规则,获取各子串对应的词汇条目的步骤,具体可以包括:按照所述发音映射规则,将所述子串中字符映射为对应的字母字符,以得到所述子串对应的词汇条目。其中,上述发音映射规则可以包括表1中的谐音字母映射或者数字映射等,则可以按照上述谐音字母映射或者数字映射对应的映射关系,进行各子串的映射。
对于每种切分结果对应的多个子串而言,其词汇条目可以形成至少一个词汇条目组合。如输入串“whn2p”的多个子串“w”、“h”、“n”、“2”、“p”可以形成“what’s happening now to Peter”、“we have nothing to present”、“we have no to park”等。需要说明的是,可以针对不同的子串使用相同或不同的预置映射规则,且可以针对一个子串使用一种或者多种预置映射规则,本申请实施例对于预置映射规则的具体使用过程不加以限制。
步骤304可以将所述多个子串对应的词汇条目组合输入至语言模型,由所述语言模型输出所述词汇条目组合的概率。可选地,当子串对于的词汇条目所包含单词的数量小于语言模型所对应的数量阈值(如3)时,还可以将词汇条目组合连同对应的上下文数据输入至语言模型,由此提高词组候选的质量。
可选地,语言模型可以使用一个条目数为n的滑动窗口,查看连续或不连续的两个或三个或更多词汇条目之间是否存在关联关系,若有则可以将在词汇条目组合对应的路径上标注该关联关系,并依据词汇条目组合对应的完整路径上的所有关联关系,计算得到词汇条目的概率。可以理解,本申请实施例对于语言模型计算词汇条目的概率的具体过程不加以限制。
在实际应用中,步骤305可以依据词汇条目组合的概率对词汇条目组合进行排序,并按照从概率从大到小的顺序,从词汇条目组合中选取排在前P位的词汇条目组合,作为词组候选,其中,P为大于等于1的正整数。或者,可以依据词汇条目组合的概率,从词汇条目组合中选取大于概率阈值的词汇
条目组合,作为词组候选。可以理解,本申请实施例对于词组候选的具体选取过程不加以限制。
需要说明的是,本申请实施例中对所述输入串进行切分的方式只是作为可选实施例,实际上,可以默认一个字符对应一个单词而不进行输入串的切分。
综上,本申请实施例的输入方法,依赖于上下文环境的语言模型(如N元文法模型)获取输入串对应的词组候选,因此能够使得词组候选更加合理,也即能够提高词组候选的质量和输入效率。
而在词组候选的质量较高的情况下,展现在首页的词组候选可以较好地符合用户的快速输入意图,以使用户在不进行翻页的情况下选择符合快速输入意图的候选,由于可以节省翻页操作,因此可以有效降低用户的操作成本,提高输入效率。
需要说明的是,对于方法实施例,为了简单描述,故将其都表述为一系列的运动动作组合,但是本领域技术人员应该知悉,本申请实施例并不受所描述的运动动作顺序的限制,因为依据本申请实施例,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的运动动作并不一定是本申请实施例所必须的。
装置实施例
参照图4,示出了本申请的一种输入装置实施例的结构框图,具体可以包括:输入串接收模块401、候选获取模块402、以及候选展现模块403;
其中,输入串接收模块401,用于接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;
候选获取模块402,用于依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;以及
候选展现模块403,用于向用户展现所述单词候选和/或词组候选。
可选地,所述候选获取模块402具体可以包括:
第一确定子模块,用于确定符合所述输入串对应快速输入意图的完整单词;
第一模型处理子模块,用于将所述完整单词和所述输入串对应的上下文数据输入至语言模型,由所述语言模型输出所述完整单词和所述上下文数据对应组合的概率;
第一选择子模块,用于依据所述组合的概率,从所述完整单词中选择所述输入串对应的单词候选。
可选地,所述第一确定子模块具体可以包括:
第一确定单元,用于将以所述输入串或者所述输入串对应的纠错串为部分的完整单词,作为符合所述输入串对应快速输入意图的完整单词;或者
第二确定单元,用于按照发音,将所述输入串中字符映射为对应的字母字符,以得到所述输入串对应快速输入意图的完整单词。
可选地,所述第一确定单元具体可以包括:
第一查找子单元,用于按照预置简写规则,在词库中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;或者
第二查找子单元,用于依据所述输入串及其对应的上下文数据,在所述语言模型对应数据中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词。
可选地,所述上下文数据与所述输入串相邻或者不相邻。
可选地,所述候选获取模块402具体可以包括:
切分子模块,用于对所述输入串进行切分,以得到对应的多个子串;
第二确定子模块,用于确定符合各子串对应快速输入意图的词汇条目;
第二模型处理子模块,用于将所述多个子串对应的词汇条目组合输入至语言模型,由所述语言模型输出所述词汇条目组合的概率;所述词汇条目组合依据所有子串的词汇条目组合得到;
第二选择子模块,用于依据所述词汇条目组合的概率,从所述词汇条目组合中选择所述输入串对应的词组候选。
可选地,所述第二确定子模块具体可以包括:
映射获取单元,用于按照预置映射规则,获取各子串对应的词汇条目。
可选地,所述预置映射规则具体可以包括:发音映射规则,则所述映射获取单元,具体用于按照所述发音映射规则,将所述子串中字符映射为对应的字母字符,以得到所述子串对应的词汇条目。
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图5是根据一示例性实施例示出的一种用于输入的装置900的框图。例如,装置900可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图5,装置900可以包括以下一个或多个组件:处理组件902,存储器904,电源组件906,多媒体组件908,音频组件910,输入/输出(I/O)的接口912,传感器组件914,以及通信组件916。
处理组件902通常控制装置900的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理元件902可以包括一个或多个处理器920来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件902可以包括一个或多个模块,便于处理组件902和其他组件之间的交互。例如,处理组件902可以包括多媒体模块,以方便多媒体组件908和处理组件902之间的交互。
存储器904被配置为存储各种类型的数据以支持在设备900的操作。这些数据的示例包括用于在装置900上操作的任何应用程序或方法的指令,联
系人数据,电话簿数据,消息,图片,视频等。存储器904可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM,Static RAM),电可擦除可编程只读存储器(EEPROM,Electrically Erasable Programmable Read-Only Memory),可擦除可编程只读存储器(EPROM,Erasable Programmable Read Only Memory),可编程只读存储器(PROM,Programmable Read-Only Memory),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件906为装置900的各种组件提供电力。电源组件906可以包括电源管理***,一个或多个电源,及其他与为装置900生成、管理和分配电力相关联的组件。
多媒体组件908包括在所述装置900和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD,Liquid Crystal Display)和触摸面板(TP,Touch Panel)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动运动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件908包括一个前置摄像头和/或后置摄像头。当设备900处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。
音频组件910被配置为输出和/或输入音频信号。例如,音频组件910包括一个麦克风(MIC),当装置900处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器904或经由通信组件916发送。在一些实施例中,音频组件910还包括一个扬声器,用于输出音频信号。
I/O接口912为处理组件902和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件914包括一个或多个传感器,用于为装置900提供各个方面
的状态评估。例如,传感器组件914可以检测到设备900的打开/关闭状态,组件的相对定位,例如所述组件为装置900的显示器和小键盘,传感器组件914还可以检测装置900或装置900一个组件的位置改变,用户与装置900接触的存在或不存在,装置900方位或加速/减速和装置900的温度变化。传感器组件914可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件914还可以包括光传感器,如互补金属氧化物半导体(CMOS,Complementary Metal Oxide Semiconductor)或电荷耦合元件(CCD,Charge-coupled Device)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件914还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件916被配置为便于装置900和其他设备之间有线或无线方式的通信。装置900可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信部件916经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信部件916还包括近场通信(NFC,Near Field Communication)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID,Radio Frequency Identification)技术,红外数据协会(IrDA)技术,超宽带(UWB,Ultra Wideband)技术,蓝牙(BT,BlueTooth)技术和其他技术来实现。
在示例性实施例中,装置900可以被一个或多个应用专用集成电路(ASIC,Application Specific Integrated Circuit)、数字信号处理器(DSP,Digital Signal Processor)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD,Programmable Logic Device)、现场可编程门阵列(FPGA,Field-Programmable Gate Array)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器904,上述指令可由装置900的处理器920执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
一种非临时性计算机可读存储介质,当所述存储介质中的指令由智能终
端的处理器执行时,使得智能终端能够执行一种输入方法,所述方法包括:接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;向用户展现所述单词候选和/或词组候选。
图6是本申请的一些实施例中服务器的结构示意图。该服务器1900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以***处理器(central processing units,CPU)1922(例如,一个或一个以上处理器)和存储器1932,一个或一个以上存储应用程序1942或数据1944的存储介质1930(例如一个或一个以上海量存储设备)。其中,存储器1932和存储介质1930可以是短暂存储或持久存储。存储在存储介质1930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对服务器中的一系列指令操作。更进一步地,中央处理器1922可以设置为与存储介质1930通信,在服务器1900上执行存储介质1930中的一系列指令操作。
服务器1900还可以包括一个或一个以上电源1926,一个或一个以上有线或无线网络接口1950,一个或一个以上输入输出接口1958,一个或一个以上键盘1956,和/或,一个或一个以上操作***1941,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
图7示出了用于执行根据本申请的输入方法的计算设备。该计算设备传统上包括处理器1410和以存储器1420形式的程序产品或者可读介质。存储器1420可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM或者ROM之类的电子存储器。存储器1420具有用于执行上述方法中的任何方法步骤的程序代码1431的存储空间1430。例如,用于程序代码的存储空间1430可以包括分别用于实现上面的方法中的各种步骤的各个程序代码1431。这些程序代码可以从一个或者多个程序产品中读出或者写入到这一个或者多个程序产品中。这些程序产品包括诸如存储卡之类的程序代码载体。这样的程序产品通常为如参考图8所述的便携式或者固定存储单元。该存储单元可以具有与图7的计算设备中的存储器1420类似布置的存储段、存储
空间等。程序代码可以例如以适当形式进行压缩。通常,存储单元包括可读代码1431’,即可以由例如诸如1410之类的处理器读取的代码,这些代码当由计算设备运行时,导致该计算设备执行上面所描述的方法中的各个步骤。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本申请的真正范围和精神由下面的权利要求指出。
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本申请的范围仅由所附的权利要求来限制
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
以上对本申请所提供的一种输入方法、一种输入装置和一种用于输入的装置,进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。
Claims (12)
- 一种输入方法,其特征在于,包括:接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;向用户展现所述单词候选和/或词组候选。
- 根据权利要求1所述的方法,其特征在于,所述依据语言模型获取所述输入串对应的单词候选的步骤,包括:确定符合所述输入串对应快速输入意图的完整单词;将所述完整单词和所述输入串对应的上下文数据输入至语言模型,由所述语言模型输出所述完整单词和所述上下文数据对应组合的概率;依据所述组合的概率,从所述完整单词中选择所述输入串对应的单词候选。
- 根据权利要求2所述的方法,其特征在于,所述确定符合所述输入串对应快速输入意图的完整单词的步骤,包括:将以所述输入串或者所述输入串对应的纠错串为部分的完整单词,作为符合所述输入串对应快速输入意图的完整单词;或者按照发音,将所述输入串中字符映射为对应的字母字符,以得到所述输入串对应快速输入意图的完整单词。
- 根据权利要求3所述的方法,其特征在于,所述将以所述输入串或者所述输入串对应的纠错串为部分的完整单词,作为符合所述输入串对应快速输入意图的完整单词的步骤,包括:按照预置简写规则,在词库中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;或者依据所述输入串及其对应的上下文数据,在所述语言模型对应数据中查找以所述输入串或者所述输入串对应的纠错串为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;或者依据所述输入串包括的片段和用于标记空缺的预置字符串,在词库中查找以所述片段为部分的完整单词,以得到所述输入串对应快速输入意图的完整单词;其中,所述片段为所述输入串中除所述预置字符串之外的字符。
- 根据权利要求2所述的方法,其特征在于,所述上下文数据与所述输入串相邻或者不相邻。
- 根据权利要求1所述的方法,其特征在于,所述依据语言模型获取所述输入串对应的词组候选的步骤,包括:对所述输入串进行切分,以得到对应的多个子串;确定符合各子串对应快速输入意图的词汇条目;将所述多个子串对应的词汇条目组合输入至语言模型,由所述语言模型输出所述词汇条目组合的概率;所述词汇条目组合依据所有子串的词汇条目组合得到;依据所述词汇条目组合的概率,从所述词汇条目组合中选择所述输入串对应的词组候选。
- 根据权利要求6所述的方法,其特征在于,所述确定符合各子串对应快速输入意图的词汇条目的步骤,包括:按照预置映射规则,获取各子串对应的词汇条目。
- 根据权利要求7所述的方法,其特征在于,所述预置映射规则包括:发音映射规则,所述按照预置映射规则,获取各子串对应的词汇条目的步骤,包括:按照所述发音映射规则,将所述子串中字符映射为对应的字母字符,以得到所述子串对应的词汇条目。
- 一种输入装置,其特征在于,包括:输入串接收模块,用于接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;候选获取模块,用于依据语言模型获取所述输入串对应的单词候选和/ 或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;以及候选展现模块,用于向用户展现所述单词候选和/或词组候选。
- 一种用于输入的装置,其特征在于,包括有存储器,以及一个或者一个以上的程序,其中一个或者一个以上程序存储于存储器中,且经配置以由一个或者一个以上处理器执行所述一个或者一个以上程序包含用于进行以下操作的指令:接收具有快速输入意图的输入串;所述快速输入意图用于通过与单词或者词组的简写信息相应的所述输入串,输入单词或者词组;依据语言模型获取所述输入串对应的单词候选和/或词组候选;所述单词候选、词组候选分别为所述输入串对应的完整单词、完整词组;向用户展现所述单词候选和/或词组候选。
- 一种程序,包括可读代码,当所述可读代码在计算设备上运行时,导致所述计算设备执行根据权利要求1至8中的任一项所述的输入方法。
- 一种可读介质,其中存储了如权利要求11所述的程序。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US16/340,252 US11640503B2 (en) | 2016-10-31 | 2016-11-30 | Input method, input device and apparatus for input |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610932804.4 | 2016-10-31 | ||
CN201610932804.4A CN108008832A (zh) | 2016-10-31 | 2016-10-31 | 一种输入方法和装置、一种用于输入的装置 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2018076450A1 true WO2018076450A1 (zh) | 2018-05-03 |
Family
ID=62023200
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/107989 WO2018076450A1 (zh) | 2016-10-31 | 2016-11-30 | 一种输入方法和装置、一种用于输入的装置 |
Country Status (3)
Country | Link |
---|---|
US (1) | US11640503B2 (zh) |
CN (1) | CN108008832A (zh) |
WO (1) | WO2018076450A1 (zh) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110262911A (zh) * | 2019-06-24 | 2019-09-20 | 北京向上一心科技有限公司 | 输入框的优化方法、优化装置、控制器及存储介质 |
CN110716653A (zh) * | 2018-07-11 | 2020-01-21 | 北京搜狗科技发展有限公司 | 一种联想源确定方法和装置 |
CN112732098A (zh) * | 2019-10-12 | 2021-04-30 | 北京搜狗科技发展有限公司 | 一种输入的方法及相关装置 |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111046268B (zh) * | 2018-10-12 | 2024-04-26 | 北京搜狗科技发展有限公司 | 一种信息推荐方法、装置和电子设备 |
CN113703588A (zh) * | 2020-05-20 | 2021-11-26 | 北京搜狗科技发展有限公司 | 一种输入方法、装置和用于输入的装置 |
CN111859907B (zh) * | 2020-06-11 | 2023-06-23 | 北京百度网讯科技有限公司 | 文字纠错方法、装置、电子设备及存储介质 |
CN112650398A (zh) * | 2020-12-21 | 2021-04-13 | 北京搜狗科技发展有限公司 | 输入方法、装置和介质 |
CN112905024B (zh) * | 2021-01-21 | 2023-10-27 | 李博林 | 单词的音节记录方法及装置 |
CN112925469A (zh) * | 2021-03-31 | 2021-06-08 | 维沃移动通信有限公司 | 内容显示方法、装置、存储介质及电子设备 |
CN115373523A (zh) * | 2021-05-18 | 2022-11-22 | 北京搜狗科技发展有限公司 | 一种输入方法、装置和用于输入的装置 |
CN115016655A (zh) * | 2022-06-09 | 2022-09-06 | 深圳卫安智能机器人科技有限公司 | 基于英文的输入法智能联想方法及相关组件 |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5119296A (en) * | 1989-11-27 | 1992-06-02 | Yili Zheng | Method and apparatus for inputting radical-encoded chinese characters |
CN1442780A (zh) * | 2003-03-12 | 2003-09-17 | 陆家俊 | 英文快速输入法及其键盘、鼠标 |
CN101539808A (zh) * | 2008-03-21 | 2009-09-23 | 吴敬祖 | 一种集成多种汉字输入法和英语句子的快速输入法 |
Family Cites Families (34)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5786776A (en) | 1995-03-13 | 1998-07-28 | Kabushiki Kaisha Toshiba | Character input terminal device and recording apparatus |
US6070160A (en) * | 1995-05-19 | 2000-05-30 | Artnet Worldwide Corporation | Non-linear database set searching apparatus and method |
US7168039B2 (en) * | 1998-06-02 | 2007-01-23 | International Business Machines Corporation | Method and system for reducing the horizontal space required for displaying a column containing text data |
US7030863B2 (en) * | 2000-05-26 | 2006-04-18 | America Online, Incorporated | Virtual keyboard system with automatic correction |
CN1470977A (zh) * | 2002-07-28 | 2004-01-28 | 张保平 | 一种改变拼音文字输入顺序的计算机拼音文字输入方法 |
CA2514324A1 (en) * | 2003-01-22 | 2004-08-05 | Min-Kyum Kim | Apparatus and method for inputting alphabet characters |
US8972444B2 (en) * | 2004-06-25 | 2015-03-03 | Google Inc. | Nonstandard locality-based text entry |
US7584093B2 (en) * | 2005-04-25 | 2009-09-01 | Microsoft Corporation | Method and system for generating spelling suggestions |
CN1869892A (zh) * | 2005-06-01 | 2006-11-29 | 北京优耐数码科技有限公司 | 一种中文短语、短句快速输入的方法和*** |
US7277029B2 (en) * | 2005-06-23 | 2007-10-02 | Microsoft Corporation | Using language models to expand wildcards |
US8413069B2 (en) * | 2005-06-28 | 2013-04-02 | Avaya Inc. | Method and apparatus for the automatic completion of composite characters |
US20070076862A1 (en) * | 2005-09-30 | 2007-04-05 | Chatterjee Manjirnath A | System and method for abbreviated text messaging |
CA2711400A1 (en) * | 2007-01-03 | 2008-07-10 | Kannuu Pty Ltd | Process and apparatus for selecting an item from a database |
US8122022B1 (en) * | 2007-08-10 | 2012-02-21 | Google Inc. | Abbreviation detection for common synonym generation |
US8116569B2 (en) * | 2007-12-21 | 2012-02-14 | Microsoft Corporation | Inline handwriting recognition and correction |
US9733724B2 (en) * | 2008-01-13 | 2017-08-15 | Aberra Molla | Phonetic keyboards |
WO2009096760A2 (ko) * | 2008-02-01 | 2009-08-06 | 단어예측 입력방법 및 그 방법이 구현되는 전자장치 | |
CN101546226B (zh) * | 2009-05-08 | 2012-05-23 | 腾讯科技(深圳)有限公司 | 一种英文输入方法及*** |
US8033959B2 (en) * | 2009-05-18 | 2011-10-11 | Adidas Ag | Portable fitness monitoring systems, and applications thereof |
US8560562B2 (en) * | 2010-07-22 | 2013-10-15 | Google Inc. | Predictive query suggestion caching |
US8988365B2 (en) * | 2010-09-01 | 2015-03-24 | Telefonaktiebolaget L M Ericsson (Publ) | Input precision method for minimizing erroneous entries stemming from instability of a mobile device using an accelerometer and apparatus to detect a shake and apparatus and computer program thereof |
US8713464B2 (en) * | 2012-04-30 | 2014-04-29 | Dov Nir Aides | System and method for text input with a multi-touch screen |
US8756052B2 (en) * | 2012-04-30 | 2014-06-17 | Blackberry Limited | Methods and systems for a locally and temporally adaptive text prediction |
US8732183B2 (en) * | 2012-05-29 | 2014-05-20 | Sap Portals Israel Ltd | Comparing strings of characters |
US9218333B2 (en) * | 2012-08-31 | 2015-12-22 | Microsoft Technology Licensing, Llc | Context sensitive auto-correction |
US8965754B2 (en) * | 2012-11-20 | 2015-02-24 | International Business Machines Corporation | Text prediction using environment hints |
US9231898B2 (en) * | 2013-02-08 | 2016-01-05 | Machine Zone, Inc. | Systems and methods for multi-user multi-lingual communications |
US9031829B2 (en) * | 2013-02-08 | 2015-05-12 | Machine Zone, Inc. | Systems and methods for multi-user multi-lingual communications |
US8996352B2 (en) * | 2013-02-08 | 2015-03-31 | Machine Zone, Inc. | Systems and methods for correcting translations in multi-user multi-lingual communications |
CN104007832B (zh) | 2013-02-25 | 2017-09-01 | 上海触乐信息科技有限公司 | 连续滑行输入文本的方法、***及设备 |
US10303762B2 (en) * | 2013-03-15 | 2019-05-28 | Disney Enterprises, Inc. | Comprehensive safety schema for ensuring appropriateness of language in online chat |
US9355084B2 (en) * | 2013-11-14 | 2016-05-31 | Elsevier B.V. | Systems, computer-program products and methods for annotating documents by expanding abbreviated text |
US9760559B2 (en) * | 2014-05-30 | 2017-09-12 | Apple Inc. | Predictive text input |
US20170052936A1 (en) * | 2015-08-21 | 2017-02-23 | Norman A. Paradis | Computer software program for the automated identification and removal of abbreviations and acronyms in electronic documents |
-
2016
- 2016-10-31 CN CN201610932804.4A patent/CN108008832A/zh active Pending
- 2016-11-30 WO PCT/CN2016/107989 patent/WO2018076450A1/zh active Application Filing
- 2016-11-30 US US16/340,252 patent/US11640503B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5119296A (en) * | 1989-11-27 | 1992-06-02 | Yili Zheng | Method and apparatus for inputting radical-encoded chinese characters |
CN1442780A (zh) * | 2003-03-12 | 2003-09-17 | 陆家俊 | 英文快速输入法及其键盘、鼠标 |
CN101539808A (zh) * | 2008-03-21 | 2009-09-23 | 吴敬祖 | 一种集成多种汉字输入法和英语句子的快速输入法 |
Non-Patent Citations (2)
Title |
---|
GUAN, LIANJUN ET AL.: "An Intelligent Pre-prompt English Language Input Engine Supporting Multiple Fuzzy Match Processing", JOURNAL OF CHENGDU UNVERSITY OF INFORMATION TECHNOLOGY, vol. 27, no. 2, pages 132 - 135, ISSN: 1671-1742 * |
GUAN, LIAN-JUN: "Design anf Application of Intelligent Fault Tolerance English Input Engine", ELECTRONIC TECHNOLOGY & INFORMATION SCIENCE, CHINA MASTER'S THESES FULL-TEXT DATABASE, no. 10, ISSN: 1674-0246 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110716653A (zh) * | 2018-07-11 | 2020-01-21 | 北京搜狗科技发展有限公司 | 一种联想源确定方法和装置 |
CN110716653B (zh) * | 2018-07-11 | 2023-11-21 | 北京搜狗科技发展有限公司 | 一种联想源确定方法和装置 |
CN110262911A (zh) * | 2019-06-24 | 2019-09-20 | 北京向上一心科技有限公司 | 输入框的优化方法、优化装置、控制器及存储介质 |
CN112732098A (zh) * | 2019-10-12 | 2021-04-30 | 北京搜狗科技发展有限公司 | 一种输入的方法及相关装置 |
Also Published As
Publication number | Publication date |
---|---|
US20190340233A1 (en) | 2019-11-07 |
CN108008832A (zh) | 2018-05-08 |
US11640503B2 (en) | 2023-05-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2018076450A1 (zh) | 一种输入方法和装置、一种用于输入的装置 | |
US9411801B2 (en) | General dictionary for all languages | |
CN107291690B (zh) | 标点添加方法和装置、用于标点添加的装置 | |
CN107436691B (zh) | 一种输入法进行纠错的方法、客户端、服务器及装置 | |
WO2021128880A1 (zh) | 一种语音识别方法、装置和用于语音识别的装置 | |
US20140081619A1 (en) | Photography Recognition Translation | |
CN107564526B (zh) | 处理方法、装置和机器可读介质 | |
CN107544684B (zh) | 一种候选词显示方法及装置 | |
CN107291704B (zh) | 处理方法和装置、用于处理的装置 | |
CN108803890B (zh) | 一种输入方法、输入装置和用于输入的装置 | |
CN107274903B (zh) | 文本处理方法和装置、用于文本处理的装置 | |
CN108628813B (zh) | 处理方法和装置、用于处理的装置 | |
CN107092424B (zh) | 一种纠错项的显示方法、装置和用于纠错项的显示的装置 | |
CN109002183B (zh) | 一种信息输入的方法及装置 | |
CN108628819B (zh) | 处理方法和装置、用于处理的装置 | |
CN109101505B (zh) | 一种推荐方法、推荐装置和用于推荐的装置 | |
WO2022135474A1 (zh) | 信息推荐方法、装置及电子设备 | |
US20220171940A1 (en) | Method and device for semantic analysis and storage medium | |
CN107424612B (zh) | 处理方法、装置和机器可读介质 | |
CN107797676B (zh) | 一种单字输入方法及装置 | |
JP7208968B2 (ja) | 情報処理方法、装置および記憶媒体 | |
CN109979435B (zh) | 数据处理方法和装置、用于数据处理的装置 | |
CN110633017A (zh) | 一种输入方法、装置和用于输入的装置 | |
CN112987941B (zh) | 生成候选词的方法及装置 | |
CN109388252B (zh) | 一种输入方法及装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 16919827 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 16919827 Country of ref document: EP Kind code of ref document: A1 |