[go: up one dir, main page]

CN108829266A - Syllable complementing method and device, storage medium and electronic equipment - Google Patents

Syllable complementing method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN108829266A
CN108829266A CN201810289041.5A CN201810289041A CN108829266A CN 108829266 A CN108829266 A CN 108829266A CN 201810289041 A CN201810289041 A CN 201810289041A CN 108829266 A CN108829266 A CN 108829266A
Authority
CN
China
Prior art keywords
character string
syllable
candidate
completion
available
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810289041.5A
Other languages
Chinese (zh)
Inventor
王磊
王晔晗
高洋
王博
周浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
iFlytek Co Ltd
Original Assignee
iFlytek Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by iFlytek Co Ltd filed Critical iFlytek Co Ltd
Priority to CN201810289041.5A priority Critical patent/CN108829266A/en
Publication of CN108829266A publication Critical patent/CN108829266A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • G06F3/0233Character input methods

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The disclosure provides a syllable complementing method and device, a storage medium and an electronic device. The method comprises the following steps: acquiring an original character string input by a user, and judging whether a full syllable to be complemented exists in the original character string; if the original character string has the syllable to be complemented, determining a candidate complete character string corresponding to the syllable to be complemented; and displaying the candidate completion character string to a user, and performing completion processing on the to-be-completed syllable by using the to-be-completed character string when the user selects the to-be-used completion character string from the candidate completion character string to obtain a completed character string. According to the scheme, the key input speed is improved.

Description

Syllable complementing method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of input methods, and in particular, to a syllable complementing method and apparatus, a storage medium, and an electronic device.
Background
With the continuous development of information technology, various intelligent terminals are increasingly popularized in life and work of people. The input method is used as an interactive entrance between a user and an intelligent terminal, and has the characteristics of natural convenience, high efficiency, high accuracy and the like which are always pursued by the user.
The improvement of the performance of the key input, which is one of the most important input modes in the input method nowadays, has been a hot spot of research and development of researchers in related fields. For example, how to improve the key input speed without considering the user input difference, and further improve the user experience.
Disclosure of Invention
The present disclosure is directed to a syllable completion method and apparatus, a storage medium, and an electronic device, which are helpful for increasing the key input speed.
In order to achieve the above object, the present disclosure provides a syllable complementing method, including:
acquiring an original character string input by a user, and judging whether a full syllable to be complemented exists in the original character string;
if the original character string has the syllable to be complemented, determining a candidate complete character string corresponding to the syllable to be complemented;
and displaying the candidate completion character string to a user, and performing completion processing on the to-be-completed syllable by using the to-be-completed character string when the user selects the to-be-used completion character string from the candidate completion character string to obtain a completed character string.
Optionally, the determining whether the original character string has a full syllable to be complemented includes:
judging whether the syllables only contain initial consonants;
and if the syllable only contains the initial consonant, judging the syllable as the syllable to be complemented.
Optionally, the determining the candidate completion string corresponding to the syllable to be completed includes:
acquiring a historical screen entry which has a mapping relation with the original character string, and determining a candidate completion character string corresponding to the syllable to be completed from the pinyin of the historical screen entry;
or,
and acquiring a final corresponding to the initial in the syllable to be complemented according to a pre-established character string index table to serve as the candidate complementing character string.
Optionally, after the determining the candidate completion string corresponding to the syllable to be completed, the method further includes:
and adjusting the display sequence of the candidate complete character strings.
Optionally, the adjusting the display order of the candidate completion string includes:
acquiring an available entry corresponding to the original character string, wherein the available entry comprises a candidate entry obtained by decoding the original character string and/or a historical screen entry having a mapping relation with the original character string;
determining an available completion character string corresponding to the syllable to be completed from the pinyin of the available entry, wherein the available completion character string belongs to the candidate completion character string;
and adjusting the display sequence of the available complete character strings according to the sequence of the available entries.
Optionally, the ordering of the available entries is determined as follows:
determining the sequence of the available entries according to the scoring values of the candidate entries obtained by decoding;
and/or the presence of a gas in the gas,
and determining the sequence of the available entries according to the screen-up time and/or the screen-up times of the historical screen-up entries.
Optionally, the method further comprises:
adjusting the display sequence of the residual complement strings in the following way:
adjusting the display sequence of the residual complement character strings according to the length of the residual complement character strings;
and/or the presence of a gas in the gas,
adjusting the display sequence of the residual completion character strings according to the letter sequence corresponding to the characters in the residual completion character strings;
and/or the presence of a gas in the gas,
acquiring a history completion character string having a mapping relation with the original character string; if the residual complement character string belongs to the historical complement character string, adjusting the display sequence of the residual complement character string according to the selection time and/or the selection times of the historical complement character string;
the candidate complementary strings include the available complementary string and the remaining complementary string.
Optionally, the method further comprises:
and decoding the completed character string to obtain a candidate entry corresponding to the completed character string.
Optionally, the method further comprises:
and when the input behavior of the user is judged to meet at least one of the following conditions, starting a syllable completion function:
the times of the user adopting the full spelling input is not less than a preset value;
the input times meeting the preset page turning condition are not less than the preset times, and the preset page turning condition is that the page turning times when the upper screen entries are selected are not less than the preset number of pages.
The present disclosure provides a syllable completion device, the device includes:
the device comprises a to-be-compensated syllable judging module, a to-be-compensated syllable judging module and a to-be-compensated syllable judging module, wherein the to-be-compensated syllable judging module is used for acquiring an original character string input by a user and judging whether the to-be-compensated syllable exists in the original character string;
a candidate complementing character string determining module, configured to determine, when a syllable to be complemented exists in the original character string, a candidate complementing character string corresponding to the syllable to be complemented;
and the completion processing module is used for displaying the candidate completion character string to a user, and performing completion processing on the to-be-completed syllable by using the to-be-completed character string when the user selects the to-be-used completion character string from the candidate completion character string to obtain a completed character string.
Optionally, the module for judging full syllables to be complemented is configured to judge whether each syllable only includes a consonant; and if the syllable only contains the initial consonant, judging the syllable as the syllable to be complemented.
Optionally, the candidate completion string determining module is configured to obtain a history screen entry having a mapping relationship with the original string, and determine, from a pinyin of the history screen entry, a candidate completion string corresponding to the syllable to be completed;
or,
and the candidate complementing character string determining module is used for acquiring a final corresponding to the initial in the syllable to be complemented according to a pre-established character string index table to serve as the candidate complementing character string.
Optionally, the apparatus further comprises:
and the display sequence adjusting module is used for adjusting the display sequence of the candidate complete character string after determining the candidate complete character string corresponding to the syllable to be supplemented.
Optionally, the display order adjusting module includes:
an available entry obtaining module, configured to obtain an available entry corresponding to the original character string, where the available entry includes a candidate entry obtained by decoding the original character string and/or a history on-screen entry having a mapping relationship with the original character string;
an available complement character string determining module, configured to determine, from the pinyin for the available entry, an available complement character string corresponding to the syllable to be complemented, where the available complement character string belongs to the candidate complement character string;
and the available complement character string sequence adjusting module is used for adjusting the display sequence of the available complement character strings according to the sequence of the available entries.
Optionally, the display order adjusting module further includes:
the available entry ordering module is used for determining the ordering of the available entries according to the grading values of the candidate entries obtained by decoding; and/or determining the sequence of the available entries according to the screen-up time and/or the screen-up times of the historical screen-up entries.
Optionally, the display order adjusting module further includes:
the residual complement character string sequence adjusting module is used for adjusting the display sequence of the residual complement character string according to the length of the residual complement character string; and/or adjusting the display sequence of the residual completion character strings according to the letter sequence corresponding to the characters in the residual completion character strings; and/or acquiring a history completion character string having a mapping relation with the original character string; if the residual complement character string belongs to the historical complement character string, adjusting the display sequence of the residual complement character string according to the selection time and/or the selection times of the historical complement character string; the candidate complementary strings include the available complementary string and the remaining complementary string.
Optionally, the apparatus further comprises:
and the decoding processing module is used for decoding the completed character string to obtain a candidate entry corresponding to the completed character string.
Optionally, the apparatus further comprises:
the syllable complementing function starting module is used for starting the syllable complementing function when the input behavior of the user is judged to meet at least one of the following conditions:
the times of the user adopting the full spelling input is not less than a preset value;
the input times meeting the preset page turning condition are not less than the preset times, and the preset page turning condition is that the page turning times when the upper screen entries are selected are not less than the preset number of pages.
The present disclosure provides a storage medium having stored therein a plurality of instructions, which are loaded by a processor, for performing the steps of the syllable completion method described above.
The present disclosure provides an electronic device, comprising;
the storage medium described above; and
a processor to execute the instructions in the storage medium.
In the scheme, after the original character string input by the user is obtained, syllable segmentation can be performed firstly, and whether the full syllable to be complemented exists is judged; when the syllable to be complemented exists, determining a candidate complementing character string corresponding to the syllable to be complemented, displaying the candidate complementing character string to a user for the user to check, and selecting the candidate complementing character string to be complemented from the candidate complementing character string; and finally, utilizing the to-be-supplemented character string to perform supplementation processing on the to-be-supplemented complete syllable to obtain a supplemented character string. By the scheme, the key input speed of the user can be improved no matter the user aims at the all-spelling input or the user needs to turn pages for multiple times to find the expected candidate entry.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a schematic flow chart of a syllable completion method according to the present disclosure;
FIG. 2 is a diagram illustrating the effect of syllable completion according to the present disclosure;
FIG. 3 is a diagram illustrating another embodiment of syllable completion according to the present disclosure;
FIG. 4 is a schematic diagram of a syllable completion device according to the present disclosure;
fig. 5 is a schematic structural diagram of an electronic device for syllable completion according to the present disclosure.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
Before introducing the present disclosure, an application scenario of the present disclosure is explained.
The inventor finds in practice that factors affecting the key input speed, without considering the user input difference, mainly have the following two aspects:
in a first aspect, a user is accustomed to spell input. Generally, the pinyin length corresponding to one Chinese character is 1-6 characters, and the average length is 4 characters. When inputting a short pinyin, the effect of the full pinyin input on the key input speed may be less obvious, but when inputting a long pinyin, for example, when inputting a full pinyin for "decoration", a total of 11 characters of "zhuanghuang" needs to be input, and such a long pinyin will reduce the key input speed of the user to some extent. In addition, the more characters contained in pinyin, the more easily errors are caused to delete the pinyin, and the key input speed is further reduced.
In a second aspect, the user is accustomed to a concatemeric input. For pinyin input by simple pinyin, the accuracy of candidate entries obtained by language model decoding is relatively low, and a user may need to turn pages for many times to find out the expected candidate entries. Therefore, the key input speed of the user is reduced, and the user experience is influenced.
In response to the above analysis, the present disclosure provides a syllable completion scheme, so as to increase the key input speed of the user. See the description below for details.
Referring to fig. 1, a flow diagram of the syllable completion method of the present disclosure is shown. May include the steps of:
s101, acquiring an original character string input by a user, and judging whether the original character string has a full syllable to be complemented.
Taking the user input of "yinj" as an example, the original character string may be input in a simple spelling mode; alternatively, it may be a full pinyin type input, but the user has not completed all inputs for the pinyin.
After the original character string is obtained through the key information input by the user, the syllable of the original character string can be segmented firstly, and then whether the syllable to be complemented exists or not is judged. It is understood that a syllable to be complemented refers to the complete input of pinyin that the syllable is not complete.
In the example above, syllable segmentation can result in "yin 'j", where "'" represents a syllable separator. The specific syllable splitting process can be realized by referring to the related art, and is not detailed here.
As an example, whether a syllable is to be complemented may be determined based on the type of character it contains. For example, if a syllable contains only initial, the syllable may be determined to be a syllable to be complemented.
Typically, the consonants include: b. p, m, f, d, t, n, l, g, k, h, j, q, x, zh, ch, sh, r, z, c, s, that is, it can be determined whether the last character or the last two characters of the syllable are consonants, if so, it can be determined that the syllable is a syllable to be complemented.
In the example given above, the last character of the second syllable is "j" and the type of the character is the initial, so the second syllable can be determined as the syllable to be complemented.
In the practical application process, whether each syllable is a syllable to be complemented can be judged one by one along with the input of the user, and the syllable complementing processing is carried out, which is not specifically limited by the scheme of the disclosure.
S102, if the original character string has the syllable to be complemented, determining the candidate complemented character string corresponding to the syllable to be complemented.
After judging that the original character string has the syllable to be complemented, determining the corresponding candidate complemented character string according to the characters included in the syllable to be complemented. It is to be appreciated that at least one character may be included in the candidate completion string.
Generally, the input behavior of the user has certain preference, and is mostly related to the life and work of the user. Taking the input "yinj" as an example, the entry intended to be on-screen may be a "syllable" for users engaged in speech recognition domain-related work, and a "referral" for users engaged in other domain-related work. Therefore, the user dictionary can be generated according to the historical word selection records of the user, and the mapping relation between the original character strings and the historical screen entries can be stored in the user dictionary. Therefore, when the situation that the original character string has the to-be-supplemented syllable is judged, the historical screen entries which have the mapping relation with the original character string can be searched in the user dictionary, and the complete character string corresponding to the historical screen entries is determined as the candidate complete character string.
For example, in the user dictionary of user a, the history entry having a mapping relationship with "yinj" includes: syllables, introduction and drinking can be known from the pinyin of each historical screen entry, and the corresponding complete character strings are respectively: ie. in and iu, so that when syllable completion is performed for the user a, "ie, in and iu" can be determined as a candidate completion string for "j".
As an example, in order to ensure the comprehensiveness of the candidate completion string and avoid syllable completion failure caused by omission, the present disclosure may further create a string index table in advance, where all finals corresponding to the initial consonant may be stored in the table. For example, the vowel corresponding to the initial "j" may include: i. u, ia, ian, iang, iao, ie, iong, in, ing, iu, ua, un, ue. For the original character string "yinj", a candidate complete character string of "j" can be determined by querying the character string index table.
S103, displaying the candidate completion character string to a user, and performing completion processing on the to-be-completed syllable by using the to-be-completed character string when the user selects the to-be-completed character string from the candidate completion character string to obtain a completed character string.
According to the scheme, after the candidate completion character string is obtained, the candidate completion character string can be displayed to a user for viewing, the user can select the completion character string to be used from the candidate completion character string, and syllable completion is further completed based on the completion character string to be used.
In the practical application process, an area can be independently arranged at the input box to display the candidate complete character string; alternatively, the candidate completion string may be presented in a floating or the like form elsewhere. Taking fig. 2 as an example, the candidate completion string may be displayed above the candidate entry, and in order to avoid occupying too much screen space, a row of candidate completion strings may be preferentially displayed, and when a user needs it, other hidden candidate completion strings are expanded and displayed, which may be specifically referred to the expanded effect diagram shown in fig. 3. The display area, the display mode, and the like of the candidate complete character string according to the present disclosure may not be specifically limited.
It should be noted that, for a user using a 26-key full keyboard, if a candidate completion string includes only 1 character, such as the candidate completion strings "i" and "u" of "j", the user only needs to perform one key pressing operation no matter whether the user selects the completion string to be used or performs full spelling input through the keyboard, and the operation cost of syllable completion and full spelling input is the same. Therefore, in the practical application process, in order to save the screen space, the candidate complete character string only comprising 1 character can be hidden and not displayed; of course, in order to ensure the comprehensiveness of the candidate completion string, such a candidate completion string including only 1 character may also be presented to the user, which is not specifically limited in the present disclosure.
As an application of the scheme, after syllable completion is performed based on the scheme, decoding processing can be performed by replacing an original character string with a completed character string, and candidate entries corresponding to the completed character string are obtained for a user to select.
For example, the complemented character string may be syllable-segmented to obtain at least one syllable-segmented path; and decoding each syllable segmentation path by using a language model to obtain candidate entries corresponding to the completed character strings. The specific decoding process can be implemented by reference to the related art, and is not described in detail herein. For example, the segmentation path may be decoded by an ngram language model, and the viterbi algorithm is used to determine the first N decoding results with the highest score output by the language model, which are used as candidate entries corresponding to the completed character string.
In summary, for the user of the full spelling input, when the user does not complete all the pinyin input, the user can select the to-be-used full character string by one key in a way of displaying the candidate full character string, and complete all the pinyin input quickly, so that the key input speed can be improved, and the backdrop caused by input errors can be avoided. For a user who simply spells for input, the user selects a character string to be complemented by one key to complete syllable complementation, which is beneficial to improving the accuracy of the candidate entry obtained by decoding.
It can be understood that, when the syllable to be complemented corresponds to a plurality of candidate complementing character strings, the more advanced the ranking of the character strings to be complemented, the shorter the time taken by the user to select the character strings to be complemented, which is more beneficial to increase the key input speed. Correspondingly, after the candidate completion string is determined in step S102, the candidate completion string may be randomly sorted, and the display order of the candidate completion string may be adjusted in the following manner, which is helpful to further increase the key input speed.
Specifically, an available entry corresponding to the original character string may be obtained first; then determining an available complementing character string corresponding to the syllable to be complemented from the pinyin of the available entry; and then adjusting the display sequence of the available complete character strings according to the sequence of the available entries. It is to be understood that the available completion string belongs to the candidate completion string.
As an example, the language model may be used to decode the original character string to obtain a candidate entry corresponding to the original character string as an available entry; and/or, a historical screen entry having a mapping relation with the original character string can be searched in the user dictionary to serve as an available entry. The method for obtaining the available entry corresponding to the original character string in the scheme of the present disclosure may not be specifically limited.
For example, if the original string "yinj" is decoded by the language model, the resulting candidate entries include: 1) syllables, 2) drinking, 3) imprinting, 4) introduction, and 5) occult, the 5 candidate entries can be used as available entries to obtain the available complete character strings "ie", "iu", "i", "in", and "u".
For example, if the user dictionary has a history entry with a mapping relation to the original character string "yinj" includes: 1) referral, 2) syllable, 3) introduction, the 3 historical onscreen entries can be used as available entries to obtain available completion strings "ian", "ie", "in".
In the practical application process, the available entries obtained in the two manners can be combined to obtain 6 available complete character strings of "ie", "iu", "i", "in", "u", "ian".
As introduced above, the disclosed solution may adjust the display order of the available completion strings according to the ordering of the available terms. The ordering of the available terms may be determined, for example, at least in the following manner.
In the first mode, if the available entry is a candidate entry, the order of the available entry may be determined according to the score values of the candidate entries obtained by the decoding process.
As described above, the language model may be decoded to obtain a scoring value for each candidate entry. Generally, the higher the score value of the candidate entry is, the higher the possibility that the candidate entry is selected by the user to be displayed on the screen is, so that the order of the available entries can be determined according to the score value of the candidate entry from high to low.
For example, if the scores of the 5 candidate entries obtained by decoding are sequentially from high to low: syllable, drinking, imprinting, introduction, occult, then the ordering of the available completion strings can be: ie. iu, i, in, u.
In a second mode, if the available entry is a historical entry on the screen, the order of the available entry can be determined according to the screen-up time and/or the screen-up times of the historical entry on the screen.
As described above, the historical entry on the screen corresponding to the original character string, and the screen-up time and/or the screen-up times of each historical entry on the screen can be counted according to the historical word-selecting records of the user.
Generally, the closer the screen-up time of the historical screen entry is to the current time, the more the historical screen entry meets the input preference of the user, the higher the possibility that the user selects the screen-up is, and therefore the sequence of the available entries can be determined according to the screen-up time of the historical screen entry from near to far.
Generally, the more the historical entry is displayed according to the input preference of the user, the higher the possibility that the entry is selected by the user is, and therefore the sequence of the available entries can be determined according to the display times of the historical entry.
In the practical application process, different weights can be set for the screen-on time and the screen-on times, and the sequence of the available entries is determined based on the weighted sum of the screen-on time and the screen-on times. The present disclosure may not be particularly limited thereto.
For example, if the weighted sum of the 3 historical screen entries from the lookup table is from high to low: referral, syllable, introduction, the ordering of the available completion strings may be: ian, ie, in.
And thirdly, determining the sequence of the available entries by combining the two modes.
For example, different priorities may be set for the two manners, for example, if manner two has a higher priority than manner one, then the manners may be sorted according to manner two and then sorted according to manner one, so in the above example, the comprehensive sorting of the available completion strings may be: ian, ie, in, iu, i, u. The priority of the two modes may not be specifically limited by the scheme of the present disclosure.
As an example, for a user with 26-key full keyboard input, the candidate completion string including only 1 character may be hidden from being displayed, so the comprehensive ranking result of the available completion strings may be: ian, ie, in, iu.
In an actual application process, the available completion string determined above may be all of the candidate completion string or may be a part of the candidate completion string. For example, the candidate completion string corresponding to the original string "yinj" is: i. u, ia, ian, iang, iao, ie, iong, in, ing, iu, ua, un, ue, if the determined available completion string is: ie. iu, i, in, u, there is also a remaining complementary string as follows: ia. ian, iang, iao, iong, ing, uan, un, ue.
For example, the present disclosure may adjust the presentation order of the remaining complementary strings in at least the following ways:
in the first mode, the display sequence of the residual complement character strings is adjusted according to the length of the residual complement character strings. For example, the remaining complementary character strings may be sorted according to the length of the character strings from short to long, or from long to short, which is not specifically limited in the present disclosure.
And secondly, adjusting the display sequence of the residual completion character strings according to the alphabetic sequence corresponding to the characters in the residual completion character strings. For example, the ordering of the remaining complement strings may be determined alphabetically from a to z, or alphabetically from z to a, which may not be particularly limited by the present disclosure. It will be appreciated that when the characters at the same position correspond to the same letter, the alphabetical order of the characters at the next position can be sequentially determined, and the ordering of the remaining complementary strings can be determined accordingly.
Acquiring a history completion character string having a mapping relation with the original character string; and if the residual complement character string belongs to the historical complement character string, adjusting the display sequence of the residual complement character string according to the selection time and/or the selection times of the historical complement character string.
In the practical application process, a character string dictionary can be generated according to the history selection record of the user, and the character string dictionary can store the mapping relation between the original character string and the history completion character string, that is, when the user inputs the original character string in the past, the user selects which one or more to-be-used completion character strings are selected.
Generally, the closer the selection time of the historical complete string is to the current time, the more the selection times are, the more the historical complete string conforms to the input preference of the user, so the sorting of the remaining complete strings can be determined according to the selection time from near to far and/or the selection times from many to few, and the scheme disclosed by the invention does not need to be specifically limited to this.
In the practical application process, the display sequence of the residual complement character strings can be adjusted by using any one of the three manners. If the display order cannot be determined by one of the manners, for example, the strings of ia, un, and ue have the same length, the display order may be sorted by combining any of the other two manners, which is not specifically limited by the present disclosure.
It should be noted that, the syllable complementing method of the present disclosure can be implemented by manually turning on the syllable complementing function or manually turning off the syllable complementing function by the user according to the user requirement; alternatively, the intelligent turning on or off of the syllable complement function may be performed according to the following scheme.
Specifically, the syllable completion function may be intelligently turned on when it is determined that the input behavior of the user satisfies at least one of the following conditions.
For example, the condition satisfied by the input behavior of the user may be: the times of the user adopting the full spelling input is not less than the preset value. That is, when the user habit is judged to be completely spelled and input, the syllable complementing function can be intelligently started.
Specifically, the historical input behavior of the user may be analyzed to determine whether the user prefers to use the spell input. For example, M may be obtained0Historical screen entries of each user and input modes corresponding to the historical screen entries, and counting the number M of the historical screen entries input by full spelling1If M is1If the input value is not less than the preset value, the habit of the user to the full spelling input can be judged, and the syllable complementing function can be started.
As an example, the preset value may be a preset fixed value; or may also be according to M0And a variable value calculated from a preset fixed proportional value, e.g., a proportional value of 70%, the preset value may be M0*70%。
In practical application, the way that the user inputs pinyin may have the following three situations: (1) a full pinyin input, such as "hello ma" for pinyin "ni 'hao' ma"; (2) the last syllable is not a full pinyin, e.g., "do you" pinyin is "ni 'hao'm"; (3) other forms of simple spellings, such as "hello does" with the pinyin being "n 'h'm" or "n 'hao'm", etc.
The disclosed scheme is in statistics M1When this occurs, only the number of occurrences of the above case (1) may be considered; alternatively, the number of occurrences of the cases (1) and (2) may be considered at the same time, that is, the case (2) may be regarded as the pinyin input. The method can be specifically determined according to the practical application requirements, and the scheme of the disclosure can not be limited.
For example, the condition satisfied by the input behavior of the user may be: the input times meeting the preset page turning condition are not less than the preset times, wherein the preset page turning condition can be that the page turning times when the upper screen entries are selected are not less than the preset number of pages. That is, when it is determined that the user usually needs to turn pages many times to find the desired candidate entry, the syllable completion function can be intelligently turned on.
Specifically, the historical input behavior of the user can be analyzed to determine whether the user needs to turn pages many times to find the desired candidate entry. For example, K may be obtained0Historical screen entries of each user and page turning times corresponding to the historical screen entries, and counting the number K of the historical screen entries with the page turning times not less than the preset number1If K is1If the number of times of the candidate entry is not less than the preset number of times, the user can be judged to frequently need to turn pages for multiple times to find the expected candidate entry, and the syllable completion function can be started.
As an example, the preset number may be a preset fixed number; or may also be according to K0And a variable value calculated by a predetermined fixed ratio, for example, the ratio is 80%, and the predetermined number of times may be K0*80%。
Understandably, M0Historical screen entry, K for individual user0The historical entry of the user may be the same as or different from the historical entry of the user dictionary, which is not specifically limited in the present disclosure.
Referring to fig. 4, a schematic diagram of the syllable completion device of the present disclosure is shown. The apparatus may include:
a to-be-complemented full syllable judgment module 201, configured to obtain an original character string input by a user, and judge whether a to-be-complemented full syllable exists in the original character string;
a candidate complementing character string determining module 202, configured to determine, when a syllable to be complemented exists in the original character string, a candidate complementing character string corresponding to the syllable to be complemented;
and the completion processing module 203 is configured to display the candidate completion string to the user, and when the user selects a to-be-used completion string from the candidate completion string, perform completion processing on the to-be-completed syllable by using the to-be-used completion string to obtain a completed string.
Optionally, the module for judging full syllables to be complemented is configured to judge whether each syllable only includes a consonant; and if the syllable only contains the initial consonant, judging the syllable as the syllable to be complemented.
Optionally, the candidate completion string determining module is configured to obtain a history screen entry having a mapping relationship with the original string, and determine, from a pinyin of the history screen entry, a candidate completion string corresponding to the syllable to be completed;
or,
and the candidate complementing character string determining module is used for acquiring a final corresponding to the initial in the syllable to be complemented according to a pre-established character string index table to serve as the candidate complementing character string.
Optionally, the apparatus further comprises:
and the display sequence adjusting module is used for adjusting the display sequence of the candidate complete character string after determining the candidate complete character string corresponding to the syllable to be supplemented.
Optionally, the display order adjusting module includes:
an available entry obtaining module, configured to obtain an available entry corresponding to the original character string, where the available entry includes a candidate entry obtained by decoding the original character string and/or a history on-screen entry having a mapping relationship with the original character string;
an available complement character string determining module, configured to determine, from the pinyin for the available entry, an available complement character string corresponding to the syllable to be complemented, where the available complement character string belongs to the candidate complement character string;
and the available complement character string sequence adjusting module is used for adjusting the display sequence of the available complement character strings according to the sequence of the available entries.
Optionally, the display order adjusting module further includes:
the available entry ordering module is used for determining the ordering of the available entries according to the grading values of the candidate entries obtained by decoding; and/or determining the sequence of the available entries according to the screen-up time and/or the screen-up times of the historical screen-up entries.
Optionally, the display order adjusting module further includes:
the residual complement character string sequence adjusting module is used for adjusting the display sequence of the residual complement character string according to the length of the residual complement character string; and/or adjusting the display sequence of the residual completion character strings according to the letter sequence corresponding to the characters in the residual completion character strings; and/or acquiring a history completion character string having a mapping relation with the original character string; if the residual complement character string belongs to the historical complement character string, adjusting the display sequence of the residual complement character string according to the selection time and/or the selection times of the historical complement character string; the candidate complementary strings include the available complementary string and the remaining complementary string.
Optionally, the apparatus further comprises:
and the decoding processing module is used for decoding the completed character string to obtain a candidate entry corresponding to the completed character string.
Optionally, the apparatus further comprises:
the syllable complementing function starting module is used for starting the syllable complementing function when the input behavior of the user is judged to meet at least one of the following conditions:
the times of the user adopting the full spelling input is not less than a preset value;
the input times meeting the preset page turning condition are not less than the preset times, and the preset page turning condition is that the page turning times when the upper screen entries are selected are not less than the preset number of pages.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Referring to fig. 5, a schematic diagram of an electronic device 300 for syllable completion according to the present disclosure is shown. The electronic device 300 may include at least a processor 301 and a storage medium 302, and as an example, the processor 301 and the storage medium 302 may be connected via a bus or other means, and the connection via the bus is illustrated in fig. 5 as an example. The number of the processors 301 may be one or more, and one processor is illustrated in fig. 5 as an example. The storage medium 302 represents a storage device resource for storing instructions, such as application programs, that are executable by the processor 301. Further, the processor 301 may be configured to load instructions in a storage medium to perform the syllable complementation method described above.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that, in the foregoing embodiments, various features described in the above embodiments may be combined in any suitable manner, and in order to avoid unnecessary repetition, various combinations that are possible in the present disclosure are not described again.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

Claims (20)

1. A method of syllable completion, the method comprising:
acquiring an original character string input by a user, and judging whether a full syllable to be complemented exists in the original character string;
if the original character string has the syllable to be complemented, determining a candidate complete character string corresponding to the syllable to be complemented;
and displaying the candidate completion character string to a user, and performing completion processing on the to-be-completed syllable by using the to-be-completed character string when the user selects the to-be-used completion character string from the candidate completion character string to obtain a completed character string.
2. The method of claim 1, wherein the determining whether the full syllable to be complemented exists in the original string comprises:
judging whether the syllables only contain initial consonants;
and if the syllable only contains the initial consonant, judging the syllable as the syllable to be complemented.
3. The method of claim 1, wherein the determining the candidate completion string corresponding to the syllable to be completed comprises:
acquiring a historical screen entry which has a mapping relation with the original character string, and determining a candidate completion character string corresponding to the syllable to be completed from the pinyin of the historical screen entry;
or,
and acquiring a final corresponding to the initial in the syllable to be complemented according to a pre-established character string index table to serve as the candidate complementing character string.
4. The method according to any one of claims 1 to 3, wherein after determining the candidate completion string corresponding to the syllable to be completed, the method further comprises:
and adjusting the display sequence of the candidate complete character strings.
5. The method of claim 4, wherein the adjusting the presentation order of the candidate completion strings comprises:
acquiring an available entry corresponding to the original character string, wherein the available entry comprises a candidate entry obtained by decoding the original character string and/or a historical screen entry having a mapping relation with the original character string;
determining an available completion character string corresponding to the syllable to be completed from the pinyin of the available entry, wherein the available completion character string belongs to the candidate completion character string;
and adjusting the display sequence of the available complete character strings according to the sequence of the available entries.
6. The method of claim 5, wherein the ordering of the available entries is determined as follows:
determining the sequence of the available entries according to the scoring values of the candidate entries obtained by decoding;
and/or the presence of a gas in the gas,
and determining the sequence of the available entries according to the screen-up time and/or the screen-up times of the historical screen-up entries.
7. The method of claim 5, further comprising:
adjusting the display sequence of the residual complement strings in the following way:
adjusting the display sequence of the residual complement character strings according to the length of the residual complement character strings;
and/or the presence of a gas in the gas,
adjusting the display sequence of the residual completion character strings according to the letter sequence corresponding to the characters in the residual completion character strings;
and/or the presence of a gas in the gas,
acquiring a history completion character string having a mapping relation with the original character string; if the residual complement character string belongs to the historical complement character string, adjusting the display sequence of the residual complement character string according to the selection time and/or the selection times of the historical complement character string;
the candidate complementary strings include the available complementary string and the remaining complementary string.
8. The method according to any one of claims 1 to 7, further comprising:
and decoding the completed character string to obtain a candidate entry corresponding to the completed character string.
9. The method according to any one of claims 1 to 8, further comprising:
and when the input behavior of the user is judged to meet at least one of the following conditions, starting a syllable completion function:
the times of the user adopting the full spelling input is not less than a preset value;
the input times meeting the preset page turning condition are not less than the preset times, and the preset page turning condition is that the page turning times when the upper screen entries are selected are not less than the preset number of pages.
10. A syllable completion apparatus, characterized in that the apparatus comprises:
the device comprises a to-be-compensated syllable judging module, a to-be-compensated syllable judging module and a to-be-compensated syllable judging module, wherein the to-be-compensated syllable judging module is used for acquiring an original character string input by a user and judging whether the to-be-compensated syllable exists in the original character string;
a candidate complementing character string determining module, configured to determine, when a syllable to be complemented exists in the original character string, a candidate complementing character string corresponding to the syllable to be complemented;
and the completion processing module is used for displaying the candidate completion character string to a user, and performing completion processing on the to-be-completed syllable by using the to-be-completed character string when the user selects the to-be-used completion character string from the candidate completion character string to obtain a completed character string.
11. The apparatus of claim 10,
the module for judging the syllables to be complemented is used for judging whether the syllables only contain initial consonants; and if the syllable only contains the initial consonant, judging the syllable as the syllable to be complemented.
12. The apparatus of claim 10,
the candidate complementing character string determining module is used for acquiring a historical screen entry which has a mapping relation with the original character string, and determining a candidate complementing character string corresponding to the syllable to be complemented from pinyin of the historical screen entry;
or,
and the candidate complementing character string determining module is used for acquiring a final corresponding to the initial in the syllable to be complemented according to a pre-established character string index table to serve as the candidate complementing character string.
13. The apparatus of any one of claims 10 to 12, further comprising:
and the display sequence adjusting module is used for adjusting the display sequence of the candidate complete character string after determining the candidate complete character string corresponding to the syllable to be supplemented.
14. The apparatus of claim 13, wherein the presentation order adjustment module comprises:
an available entry obtaining module, configured to obtain an available entry corresponding to the original character string, where the available entry includes a candidate entry obtained by decoding the original character string and/or a history on-screen entry having a mapping relationship with the original character string;
an available complement character string determining module, configured to determine, from the pinyin for the available entry, an available complement character string corresponding to the syllable to be complemented, where the available complement character string belongs to the candidate complement character string;
and the available complement character string sequence adjusting module is used for adjusting the display sequence of the available complement character strings according to the sequence of the available entries.
15. The apparatus of claim 14, wherein the presentation order adjustment module further comprises:
the available entry ordering module is used for determining the ordering of the available entries according to the grading values of the candidate entries obtained by decoding; and/or determining the sequence of the available entries according to the screen-up time and/or the screen-up times of the historical screen-up entries.
16. The apparatus of claim 14, wherein the presentation order adjustment module further comprises:
the residual complement character string sequence adjusting module is used for adjusting the display sequence of the residual complement character string according to the length of the residual complement character string; and/or adjusting the display sequence of the residual completion character strings according to the letter sequence corresponding to the characters in the residual completion character strings; and/or acquiring a history completion character string having a mapping relation with the original character string; if the residual complement character string belongs to the historical complement character string, adjusting the display sequence of the residual complement character string according to the selection time and/or the selection times of the historical complement character string; the candidate complementary strings include the available complementary string and the remaining complementary string.
17. The apparatus of any one of claims 10 to 16, further comprising:
and the decoding processing module is used for decoding the completed character string to obtain a candidate entry corresponding to the completed character string.
18. The apparatus of any one of claims 10 to 17, further comprising:
the syllable complementing function starting module is used for starting the syllable complementing function when the input behavior of the user is judged to meet at least one of the following conditions:
the times of the user adopting the full spelling input is not less than a preset value;
the input times meeting the preset page turning condition are not less than the preset times, and the preset page turning condition is that the page turning times when the upper screen entries are selected are not less than the preset number of pages.
19. A storage medium having stored therein a plurality of instructions, wherein said instructions are loaded by a processor for performing the steps of the method of any of claims 1 to 9.
20. An electronic device, characterized in that the electronic device comprises;
the storage medium of claim 19; and
a processor to execute the instructions in the storage medium.
CN201810289041.5A 2018-04-03 2018-04-03 Syllable complementing method and device, storage medium and electronic equipment Pending CN108829266A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810289041.5A CN108829266A (en) 2018-04-03 2018-04-03 Syllable complementing method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810289041.5A CN108829266A (en) 2018-04-03 2018-04-03 Syllable complementing method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN108829266A true CN108829266A (en) 2018-11-16

Family

ID=64155190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810289041.5A Pending CN108829266A (en) 2018-04-03 2018-04-03 Syllable complementing method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN108829266A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426359A (en) * 2017-09-05 2019-03-05 北京搜狗科技发展有限公司 A kind of input method, device and machine readable media
CN109634437A (en) * 2018-12-13 2019-04-16 上海二三四五网络科技有限公司 A kind of control method showing completion information in candidates of input method and control device
CN113342183A (en) * 2021-06-30 2021-09-03 北京搜狗科技发展有限公司 Input method, input device and input device

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257719A (en) * 2012-02-21 2013-08-21 腾讯科技(深圳)有限公司 Generation method and system of candidate words in input method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103257719A (en) * 2012-02-21 2013-08-21 腾讯科技(深圳)有限公司 Generation method and system of candidate words in input method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426359A (en) * 2017-09-05 2019-03-05 北京搜狗科技发展有限公司 A kind of input method, device and machine readable media
CN109634437A (en) * 2018-12-13 2019-04-16 上海二三四五网络科技有限公司 A kind of control method showing completion information in candidates of input method and control device
CN113342183A (en) * 2021-06-30 2021-09-03 北京搜狗科技发展有限公司 Input method, input device and input device

Similar Documents

Publication Publication Date Title
CN108287858B (en) Semantic extraction method and device for natural language
CN105917327B (en) System and method for entering text into an electronic device
JP5752150B2 (en) Context-sensitive automatic language correction using an Internet corpus specifically for small keyboard devices
US20080294982A1 (en) Providing relevant text auto-completions
CN104102720B (en) The Forecasting Methodology and device efficiently input
KR100891358B1 (en) System and its method for inputting character by predicting character sequence of user's next input
CA2638558C (en) Topic word generation method and system
TWI475406B (en) Contextual input method
CN111274785B (en) Text error correction method, device, equipment and medium
CN104571587B (en) The method and apparatus screened to the upper screen candidate item of input method
CN102455845B (en) Character entry method and device
US20060149557A1 (en) Sentence displaying method, information processing system, and program product
US8312025B2 (en) Information processing device, information processing method, and information processing program
CN112417848A (en) Corpus generation method and device and computer equipment
CN108829266A (en) Syllable complementing method and device, storage medium and electronic equipment
WO2014181508A1 (en) Information processing apparatus, information processing method, and program
US20130054578A1 (en) Text search apparatus and text search method
CN111665954A (en) Character input device and non-transitory recording medium storing character input program
CN110073351B (en) Predicting text by combining candidates from user attempts
CN117251061B (en) AIGC-based same-screen intelligent input method and device
CN112783337B (en) Input method candidate item ordering method and related model training method
CN111857362A (en) Character input method and character input device
JP2006251935A (en) Document retrieval device, document retrieval method and document retrieval program
CN115188381B (en) Voice recognition result optimization method and device based on click ordering
US20030110451A1 (en) Practical chinese classification input method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20181116