Summary of the invention
The embodiment of the present invention provides that a kind of information is anti-error to entangle method, to improve error correction accuracy rate.
Correspondingly, device and electronic equipment are entangled the embodiment of the invention also provides a kind of information is anti-error, it is above-mentioned to guaranteeThe realization and application of method.
To solve the above-mentioned problems, entangle method the embodiment of the invention discloses a kind of information is anti-error, specifically include: identification is defeatedEnter after information needs error correction, determines the corresponding error correction candidate information of the input information, the error correction candidate information includes: error correctionThe error correction score value of candidate item and the error correction candidate item;Determine that the input information corresponds to the complete probability of sentence;According to described inComplete probability and error correction score value, determine the amendment score value of the error correction candidate item;After the amendment score value meets preset condition,Show the error correction candidate item.
Optionally, the identification input information needs error correction, comprising: by the input information input into language model,Determine the reference score value of the input information;If described be less than error correction threshold value with reference to score value, it is determined that the input information needsError correction.
Optionally, the determining input information corresponds to the complete probability of sentence, comprising: obtains language according to the input informationSentence identification information, determines the complete probability of corresponding sentence according to the sentence identification information, the sentence identification information include withLower at least one: the corresponding input interval of punctuation mark, sentence tail words, the corresponding associative information of input information, input information.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: obtain the punctuation mark at the input information end;By the punctuation mark and setting punctuate symbolIt number is matched;If the punctuation mark is matched with setting punctuation mark, the first numerical value is determined as the complete probability;IfThe punctuation mark and setting punctuation mark mismatch, then second value are determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: sentence tail words is identified from the input information;By the sentence tail words and setting identification wordsIt is matched;If the sentence tail words is matched with setting identification words, foundation and the matched setting identification of sentence tail wordsThe sentence tail probabilities of words determine the complete probability, wherein the sentence tail probabilities are setting identification words as sentence sentence tailProbability;If the sentence tail words and setting identification words mismatch, third value is determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: determine that corresponding associative information, the associative information include association word according to the input informationThe associative probability of word and association's words;Determine the total quantity and maximum associative probability of association's words, and described in calculatingThe ratio of total quantity and setting numerical value;According to the ratio and maximum associative probability, the complete probability is determined.
Optionally, described according to the ratio and maximum associative probability, determine the complete probability, comprising: described in determiningMaximum value in ratio and maximum associative probability, is determined as the complete probability for the maximum value.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: shield the input interval of the input information and input operation next time in determination;Judge the inputWhether interval is greater than average input interval;If the input interval is greater than average input interval, the 4th numerical value is determined as instituteState complete probability;If the input interval is less than average input interval, the 5th numerical value is determined as the complete probability.
Optionally, according to the complete probability and error correction score value, the amendment score value of the error correction candidate item is determined, comprising:According to the complete probability and punishment weight, penalty score is determined;The error correction candidate item is entangled using the penalty scoreWrong score value is adjusted, and determines the amendment score value.
Optionally, the error correction score value is to be input to error correction candidate item in language model to determine, is entangled in the displayingBefore wrong candidate item, further includes: judge whether the amendment score value is greater than the reference score value of the input information, the reference pointValue is for judging the input information with the presence or absence of mistake;If the amendment score value is greater than described with reference to score value, it is determined thatThe amendment score value meets preset condition.
Optionally, after determining that the input information corresponds to the complete probability of sentence, further includes: judge described complete generalWhether rate is greater than complete threshold value;If the complete probability is greater than complete threshold value, executes and entangled according to the complete probability to describedThe step of error correction score value of wrong candidate item is adjusted;If the complete probability is less than complete threshold value, show that the error correction is waitedSelect the error correction candidate item in information.
Device is entangled the embodiment of the invention also discloses a kind of information is anti-error, is specifically included: information determination module, for identificationAfter input information needs error correction, the corresponding error correction candidate information of the input information is determined, the error correction candidate information includes: to entangleThe error correction score value of wrong candidate item and the error correction candidate item;Probability determination module, for determining that the input information corresponds to sentenceComplete probability;Score value determining module, for determining repairing for the error correction candidate item according to the complete probability and error correction score valuePositive score value;Display module, for showing the error correction candidate item after the amendment score value meets preset condition.
Optionally, the information determination module is specifically used for the input information input into language model, determines instituteState the reference score value of input information;If described be less than error correction threshold value with reference to score value, it is determined that the input information needs error correction.
Optionally, the probability determination module, specifically for obtaining sentence identification information, foundation according to the input informationThe sentence identification information determines that the complete probability of corresponding sentence, the sentence identification information comprise at least one of the following: punctuateThe corresponding input interval of symbol, sentence tail words, the corresponding associative information of input information, input information.
Optionally, the probability determination module includes: first to determine submodule, for after obtaining the input informationPunctuation mark;The punctuation mark is matched with setting punctuation mark;If the punctuation mark and setting punctuation markMatch, then the first numerical value is determined as the complete probability;If the punctuation mark and setting punctuation mark mismatch, by secondNumerical value is determined as the complete probability.
Optionally, the probability determination module includes: the second determining submodule, for identifying sentence from the input informationTail words;The sentence tail words is matched with setting identification words;If the sentence tail words is matched with setting identification words,The complete probability then is determined according to the sentence tail probabilities with the matched setting identification words of the sentence tail words, wherein the sentenceTail probabilities are probability of the setting identification words as sentence sentence tail;If the sentence tail words and setting identification words mismatch,Third value is determined as the complete probability.
Optionally, the probability determination module includes: that third determines submodule, for according to determining pair of the input informationThe associative information answered, the associative information include the associative probability of association's words and association's words;Determine the association wordThe total quantity of word and maximum associative probability, and calculate the total quantity and set the ratio of numerical value;According to the ratio and maximumAssociative probability determines the complete probability.
Optionally, the third determines submodule, will for determining the maximum value in the ratio and maximum associative probabilityThe maximum value is determined as the complete probability.
Optionally, the probability determination module includes: the 4th to determine submodule, for determining the input information and subsequentInput the input interval of information;Judge whether the input interval is greater than average input interval;If the input interval is greater than flatInput interval, then be determined as the complete probability for the 4th numerical value;If the input interval is less than average input interval, will5th numerical value is determined as the complete probability.
Optionally, the score value determining module, for determining penalty score according to the complete probability and punishment weight;It is adjusted using error correction score value of the penalty score to the error correction candidate item, determines the amendment score value.
Optionally, the error correction score value is to be input to error correction candidate item in language model to determine, further includes: score value is sentencedDisconnected module, for judging whether the amendment score value is greater than the reference score value of the input information, the reference score value is to be used forJudge the input information with the presence or absence of mistake;If the amendment score value is greater than described with reference to score value, it is determined that the amendmentScore value meets preset condition.
Optionally, further includes: threshold value judgment module, for judging whether the complete probability is greater than complete threshold value;If instituteComplete probability is stated greater than complete threshold value, then executes and is adjusted according to error correction score value of the complete probability to the error correction candidate itemWhole step;If the complete probability is less than complete threshold value, the error correction candidate item in the error correction candidate information is shown.
The embodiment of the invention also provides a kind of readable storage medium storing program for executing, which is characterized in that the finger in the storage mediumWhen enabling the processor execution by electronic equipment, so that electronic equipment is able to carry out, information as described in the embodiments of the present invention is anti-error to entangleMethod.
The embodiment of the invention also provides a kind of electronic equipment, which is characterized in that include memory and one orMore than one program, perhaps more than one program is stored in memory and is configured to by one or one for one of themIt includes the instruction for performing the following operation that a above processor, which executes the one or more programs: identification input letterAfter breath needs error correction, determine that the corresponding error correction candidate information of the input information, the error correction candidate information include: error correction candidateThe error correction score value of item and the error correction candidate item;Determine that the input information corresponds to the complete probability of sentence;According to described completeProbability is adjusted the error correction score value of the error correction candidate item, determines the amendment score value of the error correction candidate item;It is repaired describedAfter positive score value meets preset condition, the error correction candidate item is shown.
Optionally, the identification input information needs error correction, comprising: by the input information input into language model,Determine the reference score value of the input information;If described be less than error correction threshold value with reference to score value, it is determined that the input information needsError correction.
Optionally, the determining input information corresponds to the complete probability of sentence, comprising: obtains language according to the input informationSentence identification information, determines the complete probability of corresponding sentence according to the sentence identification information, the sentence identification information include withLower at least one: the corresponding input interval of punctuation mark, sentence tail words, the corresponding associative information of input information, input information.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: obtain the punctuation mark at the input information end;By the punctuation mark and setting punctuate symbolIt number is matched;If the punctuation mark is matched with setting punctuation mark, the first numerical value is determined as the complete probability;IfThe punctuation mark and setting punctuation mark mismatch, then second value are determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: sentence tail words is identified from the input information;By the sentence tail words and setting identification wordsIt is matched;If the sentence tail words is matched with setting identification words, foundation and the matched setting identification of sentence tail wordsThe sentence tail probabilities of words determine the complete probability, wherein the sentence tail probabilities are setting identification words as sentence sentence tailProbability;If the sentence tail words and setting identification words mismatch, third value is determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: determine that corresponding associative information, the associative information include association word according to the input informationThe associative probability of word and association's words;Determine the total quantity and maximum associative probability of association's words, and described in calculatingThe ratio of total quantity and setting numerical value;According to the ratio and maximum associative probability, the complete probability is determined.
Optionally, described according to the ratio and maximum associative probability, determine the complete probability, comprising: described in determiningMaximum value in ratio and maximum associative probability, is determined as the complete probability for the maximum value.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: shield the input interval of the input information and input operation next time in determination;Judge the inputWhether interval is greater than average input interval;If the input interval is greater than average input interval, the 4th numerical value is determined as instituteState complete probability;If the input interval is less than average input interval, the 5th numerical value is determined as the complete probability.
Optionally, according to the complete probability and error correction score value, the amendment score value of the error correction candidate item is determined, comprising:According to the complete probability and punishment weight, penalty score is determined;The error correction candidate item is entangled using the penalty scoreWrong score value is adjusted, and determines the amendment score value.
Optionally, the error correction score value is to be input to error correction candidate item in language model to determine, is entangled in the displayingBefore wrong candidate item, also comprising the instruction for performing the following operation: judging whether the amendment score value is greater than the input letterThe reference score value of breath, it is described with reference to score value be for judge the input information with the presence or absence of mistake;If the amendment score valueScore value is referred to greater than described, it is determined that the amendment score value meets preset condition.
Optionally, after determining that the input information corresponds to the complete probability of sentence, also comprising for carrying out following graspThe instruction of work: judge whether the complete probability is greater than complete threshold value;If the complete probability be greater than complete threshold value, execute according toThe step of being adjusted according to error correction score value of the complete probability to the error correction candidate item;If the complete probability is less than completeThreshold value then shows the error correction candidate item in the error correction candidate information.
The embodiment of the present invention includes following advantages:
The embodiment of the present invention determines the corresponding error correction candidate item of the input information after identification input information needs error correctionWith the error correction score value of the error correction candidate item;Due to input information correspond to sentence it is imperfect when, determine input information needIt wants the False Rate of error correction higher, therefore can determine that the input information corresponds to the complete probability of sentence, then according to described complete generalRate and error correction score value determine the amendment score value of error correction candidate item, then determine whether to show that error correction is candidate according to error correction score value again?;And then it can reduce and accidentally entangle probability.If the amendment score value meets preset condition, the error correction candidate item is shown, if reallyThe fixed amendment score value is unsatisfactory for preset condition, then does not show the error correction candidate item, to effectively avoid invalid error correction, improvesError correction accuracy rate.
Specific embodiment
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, with reference to the accompanying drawing and specific realApplying mode, the present invention is described in further detail.
Core of the invention design first is that, due to input information correspond to sentence it is imperfect when, determine that the input is believedBreath needs the False Rate of error correction higher, therefore after determining error correction candidate item and corresponding error correction score value, corresponding according to input informationThe complete probability of sentence and the error correction score value of error correction candidate item determine the amendment score value of error correction candidate item, and then according to amendment pointValue determines whether to show the error correction candidate item;So as to prevent from accidentally entangling, error correction accuracy rate is improved.
Referring to Fig. 2, a kind of anti-error step flow chart for entangling embodiment of the method for information of the invention is shown, specifically can wrapInclude following steps:
After step 202, identification input information need error correction, the corresponding error correction candidate information of the input information is determined.
In the embodiment of the present invention, the input information can be the information for having gone up screen, naturally it is also possible to be to upper screen regionCandidate item, can specifically be arranged according to demand;Wherein, the input information may include at least one words, and the words is unlimitedIt for example can be Chinese, English, Korean and Japanese etc. in language, the words may include individual character and vocabulary, such as with ChineseFor, such as " I " is individual character, and " waiting " is vocabulary.After determining input information, the input information can be analyzed, be identifiedThe input information whether there is mistake, however, it is determined that there are mistakes for the input information, that is, determine that the input information needs entangleMistake then can be the corresponding error correction candidate information of the input information matches;If it is determined that mistake is not present in the input information, i.e., reallyThe fixed input information is not necessarily to error correction, then can carry out error correction knowledge to the input information of update after the information for determining subsequent inputNot.In the embodiment of the present invention, the error correction candidate information can include: the error correction of error correction candidate item and the error correction candidate item pointValue, wherein the error correction candidate item refers to the words shown in the error correction region of input method, as shown in figure 1 " etc. ", the inputThe error correction region of method can be suspended in current interface, be such as suspended on the toolbar of current application program;The error correction score value isMarking determination is carried out to the error correction candidate item according to language model.
Step 204 determines that the input information corresponds to the complete probability of sentence.
Step 206, according to the complete probability and error correction score value, determine the amendment score value of the error correction candidate item.
For user in several words before inputting a sentence, the words that may be inputted is correct, but input method mayIt can determine that the words of user's input is wrong, and show error correction candidate item;As shown in figure 1, user thinks input, and " I steps on yours to exampleQQ " the words, it is defeated since " I waits you " more meets natural language rule than " I steps on you " after merely entering " I steps on you "Enter method can show error correction candidate item " etc. ";But user is not need to carry out error correction to the words of input, therefore this entangle at this timeMistake be it is nonsensical, can also cause to perplex to user.After user inputs complete sentence " I steps on your QQ ", then input methodIt not will do it error correction;It can be seen that input method identifies that the correct probability of sentence error is likely to when sentence integrity degree is relatively lowRelatively low, when sentence integrity degree is relatively high, input method identifies that the accuracy of sentence error may be relatively high;Therefore this hairBright embodiment determines that input information needs the accuracy rate of error correction may not be high, is after determining that the input information needs error correctionAvoid showing invalid error correction candidate item, can determine whether the input information correspond to sentence whether be it is complete, that is, determine inputInformation corresponds to the integrated degree of sentence, to correspond to the integrated degree of sentence according to the input information, it is determined whether show error correctionCandidate item.
The integrated degree of the complete probability characterization sentence can be used in the embodiment of the present invention, therefore can be to the input informationIt is analyzed, the words at information end is inputted as described in analysis, determine that the input information corresponds to the complete probability of sentence;IntoAnd according to the complete probability and error correction score value, the error correction score value of the error correction candidate item is determined, such as using complete probability to entanglingThe error correction score value of wrong candidate item is adjusted, and error correction score value adjusted is determined as to the amendment score value of the error correction candidate item,Then again according to the amendment score value, judge whether to show the error correction candidate item.
Step 208, after the amendment score value meets preset condition, show the error correction candidate item.
In the embodiment of the present invention, preset condition can be preset, the preset condition shows that error correction is waited for judging whetherOption, and then after the amendment score value for determining the error correction candidate item, it can determine whether the amendment score value meets preset condition,If it is determined that the amendment score value meets preset condition, then the error correction candidate item can be shown in the error correction region of input method.
Optionally, however, it is determined that the amendment score value is unsatisfactory for preset condition, then without showing the error correction in error correction regionCandidate item, and then reduce the displaying to invalid error correction candidate item, improve user experience.
The embodiment of the present invention determines the corresponding error correction candidate item of the input information after identification input information needs error correctionWith the error correction score value of the error correction candidate item;Due to input information correspond to sentence it is imperfect when, determine input information needIt wants the False Rate of error correction higher, therefore can determine that the input information corresponds to the complete probability of sentence, then according to described complete generalRate and error correction score value determine the amendment score value of error correction candidate item, then determine whether to show that error correction is candidate according to error correction score value again?;If the amendment score value meets preset condition, the error correction candidate item is shown, however, it is determined that the amendment score value is unsatisfactory for pre-If condition, then the error correction candidate item is not shown, to effectively avoid showing invalid error correction, improve error correction accuracy rate.
It, can be according to the corresponding sentence identification information of the input information, described in determination in another embodiment of the inventionInput information corresponds to the complete probability of sentence, wherein described sentence identification information such as punctuation mark, sentence tail words etc.;WithUnder the method for the complete probability for determining the corresponding sentence of input information is described in detail.
Referring to Fig. 3, a kind of anti-error step flow chart for entangling method alternative embodiment of information of the invention is shown, specifically may be usedTo include the following steps:
Step 302, by the input information input into language model, determine it is described input information reference score value.
It may include multiple words using the information in edit box, such as " today, weather was fine, we go ", input method can incite somebody to actionUsing all words in edit box as input information such as " today, weather was fine, we go ", can also using part words asInput information such as " we go ", then identification input information whether there is mistake.When identification input information is with the presence or absence of mistake,It can be given a mark using the language model to the input information, in turn by the input information input into language modelDetermine the reference score value of the input information;Wherein, the language model is established based on natural language, and language mould can be usedType gives a mark to input information, and to determine that input information corresponds to the smooth degree of sentence, language model may include multiple types,Such as: it can be NGram language model, be also possible to neural network language model etc..Specifically, can be to the input informationWord segmentation processing is carried out, the input information is split as word segment, then using language model to input information equivalent segmentSequence is given a mark, and then the reference score value of the input information is calculated.
Error correction threshold value can be preset in the embodiment of the present invention, by entangling the reference score value of the input information with describedWrong threshold value is compared, and determines the input information with the presence or absence of mistake, wherein the error correction threshold value can be arranged as desired.
Step 304 judges whether the reference score value is less than error correction threshold value.
In the embodiment of the present invention, the reference score value of the input information and the size of the error correction threshold value can be compared, with trueThe fixed input information whether there is mistake;It specifically can determine whether the reference score value is less than error correction threshold value, if the referenceScore value is less than error correction threshold value, it is determined that there are mistake, i.e., the described input information to need error correction for the input information, and step can be performed306;If described be greater than error correction threshold value with reference to score value, it is determined that the input information there is no mistake, i.e., the described input information withoutError correction is needed, thens follow the steps 322.
Step 306 determines the corresponding error correction candidate information of the input information.
The embodiment of the present invention can match and the input information after determining that the input information needs error correction from dictionaryThen corresponding error correction candidate item filters out one or more error correction candidate items from matched error correction candidate item, and according to sieveThe error correction candidate item selected determines error correction candidate information;Wherein, when matching error correction candidate item corresponding with the input information,It also gives a mark respectively to each error correction candidate item, determines the error correction score value of each error correction candidate item, to be sieved according to error correction score valueChoosing.A kind of optional screening mode of the embodiment of the present invention is, according to the error correction score value of each error correction candidate item, to search error correction score value mostHigh error correction candidate item, then judge whether highest error correction score value is greater than with reference to score value;If the highest error correction score value is greater thanWith reference to score value, it is determined that there is the error correction candidate item for error correction, the highest error correction candidate item of the error correction score value can be used, it is rawAt the corresponding error correction candidate information of the input information;If the highest error correction score value, which is less than, refers to score value, it is determined that do not depositIn the error correction candidate item for error correction, then step 322 can be performed.
The embodiment of the present invention is to prevent from accidentally entangling, and the complete probability that the input information corresponds to sentence can be used, entangle to describedThe error correction score value of wrong candidate item is adjusted, and obtains amendment score value;And then according to the amendment score value, judge whether described in displayingError correction candidate item, specific as follows:
Step 308 obtains sentence identification information according to the input information, determines and corresponds to according to the sentence identification informationThe complete probability of sentence.
The embodiment of the present invention can obtain corresponding sentence identification information according to the input information, i.e., to the input informationIt is analyzed, determines the corresponding sentence identification information of the input information, the sentence identification information can be defeated for determiningEnter the information of information integrated degree;Wherein, the sentence identification information comprises at least one of the following: punctuation mark, sentence tail words,Input the corresponding input interval of the corresponding associative information of information, input information;Certainly the sentence identification information can also includeOther information different one illustrate herein.
The embodiment of the present invention, can be according at least one sentence identification information, described in determination after determining sentence identification informationInput information corresponds to the complete probability of sentence;Determine that the input information corresponds to language to according to different sentence identification informations belowThe method of the complete probability of sentence is described in detail, specific as follows:
1, it determines that the input information corresponds to the complete probability of sentence according to punctuation mark, specifically may include following sub-stepIt is rapid:
Sub-step S11, the punctuation mark for obtaining the input information end.
Sub-step S12, the punctuation mark is matched with setting punctuation mark.
Sub-step S13, the first numerical value is determined as the complete probability.
Sub-step S14, second value is determined as the complete probability.
Punctuation mark is the symbol of supplementary text record instruction, for indicating pause, the tone and the property and work of wordWith;Therefore can determine whether the sentence complete according to the punctuation mark at sentence end, in the embodiment of the present invention, can in advance according toThe characteristic of punctuation mark determines setting punctuation mark, such as the punctuation mark with punctuate effect is determined as to set punctuate symbolNumber, such as ", ", ".","!", "? " etc..Therefore when determining complete probability according to punctuation mark, the input information can be obtainedThen the punctuation mark at end matches the punctuation mark with setting punctuation mark;If the punctuation mark and settingPunctuation mark matching, it is determined that the integrated degree that the input information corresponds to sentence is higher, i.e. execution sub-step S13;If describedPunctuation mark and setting punctuation mark mismatch, it is determined that the integrated degree that the input information corresponds to sentence is lower, that is, executesSub-step S14.
In the embodiment of the present invention, however, it is determined that the punctuation mark is matched with setting punctuation mark, then can be true by the first numerical valueIt is set to the complete probability, however, it is determined that the punctuation mark and setting punctuation mark mismatch, then can be determined as second valueThe complete probability;Wherein, first numerical value and second value are arranged as desired.For example, if the input information is lastThe punctuation mark of tail be ".", then it can determine that complete probability is 1, the punctuation mark at the input information end is that "~" then can be trueFixed complete probability is 0.4.
2, it determines that the input information corresponds to the complete probability of sentence according to sentence tail words, specifically may include following sub-stepIt is rapid:
Sub-step S21, sentence tail words is identified from the input information.
Sub-step S22, the sentence tail words is matched with setting identification words.
The sentence tail probabilities of sub-step S23, foundation and the matched setting identification words of the sentence tail words determine described completeProbability.
Sub-step S24, third value is determined as the complete probability.
Certain words often appear in the end of sentence, such as " ", " ", " ", " ", while statement endWhen words is these words, it is believed that the sentence is likely to complete;Therefore the embodiment of the present invention can be according to input information pairA tail words is answered, determines whether input information is complete.Each word can be counted as sentence in advance from large-scale training corpusProbability, that is, sentence tail probabilities of sentence tail;Then the words that sentence tail probabilities are greater than given threshold can be determined as setting identification words, instituteStating given threshold can be arranged as desired;For example, given threshold is 0.7, the sentence tail probabilities of " " are 0.99, and the sentence tail of " " is generalRate is 0.8, " " sentence tail probabilities be 0.3, then can will " " and " " be determined as setting identification words.The embodiment of the present invention existsWhen determining complete probability, the input information can be identified, sentence tail words is identified from the input information;Then by instituteIt states a tail words to be matched with the setting identification words, if the sentence tail words is matched with setting identification words, it is determined thatThe sentence tail words is the words for frequently appearing in sentence end, it may be determined that the input information correspond to the integrated degree of sentence compared withSub-step S23 can be performed in height;If the sentence tail words and setting identification words mismatch, it is determined that the sentence tail words be throughOften appear in the words at sentence end, it may be determined that the integrated degree that the input information corresponds to sentence is lower, and sub-step can be performedS24。
In the embodiment of the present invention, if the sentence tail words is matched with setting identification words, can according to the sentence tail wordThe sentence tail probabilities of the matched setting identification words of word determine the complete probability, wherein the sentence tail probabilities are setting identification wordsProbability of the word as sentence sentence tail.Specifically, if the complete probability is directly proportional to the integrated degree of sentence, can will with it is describedSentence the matched setting identification words of tail words sentence tail probabilities, be determined as the complete probability, for example, " " as the general of sentence tailRate is 0.87, and complete probability can be 0.87.It, can will be with the sentence if the integrated degree of the complete probability and sentence is inversely proportionalThe sentence tail probabilities of the matched setting identification words of tail words and 1 difference, be determined as the complete probability;For example, " " conductThe probability of sentence tail is 0.87, and complete probability can be 0.13.If the sentence tail words and setting identification words mismatch, by thirdNumerical value is determined as the complete probability, wherein the third data are arranged as desired.
3, determine that the input information corresponds to the complete probability of sentence according to the corresponding associative information of input information, it is specific to wrapInclude following sub-step:
Sub-step 31 determines that corresponding associative information, the associative information include association's words according to the input informationWith the associative probability of association's words.
Sub-step 32, the total quantity for determining association's words and maximum associative probability, and calculate the total quantity and setThe ratio of fixed number value.
Sub-step 33, according to the ratio and maximum associative probability, determine the complete probability.
In the embodiment of the present invention, input method further includes association function, i.e., the information inputted based on user will to userThe information of input is predicted, determines corresponding association's words;If based on the user's input information, determining more association wordWord, it is believed that user is likely to continue to input at this time, i.e. the corresponding sentence of input information is likely to incomplete;If baseIn the input information of user, determining association's words is fewer, it is believed that user is likely to be further continued for having input, that is, inputsThe corresponding sentence of information is likely to complete;Therefore it can be determined according to the corresponding association's words of the input information described complete generalRate.
It specifically can determine that the input information carries out word segmentation processing and obtains each word segment, it then can be according to all word segmentsAssociation is carried out, determines corresponding associative information;Association can certainly be carried out according to the word segment at the input information end, reallyFixed corresponding associative information;Wherein, the associative information includes the associative probability of association's words and association's words.Then according toThe total quantity and maximum associative probability of association's words are determined according to the associative information, and calculate the ratio of the total quantity and setting valueValue, then the complete probability is determined according to the ratio and maximum associative probability;Wherein, the setting numerical value can be set as desiredSet such as 200.
In another embodiment of the invention, the ratio and maximum associative probability can be compared, determine the ratioMaximum value in value and maximum associative probability, then determines the complete probability for the maximum value;Wherein, according to associative informationDetermining complete probability is inversely proportional with sentence integrated degree, i.e., complete probability is bigger, and the integrated degree of sentence is lower.Such as: ifThe complete probability is higher to show that sentence is more imperfect, and input information " tomorrow " has 180 association's words, and maximum associative probability is0.13, when setting numerical value as 200, complete probability=max (180/200,0.13)=0.9.
4, the complete probability for determining corresponding sentence according to the corresponding input interval of the input information, specifically may include followingSub-step:
Shield the input interval of the input information and input operation next time in sub-step 41, determination.
Sub-step 42 judges whether the input interval is greater than average input interval.
4th numerical value is determined as the complete probability by sub-step 43.
5th numerical value is determined as the complete probability by sub-step 44.
The input interval of user's two adjacent words in inputting a sentence, can be than inputting two adjacent sentencesInput interval is relatively small;For example, the input information that user first inputs is " I steps on you ", the interval of subsequent input " QQ ", than rearThe interval of continuous input ", you take your time " is small;Therefore it can determine the input interval of input information described in screen and input operation next time,Wherein, the input next time operation is operated in the input of entering method keyboard for the first time after referring to screen operation, such as: shielding on userAfter " I steps on you ", the operation of " Q " is keyed in input keyboard, the time for as above shielding " I steps on you " is 12:20:33, keys in " Q "Time is 12:20:34, then is divided into 1 second between inputting;Then determine whether the input information is complete according to input interval.In the embodiment of the present invention, the average input interval of user can be determined previously according to historical record, then again determine on shield it is described defeatedEnter the input interval of information and input operation next time, and then according between the corresponding input interval of the input information and average inputEvery determining the complete probability.
Judge whether the input interval is greater than average input interval, if the input spacing is greater than average input interval,The integrated degree for then determining that the input information corresponds to sentence is higher, and sub-step 43 can be performed;If the input spacing is less than flatInput interval, user are likely to continue to input, it is determined that the integrated degree that the input information corresponds to sentence is lower, that is, holdsRow sub-step 44.In the embodiment of the present invention, if input interval is greater than average input interval, the 4th numerical value can be determined asThe complete probability;If the input interval is less than average input interval, the 5th numerical value can be determined as the complete probability.Wherein, the 4th numerical value and the 5th numerical value are arranged as desired.
In another embodiment of the present invention, above-mentioned any a variety of methods also can be used and determine the complete probability, using everyAfter kind method determines corresponding complete probability, multiple complete probability can be weighted, it is corresponding to obtain the input informationThe final complete probability of sentence, wherein the weight of the corresponding complete probability of various methods can be arranged as desired, and then has been improvedThe accuracy of whole probability accidentally entangles probability to reduce.
Step 310 judges whether the complete probability is greater than complete threshold value.
If the integrated degree of complete probability and sentence is inversely proportional, judge whether the complete probability is greater than complete threshold value,If the complete probability be greater than complete threshold value, determine the input information correspond to sentence be it is incomplete, then follow the steps 312;If the complete probability is less than complete threshold value, determining that the input information corresponds to sentence is completely, to then follow the steps 318.
If complete probability is directly proportional to the integrated degree of sentence, judge whether the complete probability is greater than complete threshold value,If the complete probability is greater than complete threshold value, determining that the input information corresponds to sentence is completely, to then follow the steps 318;IfThe complete probability be less than complete threshold value, determine the input information correspond to sentence be it is incomplete, then follow the steps 312.
Determine the input information correspond to sentence it is imperfect after, can be according to the complete probability to the error correction candidate itemError correction score value be adjusted, determine the amendment score value of the error correction candidate item, it is specific as follows:
Step 312, according to the complete probability and punishment weight, determine penalty score.
Step 314 is adjusted using error correction score value of the penalty score to the error correction candidate item, is repaired described in determinationPositive score value.
It may be incomplete since input information corresponds to sentence, it is thus determined that the input is believed in the embodiment of the present inventionBreath needs the accuracy of error correction may be relatively low, therefore corresponds to the complete probability of sentence to error correction score value using the input informationIt is adjusted;Specifically, the corresponding punishment weight of complete probability can be predefined, to determine complete probability pair according to punishment weightThe score value answered i.e. penalty score, and then punished according to error correction score value of the penalty score to error correction candidate item, then according to punishmentError correction score value afterwards determines whether to show error correction candidate item, to improve the accuracy rate of error correction;Wherein, the punishment weight can be according toDemand setting.In the embodiment of the present invention, a kind of optional way of determining penalty score is, if the complete journey of complete probability and sentenceDegree is inversely proportional, then can calculate the complete probability and punish the product of weight;Another kind determines that the optional mode of penalty score is,If complete probability is directly proportional to the integrated degree of sentence, the difference of the complete probability and 1 can be first calculated, then calculate the differenceWith the product of punishment weight;Then the product of the two is determined as penalty score.The error correction is waited using the penalty score againThe error correction score value of option is adjusted, and determines the amendment score value;Optionally, the penalty score and error correction score value can be calculatedThe difference of the two is determined as the amendment score value of the error correction candidate item by difference.
Step 316 judges whether the amendment score value is greater than the reference score value of the input information.
The embodiment of the present invention, can be by the amendment of error correction candidate item point after the error correction score value for determining the error correction candidate itemValue, it is corresponding with input information to be compared with reference to score value, judge whether the amendment score value is greater than the ginseng of the input informationExamination mark value determines that the amendment score value meets preset condition if amendment score value, which is greater than, refers to score value, that is, determines that input information needsError correction is carried out using error correction candidate item, step 318 can be performed;Score value is referred to if correcting score value and being less than, determines the amendment score valueIt is unsatisfactory for preset condition, that is, determines that input information carries out error correction without error correction candidate item, then step 320 can be performed.
Step 318 shows the error correction candidate item.
If the amendment score value meets preset condition, or, determining that the input information corresponds to sentence is completely, then to showThe error correction candidate item.
Step 320 does not show the error correction candidate item.
If the amendment score value is unsatisfactory for preset condition, the error correction candidate item is not shown.
Whether step 322, the updated input information of identification need error correction.
If it is determined that input information is not necessarily to error correction, or, determining that error correction candidate item is not present in input information, it is determined that user is subsequentInformation is inputted, updated input information is identified, judges whether updated input information needs error correction.
It is right if user inputs input information " I steps on you " as shown in Figure 1 in input interface in an example of the inventionThe reference score value answered is 240, is lower than error correction threshold value 400, then identifies that the input information needs error correction.Then determine that error correction is waitedOption be " etc. ", corresponding error correction score value is 500, determines that the complete probability of " I steps on you " is 0.88, and punish that weight is 300, canIt calculates penalty score to be 264 and calculate penalty score and the difference of error correction score value afterwards to be 236, i.e., amendment score value is 236.AmendmentScore value be less than refer to score value, then do not show error correction candidate item " etc. ", as shown in Figure 4.
To sum up, the embodiment of the present invention corresponds to the complete probability of sentence using the input information, to the error correction candidate itemError correction score value be adjusted, determine corresponding amendment score value;And then determine whether according to the amendment score value to input informationCarry out error correction;Due to input information correspond to sentence it is imperfect when, determine that the input information needs the False Rate of error correction higher,Therefore determine whether to show error correction candidate item according to amendment score value, can reduce and accidentally entangle probability;If the amendment score value meets pre-If condition, then the error correction candidate item is shown, however, it is determined that the amendment score value is unsatisfactory for preset condition, then does not show the error correctionCandidate item improves the accuracy of error correction, additionally it is possible to improve user experience to effectively avoid showing invalid error correction.
Further, the embodiment of the present invention can also determine corresponding language according to the corresponding sentence identification information of the input informationThe complete probability of sentence, the sentence identification information comprise at least one of the following: punctuation mark, sentence tail words, input information are correspondingAssociative information, the corresponding input of input information is spaced;If determining complete probability using a variety of methods simultaneously, determination can be improvedThe accuracy of complete probability, so it is significantly more efficient avoid showing invalid error correction, further increase the accuracy of error correction.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the methodIt closes, but those skilled in the art should understand that, embodiment of that present invention are not limited by the describe sequence of actions, because according toAccording to the embodiment of the present invention, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also shouldKnow, the embodiments described in the specification are all preferred embodiments, and the related movement not necessarily present invention is implementedNecessary to example.
Referring to Fig. 5, a kind of anti-error structural block diagram for entangling Installation practice of information of the invention is shown, can specifically includeFollowing module: information determination module 51, probability determination module 52, score value determining module 53 and display module 54, wherein
Information determination module 51 determines the corresponding error correction of the input information after input information needs error correction for identificationCandidate information, the error correction candidate information include: the error correction score value of error correction candidate item and the error correction candidate item;
Probability determination module 52, for determining that the input information corresponds to the complete probability of sentence;
Score value determining module 53, for determining repairing for the error correction candidate item according to the complete probability and error correction score valuePositive score value;
Display module 54, for showing the error correction candidate item after the amendment score value meets preset condition.
Referring to Fig. 6, a kind of anti-error structural block diagram for entangling device alternative embodiment of information of the invention, described device are shownFurther include: score value judgment module 55 and threshold value judgment module 56, wherein
Score value judgment module 55, for judging whether the amendment score value is greater than the reference score value of the input information, instituteStating with reference to score value is for judging the input information with the presence or absence of mistake;If the amendment score value is greater than the reference pointValue, it is determined that the amendment score value meets preset condition;Wherein, the error correction score value is that error correction candidate item is input to language mouldIt is determined in type.
Threshold value judgment module 56, for judging whether the complete probability is greater than complete threshold value;If the complete probability is bigIn complete threshold value, then the step of being adjusted according to error correction score value of the complete probability to the error correction candidate item is executed;IfThe complete probability is less than complete threshold value, then shows the error correction candidate item in the error correction candidate information.
In another embodiment of the invention, the information determination module 51 is specifically used for the input information inputInto language model, the reference score value of the input information is determined;If described be less than error correction threshold value with reference to score value, it is determined that describedInput information needs error correction.
In another embodiment of the invention, the probability determination module 52, specifically for being obtained according to the input informationTo sentence identification information, the complete probability of corresponding sentence, the sentence identification information packet are determined according to the sentence identification informationInclude following at least one: between punctuation mark, sentence tail words, the corresponding associative information of input information, the corresponding input of input informationEvery.
In another embodiment of the invention, the probability determination module 52 includes: the first determining submodule 521, secondDetermine that submodule 522, third determine that submodule 523 and the 4th determines submodule 524, wherein
First determines submodule 521, for obtaining the punctuation mark at the input information end;By the punctuation mark withSetting punctuation mark is matched;If the punctuation mark is matched with setting punctuation mark, the first numerical value is determined as describedComplete probability;If the punctuation mark and setting punctuation mark mismatch, second value is determined as the complete probability.
Second determines submodule 522, for identifying sentence tail words from the input information;By the sentence tail words with setCalibration character learning word is matched;If the sentence tail words is matched with setting identification words, foundation is matched with the sentence tail wordsThe sentence tail probabilities of setting identification words determine the complete probability, wherein the sentence tail probabilities are setting identification words conductsThe probability of sentence sentence tail;If the sentence tail words and setting identification words mismatch, third value is determined as described completeProbability.
Third determines submodule 523, for determining corresponding associative information, the associative information according to the input informationAssociative probability including association's words and association's words;Determine the total quantity and maximum associative probability of association's words,And it calculates the total quantity and sets the ratio of numerical value;According to the ratio and maximum associative probability, the complete probability is determined.
The third determines submodule 523, will be described for determining the maximum value in the ratio and maximum associative probabilityMaximum value is determined as the complete probability.
4th determines submodule 524, and the input interval of the input information and input operation next time is shielded in determination;SentenceWhether the input interval break greater than average input interval;If the input interval is greater than average input interval, by the 4th numberValue is determined as the complete probability;If the input interval is less than average input interval, the 5th numerical value is determined as described completeWhole probability.
In another embodiment of the invention, the score value determining module 53, for according to the complete probability and punishmentWeight determines penalty score;It is adjusted using error correction score value of the penalty score to the error correction candidate item, described in determinationCorrect score value.
The embodiment of the present invention determines the corresponding error correction candidate item of the input information after identification input information needs error correctionWith the error correction score value of the error correction candidate item;Due to input information correspond to sentence it is imperfect when, determine input information needIt wants the False Rate of error correction higher, therefore can determine that the input information corresponds to the complete probability of sentence, then according to described complete generalRate is adjusted the error correction score value, determines the amendment score value of error correction candidate item, then determines whether again according to error correction score valueShow error correction candidate item;And then it can reduce and accidentally entangle probability.If the amendment score value meets preset condition, the error correction is shownCandidate item, however, it is determined that the amendment score value is unsatisfactory for preset condition, then does not show the error correction candidate item, to effectively avoid opening upShow invalid error correction, improves error correction accuracy rate.
For device embodiment, since it is basically similar to the method embodiment, related so being described relatively simplePlace illustrates referring to the part of embodiment of the method.
A kind of Fig. 7 structural block diagram for the anti-error electronic equipment 700 entangled of information shown according to an exemplary embodiment.For example, electronic equipment 700 can be mobile phone, computer, digital broadcasting terminal, messaging device, game console put downPanel device, Medical Devices, body-building equipment, personal digital assistant etc..
Referring to Fig. 7, electronic equipment 700 may include following one or more components: processing component 702, memory 704,Electric power assembly 706, multimedia component 708, audio component 710, the interface 712 of input/output (I/O), sensor module 714,And communication component 716.
The integrated operation of the usual controlling electronic devices 700 of processing component 702, such as with display, call, data are logicalLetter, camera operation and record operate associated operation.Processing element 702 may include one or more processors 720 to holdRow instruction, to perform all or part of the steps of the methods described above.In addition, processing component 702 may include one or more mouldsBlock, convenient for the interaction between processing component 702 and other assemblies.For example, processing component 702 may include multi-media module, withFacilitate the interaction between multimedia component 708 and processing component 702.
Memory 704 is configured as storing various types of data to support the operation in equipment 700.These data are shownExample includes the instruction of any application or method for operating on electronic equipment 700, contact data, telephone directory numberAccording to, message, picture, video etc..Memory 704 can by any kind of volatibility or non-volatile memory device or theyCombination realize, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM) is erasableProgrammable read only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, quick flashingMemory, disk or CD.
Electric power assembly 706 provides electric power for the various assemblies of electronic equipment 700.Electric power assembly 704 may include power supply pipeReason system, one or more power supplys and other with for electronic equipment 700 generate, manage, and distribute the associated component of electric power.
Multimedia component 708 includes the screen of one output interface of offer between the electronic equipment 700 and user.In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch surfacePlate, screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes one or more touchesSensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or slidingThe boundary of movement, but also detect duration and pressure associated with the touch or slide operation.In some embodiments,Multimedia component 708 includes a front camera and/or rear camera.When electronic equipment 700 is in operation mode, as clappedWhen taking the photograph mode or video mode, front camera and/or rear camera can receive external multi-medium data.It is each prepositionCamera and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 710 is configured as output and/or input audio signal.For example, audio component 710 includes a MikeWind (MIC), when electronic equipment 700 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphoneIt is configured as receiving external audio signal.The received audio signal can be further stored in memory 704 or via logicalBelieve that component 716 is sent.In some embodiments, audio component 710 further includes a loudspeaker, is used for output audio signal.
I/O interface 712 provides interface between processing component 702 and peripheral interface module, and above-mentioned peripheral interface module canTo be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and lockDetermine button.
Sensor module 714 includes one or more sensors, for providing the state of various aspects for electronic equipment 700Assessment.For example, sensor module 714 can detecte the state that opens/closes of equipment 700, the relative positioning of component, such as instituteThe display and keypad that component is electronic equipment 700 are stated, sensor module 714 can also detect electronic equipment 700 or electronicsThe position change of 700 1 components of equipment, the existence or non-existence that user contacts with electronic equipment 700,700 orientation of electronic equipmentOr the temperature change of acceleration/deceleration and electronic equipment 700.Sensor module 714 may include proximity sensor, be configured toIt detects the presence of nearby objects without any physical contact.Sensor module 714 can also include optical sensor, such asCMOS or ccd image sensor, for being used in imaging applications.In some embodiments, which can be withIncluding acceleration transducer, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communication component 716 is configured to facilitate the communication of wired or wireless way between electronic equipment 700 and other equipment.Electronic equipment 700 can access the wireless network based on communication standard, such as WiFi, 2G or 3G or their combination.Show at oneIn example property embodiment, communication component 714 receives broadcast singal or broadcast from external broadcasting management system via broadcast channelRelevant information.In one exemplary embodiment, the communication component 714 further includes near-field communication (NFC) module, short to promoteCheng Tongxin.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module(UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, electronic equipment 700 can be by one or more application specific integrated circuit (ASIC), numberWord signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally providedIt such as include the memory 704 of instruction, above-metioned instruction can be executed by the processor 720 of electronic equipment 700 to complete the above method.ExampleSuch as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, softDisk and optical data storage devices etc..
A kind of non-transitorycomputer readable storage medium, when the instruction in the storage medium is by the processing of electronic equipmentWhen device executes, so that electronic equipment is able to carry out, a kind of information is anti-error to entangle method, which comprises identification input information needsAfter error correction, the corresponding error correction candidate information of the input information is determined, the error correction candidate information includes: error correction candidate item and instituteState the error correction score value of error correction candidate item;Determine that the input information corresponds to the complete probability of sentence;According to the complete probability andError correction score value determines the amendment score value of the error correction candidate item;After the amendment score value meets preset condition, entangled described in displayingWrong candidate item.
Optionally, the identification input information needs error correction, comprising: by the input information input into language model,Determine the reference score value of the input information;If described be less than error correction threshold value with reference to score value, it is determined that the input information needsError correction.
Optionally, the determining input information corresponds to the complete probability of sentence, comprising: obtains language according to the input informationSentence identification information, determines the complete probability of corresponding sentence according to the sentence identification information, the sentence identification information include withLower at least one: the corresponding input interval of punctuation mark, sentence tail words, the corresponding associative information of input information, input information.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: obtain the punctuation mark at the input information end;By the punctuation mark and setting punctuate symbolIt number is matched;If the punctuation mark is matched with setting punctuation mark, the first numerical value is determined as the complete probability;IfThe punctuation mark and setting punctuation mark mismatch, then second value are determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: sentence tail words is identified from the input information;By the sentence tail words and setting identification wordsIt is matched;If the sentence tail words is matched with setting identification words, foundation and the matched setting identification of sentence tail wordsThe sentence tail probabilities of words determine the complete probability, wherein the sentence tail probabilities are setting identification words as sentence sentence tailProbability;If the sentence tail words and setting identification words mismatch, third value is determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: determine that corresponding associative information, the associative information include association word according to the input informationThe associative probability of word and association's words;Determine the total quantity and maximum associative probability of association's words, and described in calculatingThe ratio of total quantity and setting numerical value;According to the ratio and maximum associative probability, the complete probability is determined.
Optionally, described according to the ratio and maximum associative probability, determine the complete probability, comprising: described in determiningMaximum value in ratio and maximum associative probability, is determined as the incomplete probability for the maximum value.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: shield the input interval of the input information and input operation next time in determination;Judge the inputWhether interval is greater than average input interval;If the input interval is greater than average input interval, the 4th numerical value is determined as instituteState complete probability;If the input interval is less than average input interval, the 5th numerical value is determined as the complete probability.
Optionally, it is adjusted according to error correction score value of the complete probability to the error correction candidate item, is entangled described in determinationThe amendment score value of wrong candidate item, comprising: according to the complete probability and punishment weight, determine penalty score;Using the punishmentScore value is adjusted the error correction score value of the error correction candidate item, determines the amendment score value.
Optionally, the error correction score value is to be input to error correction candidate item in language model to determine, is entangled in the displayingBefore wrong candidate item, the method also includes: judge whether the amendment score value is greater than the reference score value of the input information, instituteStating with reference to score value is for judging the input information with the presence or absence of mistake;If the amendment score value is greater than the reference pointValue, it is determined that the amendment score value meets preset condition.
Optionally, after determining that the input information corresponds to the complete probability of sentence, the method also includes: judge instituteState whether complete probability is greater than complete threshold value;If the complete probability is greater than complete threshold value, execute according to the complete probabilityThe step of error correction score value of the error correction candidate item is adjusted;If the complete probability is less than complete threshold value, institute is shownState the error correction candidate item in error correction candidate information.
Fig. 8 is a kind of structure for electronic equipment 800 for navigation that the present invention is shown according to another exemplary embodimentSchematic diagram.The electronic equipment 800 can be server, which can generate bigger difference because configuration or performance are differentIt is different, it may include one or more central processing units (central processing units, CPU) 822 (for example, oneA or more than one processor) and memory 832, storage Jie of one or more storage application programs 842 or data 844Matter 830 (such as one or more mass memory units).Wherein, memory 832 and storage medium 830 can be of short duration depositStorage or persistent storage.The program for being stored in storage medium 830 may include one or more modules (diagram does not mark), oftenA module may include to the series of instructions operation in server.Further, central processing unit 822 can be set toStorage medium 830 communicates, and executes the series of instructions operation in storage medium 830 on the server.
Server can also include one or more power supplys 826, one or more wired or wireless networks connectMouthfuls 850, one or more input/output interfaces 858, one or more keyboards 856, and/or, one or one withUpper operating system 841, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM etc..
A kind of electronic equipment, which is characterized in that it include memory and one or more than one program, whereinOne perhaps more than one program be stored in memory and described in being configured to be executed as one or more than one processorOne or more than one program include the instruction for performing the following operation: after identification input information needs error correction, determining instituteThe corresponding error correction candidate information of input information is stated, the error correction candidate information includes: error correction candidate item and the error correction candidate itemError correction score value;Determine that the input information corresponds to the complete probability of sentence;It is candidate to the error correction according to the complete probabilityThe error correction score value of item is adjusted, and determines the amendment score value of the error correction candidate item;Meet preset condition in the amendment score valueAfterwards, the error correction candidate item is shown.
Optionally, the identification input information needs error correction, comprising: by the input information input into language model,Determine the reference score value of the input information;If described be less than error correction threshold value with reference to score value, it is determined that the input information needsError correction.
Optionally, the determining input information corresponds to the complete probability of sentence, comprising: obtains language according to the input informationSentence identification information, determines the complete probability of corresponding sentence according to the sentence identification information, the sentence identification information include withLower at least one: the corresponding input interval of punctuation mark, sentence tail words, the corresponding associative information of input information, input information.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: obtain the punctuation mark at the input information end;By the punctuation mark and setting punctuate symbolIt number is matched;If the punctuation mark is matched with setting punctuation mark, the first numerical value is determined as the complete probability;IfThe punctuation mark and setting punctuation mark mismatch, then second value are determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: sentence tail words is identified from the input information;By the sentence tail words and setting identification wordsIt is matched;If the sentence tail words is matched with setting identification words, foundation and the matched setting identification of sentence tail wordsThe sentence tail probabilities of words determine the complete probability, wherein the sentence tail probabilities are setting identification words as sentence sentence tailProbability;If the sentence tail words and setting identification words mismatch, third value is determined as the complete probability.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: determine that corresponding associative information, the associative information include association word according to the input informationThe associative probability of word and association's words;Determine the total quantity and maximum associative probability of association's words, and described in calculatingThe ratio of total quantity and setting numerical value;According to the ratio and maximum associative probability, the complete probability is determined.
Optionally, described according to the ratio and maximum associative probability, determine the complete probability, comprising: described in determiningMaximum value in ratio and maximum associative probability, is determined as the complete probability for the maximum value.
Optionally, described according to input information analysis sentence identification information, it determines and corresponds to according to the sentence identification informationThe complete probability of sentence, comprising: shield the input interval of the input information and input operation next time in determination;Judge the inputWhether interval is greater than average input interval;If the input interval is greater than average input interval, the 4th numerical value is determined as instituteState complete probability;If the input interval is less than average input interval, the 5th numerical value is determined as the complete probability.
Optionally, according to the complete probability and error correction score value, the amendment score value of the error correction candidate item is determined, comprising:According to the complete probability and punishment weight, penalty score is determined;The error correction candidate item is entangled using the penalty scoreWrong score value is adjusted, and determines the amendment score value.
Optionally, the error correction score value is to be input to error correction candidate item in language model to determine, is entangled in the displayingBefore wrong candidate item, also comprising the instruction for performing the following operation: judging whether the amendment score value is greater than the input letterThe reference score value of breath, it is described with reference to score value be for judge the input information with the presence or absence of mistake;If the amendment score valueScore value is referred to greater than described, it is determined that the amendment score value meets preset condition.
Optionally, after determining that the input information corresponds to the complete probability of sentence, also comprising for carrying out following graspThe instruction of work: judge whether the complete probability is greater than complete threshold value;If the complete probability be greater than complete threshold value, execute according toThe step of being adjusted according to error correction score value of the complete probability to the error correction candidate item;If the complete probability is less than completeThreshold value then shows the error correction candidate item in the error correction candidate information.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are withThe difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can provide as method, apparatus or calculateMachine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software andThe form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer canWith in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program codeThe form of the computer program product of implementation.
The embodiment of the present invention be referring to according to the method for the embodiment of the present invention, terminal device (system) and computer programThe flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructionsIn each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide theseComputer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminalsStandby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devicesCapable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagramThe device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devicesIn computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packetThe manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagramThe function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so thatSeries of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thusThe instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchartAnd/or in one or more blocks of the block diagram specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows basesThis creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted asIncluding preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to byOne entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operationBetween there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaningCovering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrapThose elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, articleOr the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limitedElement, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
It is anti-error to a kind of information provided by the present invention above to entangle that method, a kind of information are anti-error to entangle device and a kind of electronics is setIt is standby, it is described in detail, used herein a specific example illustrates the principle and implementation of the invention, aboveThe explanation of embodiment is merely used to help understand method and its core concept of the invention;Meanwhile for the general skill of this fieldArt personnel, according to the thought of the present invention, there will be changes in the specific implementation manner and application range, in conclusion thisDescription should not be construed as limiting the invention.