A word learning method, device and electronic equipment
By performing word segmentation processing and word learning on the user's input content, the problem that the existing input method cannot learn long words that are on the screen multiple times and have little semantic correlation is solved, and the effect of improving the efficiency of inputting long words is achieved.
Patent Information
- Application Number
- CN201910989796.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-17
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2040-06-21
AI Technical Summary
When entering long words, existing input methods cannot effectively learn words that are multiple times on the screen and have little semantic correlation, which causes users to need to go up the screen multiple times to complete the input, reducing input efficiency.
By determining whether the user input has ended, the input content is segmented, and the word is learned based on the word segmentation results, so that the candidates are matched for the user to choose when the user enters the first few words of the long word.
The efficiency of inputting long words is improved. Users can quickly complete input by matching long word candidates and learn complete user words, which improves the learning effect of input method.
Smart Images

Figure CN112684905B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a method and device for learning words and an electronic device. Background Art
[0002] With the development of computer technology, electronic devices such as mobile phones and tablet computers have become increasingly popular, bringing great convenience to people's lives, studies, and work. These electronic devices are usually installed with an input method application program (abbreviated as input method), enabling users to use the input method for information input.
[0003] Generally, the input method will learn words based on the user's input operations and then make corresponding recommendations based on the learned words; for example, learning words based on the user's on-screen operation. For example, after the user screens "everyone" from the candidate bar, the word "everyone" is learned; when the user inputs "da" next time, "jia" can be matched and recommended. However, when the user inputs a relatively long word, the long word may be screened multiple times; for example: when the user wants to input the long word "traumatic asphyxia syndrome", the user may screen "traumatic", "asphyxia", and "syndrome" in sequence before being able to complete the input of this long word, and the semantic relevance of these three words is also not high. Furthermore, the input method can only learn the three words "traumatic", "asphyxia", and "syndrome" respectively, and cannot learn the long word "traumatic asphyxia syndrome", making it necessary for the user to screen multiple times each time to complete the input of the long word. Summary of the Invention
[0004] Embodiments of the present invention provide a method for learning words to improve the efficiency of inputting long words.
[0005] Correspondingly, embodiments of the present invention also provide a device for learning words and an electronic device to ensure the implementation and application of the above method.
[0006] To solve the above problems, embodiments of the present invention disclose a method for learning words, specifically including: determining whether the user's input in the edit box has ended; when it is determined that the user's input has ended, performing word segmentation processing on the input content input by the user into the edit box; and learning words based on the word segmentation result.
[0007] Optionally, determining whether the user's input in the edit box has ended includes: when receiving an on-screen instruction, determining whether the input content in the edit box before the user's current on-screen operation is the same as the input content in the edit box after the previous on-screen operation; if not, determining that the user's previous input in the edit box has ended.
[0008] Optionally, determining whether the user has finished inputting includes: determining whether the user has executed a preset operation, the preset operation including at least one of the following: a send operation, a search operation, and a go operation; if it is determined that the user has executed the preset operation, then determining that the user's input in the edit box is finished.
[0009] Optionally, the performing word segmentation processing on the input content input by the user into the edit box includes: using a natural language processing method to perform word segmentation processing on the input content input by the user into the edit box.
[0010] Optionally, the learning words based on word segmentation results includes: when the word segmentation results include multiple words, taking each of the word segmentation results as a word learning result.
[0011] Optionally, the method further includes: obtaining the input content re-entered by the user in the edit box, matching the input content with the first N characters of the word learning result, where N is a positive integer; taking the word learning result whose first N characters match the input content as a candidate item, and displaying the candidate item.
[0012] Optionally, displaying the candidate items includes: if the candidate items are word learning results whose first N characters partially match the input content, determining a candidate order of the candidate items based on the degree of matching; and displaying the candidate items according to the candidate order.
[0013] Optionally, the learning of words based on word segmentation results includes: when the word segmentation results include multiple words, learning words by association based on two adjacent word segmentation results on the screen.
[0014] Optionally, the method further comprises: when the user inputs the first word of the two adjacent word segmentation results on the screen again in the edit box, the second word of the two adjacent word segmentation results on the screen is used as an association candidate and displayed.
[0015] An embodiment of the present invention also discloses a word learning device, which specifically includes: a judgment module, used to judge whether the user's input in the edit box is completed; a word segmentation module, used to determine when the user input is completed, and perform word segmentation processing on the input content input by the user into the edit box; and a word learning module, used to learn words based on the word segmentation results.
[0016] Optionally, the judgment module includes: a first input judgment submodule, which is used to determine whether the input content in the edit box before the user goes on screen this time is the same as the input content in the edit box after the user went on screen last time when receiving the screen display instruction; if they are not the same, it is determined that the user's last input in the edit box has ended.
[0017] Optionally, the judgment module includes: a second input judgment submodule, used to judge whether the user performs a preset operation, and the preset operation includes at least one of the following: a send operation, a search operation, and a go operation; if it is determined that the user performs the preset operation, it is determined that the user's input in the edit box is completed.
[0018] Optionally, the word segmentation module is used to use a natural language processing device to perform word segmentation processing on the input content entered by the user into the edit box.
[0019] Optionally, the word learning module includes: a conventional word learning submodule, which is used to treat each of the word segmentation results as a word learning result when the word segmentation results include multiple results.
[0020] Optionally, the device also includes: an acquisition module, used to obtain the input content re-entered by the user in the edit box, and match the input content with the first N words of the word learning result, where N is a positive integer; a first candidate determination module, used to take the word learning result whose first N words match the input content as a candidate item, and display the candidate item.
[0021] Optionally, the first candidate determination module is used to determine the candidate order of the candidate items based on the degree of matching if the candidate items are word learning results whose first N characters partially match the input content; and display the candidate items in the candidate order.
[0022] Optionally, the word learning module includes: an associative word learning submodule, which is used to perform associative word learning based on two adjacent word segmentation results on the screen when the word segmentation results include multiple words.
[0023] Optionally, the device further comprises: a second candidate determination module, which is used to display the latter word in the two adjacent word segmentation results on the screen as an association candidate when the user inputs the former word in the edit box again.
[0024] An embodiment of the present invention further discloses a readable storage medium. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute a word learning method as described in any one of the embodiments of the present invention.
[0025] An embodiment of the present invention also discloses an electronic device, comprising a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors, wherein the one or more programs include instructions for performing the following operations: determining whether the user input in the edit box is finished; when determining that the user input is finished, performing word segmentation processing on the input content input by the user into the edit box; and learning words based on the word segmentation results.
[0026] Optionally, determining whether the user's input in the edit box is completed includes: when receiving a screen-up instruction, determining whether the input content in the edit box before the user goes on screen this time is the same as the input content in the edit box after the user went on screen last time; if they are not the same, determining that the user's last input in the edit box is completed.
[0027] Optionally, determining whether the user has finished inputting includes: determining whether the user has executed a preset operation, the preset operation including at least one of the following: a send operation, a search operation, and a go operation; if it is determined that the user has executed the preset operation, then determining that the user's input in the edit box is finished.
[0028] Optionally, the performing word segmentation processing on the input content input by the user into the edit box includes: using a natural language processing electronic device to perform word segmentation processing on the input content input by the user into the edit box.
[0029] Optionally, the learning words based on word segmentation results includes: when the word segmentation results include multiple words, taking each of the word segmentation results as a word learning result.
[0030] Optionally, it also includes instructions for performing the following operations: obtaining the input content re-entered by the user in the edit box, matching the input content with the first N words of the word learning result, where N is a positive integer; taking the word learning result whose first N words match the input content as a candidate item, and displaying the candidate item.
[0031] Optionally, displaying the candidate items includes: if the candidate items are word learning results whose first N characters partially match the input content, determining a candidate order of the candidate items based on the degree of matching; and displaying the candidate items according to the candidate order.
[0032] Optionally, the learning of words based on word segmentation results includes: when the word segmentation results include multiple words, learning words by association based on two adjacent word segmentation results on the screen.
[0033] Optionally, it also includes instructions for performing the following operation: when the user inputs the first word of the two adjacent word segmentation results on the screen again in the edit box, the second word of the two adjacent word segmentation results on the screen is used as an association candidate and displayed.
[0034] The embodiments of the present invention include the following advantages:
[0035] In an embodiment of the present invention, it is determined whether the user input in the edit box is finished. When it is determined that the user input is finished, the input content input by the user into the edit box is segmented, and then words are learned based on the word segmentation results to learn long words that are displayed on the screen multiple times and the words that are displayed on the screen multiple times are not semantically related; then, when the user subsequently inputs the first few characters of the long word, long word candidates can be matched for the user to select, thereby improving the efficiency of inputting long words. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is a flow chart of steps of an embodiment of a word learning method of the present invention;
[0037] Figure 2 is a flowchart of steps of an optional embodiment of a word learning method of the present invention;
[0038] Figure 3 It is a structural block diagram of an embodiment of a word learning device of the present invention;
[0039] Figure 4 It is a structural block diagram of an optional embodiment of a word learning device of the present invention;
[0040] Figure 5 A structural block diagram of an electronic device for learning words according to an exemplary embodiment;
[0041] Figure 6 It is a schematic structural diagram of an electronic device for learning words according to another exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] One of the core concepts of an embodiment of the present invention is to segment the content input by the user into the edit box, and learn words based on the segmentation results to learn long words; then when the user subsequently enters the first few characters of the long word, long word candidates can be matched for the user to select, thereby improving the efficiency of inputting long words.
[0044] Reference Figure 1 , shows a flowchart of a method for learning words according to an embodiment of the present invention, which may specifically include the following steps:
[0045] Step 102: Determine whether the user has finished inputting in the edit box.
[0046] In the embodiment of the present invention, when a user needs to input in any application, he can call up the input method keyboard and then enter the corresponding input sequence on the keyboard; after the input method converts the input sequence into corresponding candidate items and displays them, the user can perform the screen operation to put the required candidate items on the screen, thereby realizing the input. Among them, the name of the edit box in different applications may be different: for example, in a browser, the name of the edit box is a search box; for example, in a chat application, the name of the edit box is an information input box, etc.; the embodiment of the present invention does not limit this.
[0047] Among them, in the prior art, the input method learns words based on the candidate items displayed on the screen by the user and the semantic association between the candidate items displayed on the screen; therefore, when the user displays a long word on the screen multiple times and there is no semantic association between the words displayed on the screen each time, the input method may not be able to learn the long word. Therefore, the embodiment of the present invention can segment the content input by the user into the edit box after the user finishes inputting, and then learn the word based on the segmentation result, so that the input method can learn the long word.
[0048] In the embodiment of the present invention, during each input process of the user in the edit box, the user's input behavior can be monitored to determine whether the user's input in the edit box has ended. When it is determined that the user's input has ended, step 104 can be executed; when it is determined that the user's input has not ended, step 102 can be continued to determine whether the user's input in the edit box has ended. Among them, the input that the user starts to input nothing in the edit box can be called an input in the edit box.
[0049] Step 104: perform word segmentation processing on the input content entered by the user into the edit box.
[0050] In an embodiment of the present invention, when it is determined that the input of the user in the edit box ends, the input content of the user in the edit box can be segmented to obtain a corresponding segmentation result. The input content of the user in the edit box can be segmented to obtain characters and / or words; then the obtained characters can be filtered, and the words after the segmentation are called segmentation results; that is, one segmentation result can refer to one word. The segmentation results can be one or more.
[0051] Step 106: Learn words based on the word segmentation results.
[0052] Then you can learn words based on the word segmentation results and learn the word segmentation results.
[0053] For example: after the user finishes inputting, the input content in the edit box is: "Effective diagnosis and treatment of abdominal wall thrombophlebitis", and the input content entered by the user into the edit box is segmented, and the segmentation results can include three words: "effective", "diagnosis and treatment" and "abdominal wall thrombophlebitis"; and then the input method can learn these three words. When a subsequent user wants to enter "abdominal wall thrombophlebitis", after entering "abdominal wall", the input method can display "abdominal wall thrombophlebitis" as a candidate. After the subsequent user screens the candidate "abdominal wall thrombophlebitis", he can complete the input of "abdominal wall thrombophlebitis", which improves the efficiency of users entering long words.
[0054] In summary, in the embodiments of the present invention, it is determined whether the user input in the edit box is finished. When it is determined that the user input is finished, the input content input by the user into the edit box is segmented, and then words are learned based on the segmentation results to learn long words that are displayed on the screen multiple times and the words that are displayed on the screen multiple times are not semantically related; and then, when the user subsequently inputs the first few characters of the long word, long word candidates can be matched for the user to select, thereby improving the efficiency of inputting long words.
[0055] In the embodiment of the present invention, in the process of learning words based on word segmentation results, if the word segmentation results include multiple words, the word learning can be achieved by directly taking one word segmentation result as a word learning result. For details, please refer to the following steps 202-206.
[0056] Reference Figure 2 , shows a flowchart of an optional embodiment of a word learning method of the present invention, which may specifically include the following steps:
[0057] Step 202: Determine whether the user has finished inputting in the edit box.
[0058] Among them, each input by the user in the edit box starts from when there is no input in the edit box. Therefore, the input content in the edit box after the last screen is displayed for the last input is different from the input content in the edit box before the first screen is displayed for the next input; and in the same input process, the content in the edit box before the previous screen is displayed is the same as the content in the edit box after the next screen is displayed. Furthermore, in an example of the present invention, each time a screen display instruction is received, it can be determined whether the user's input in the edit box is completed based on the input content entered into the edit box by the user before this screen display and the content entered into the edit box after the last screen display. Among them, it can be determined whether the user's last input in the edit box is completed, which can refer to sub-steps 22-24:
[0059] Sub-step 22: upon receiving the screen display instruction, determining whether the input content in the edit box before the current screen display by the user is the same as the input content in the edit box after the previous screen display.
[0060] Sub-step 24: If they are not the same, it is determined that the user's last input in the edit box is finished.
[0061] In an embodiment of the present invention, when a user uses an input method to input, the input method can display corresponding candidate items in a candidate column for the user to select; the user can perform a screen operation for the candidate items that meet the requirements to input the candidate items into the edit box. After the user performs the screen operation, the input method can receive the screen instruction; then, on the one hand, the candidate items corresponding to the screen instruction can be put on the screen; on the other hand, the input content in the edit box before the candidate items are put on the screen can be obtained. Then, the input content in the edit box before the user goes on the screen this time is compared with the input content in the edit box after the last screen; it is determined whether the input content in the edit box before the user goes on the screen this time is the same as the input content in the edit box after the last screen. When the input content in the edit box before the user goes on the screen this time is the same as the input content in the edit box after the last screen, it means that the two screens belong to the same input in the edit box, and it is determined that the user's input in the edit box this time has not ended. When the input content in the edit box before the user goes on screen this time is different from the input content in the edit box after the user went on screen last time, it means that the two screens are two different inputs in the edit box, and it can be determined that the user's last input in the edit box has ended.
[0062] Each time the user finishes typing in the edit box, a preset operation may be performed. For example, in a chat application, each time the user finishes typing in the edit box, a send operation may be performed to send the input content in the edit box to the other end. For another example, in a browser, each time the user finishes typing in the edit box, a search operation may be performed to obtain the corresponding search results; or a go operation may be performed to open the corresponding web page; and so on. Therefore, in an example of the present invention, it is possible to determine whether the user's input in the edit box is completed by determining whether the user has performed a preset operation. The judgment may be whether the user's input in the edit box is completed this time, and reference may be made to sub-steps 42-44:
[0063] Sub-step 42: determining whether the user performs a preset operation, wherein the preset operation includes at least one of the following: a send operation, a search operation, and a go operation.
[0064] Sub-step 44: If it is determined that the user performs a preset operation, it is determined that the user's input in the edit box is finished.
[0065] In the embodiment of the present invention, it is possible to determine whether the user has executed a preset operation by detecting whether the user has triggered a preset key in the input method keyboard. If it is detected that the user has triggered a preset key in the input method keyboard, it can be determined that the user has executed the preset operation, and further it can be determined that the user has finished inputting in the edit box this time. If it is not detected that the user has triggered the preset key in the input method keyboard, it can be determined that the user has not executed the preset operation, and further it can be determined that the user has not finished inputting in the edit box this time.
[0066] Among them, the preset buttons are different in different applications. In the chat application, the preset button can be a "send" button; in the search application, the preset button can be a "search" or "go" button. In the chat application, when it is detected that the user triggers the "send" button, it can be determined that the user has performed a sending operation; at this time, it can be determined that the user's input in the edit box this time is completed, and the input content in the edit box can be sent to the other end. In the search application, when it is detected that the user triggers the "search" button, it can be determined that the user has performed a search operation; at this time, it can be determined that the user's input in the edit box this time is completed, and a search instruction can be generated based on the content in the edit box and sent to the search application, so that the search application searches for search results corresponding to the content input in the edit box. In the search application, when it is detected that the user triggers the "go" button, it can be determined that the user has performed a go operation; at this time, it can be determined that the user's input in the edit box this time is completed, and a go instruction can be generated based on the content input in the edit box and sent to the search application, so that the search application opens the web page corresponding to the content input in the edit box.
[0067] Step 204: Use a natural language processing method to perform word segmentation processing on the input content entered by the user into the edit box.
[0068] After determining that the user's input in the edit box is finished, the input content entered by the user into the edit box can be segmented. In one example of the present invention, a natural language processing method can be used to perform word segmentation on the input content entered by the user into the edit box to determine the corresponding word segmentation result. In one implementation of the present invention, a dictionary-based rule matching method can be used to perform word segmentation on the input content entered by the user into the edit box. For example, the forward maximum matching method: matches the sentence from left to right, and the longer the matching word, the better; another example is the reverse maximum matching method: matches the sentence from right to left, and the longer the matching word, the better; another example: bidirectional matching word segmentation, then the forward maximum matching and the reverse maximum matching are used at the same time, and the one with fewer words in the two word segmentation results is selected. In another implementation of the present invention, the input content entered by the user into the edit box can be segmented based on a statistical machine learning method. For example, models such as HMM (Hidden Markov Model), CRF (Conditional Random Fields) and deep learning models are used for implementation, but the embodiments of the present invention do not limit this.
[0069] Step 206: When there are multiple word segmentation results, each of the word segmentation results is used as a word learning result.
[0070] In an embodiment of the present invention, the word segmentation result may be one or more; when the word segmentation result is one, the input method may use this word as a word learning result. When the word segmentation result includes multiple words, each word segmentation result may be used as a word learning result. For example, after the user finishes inputting in the edit box, the input content in the edit box is "complications of traumatic asphyxia syndrome". After word segmentation processing of the input content, the word segmentation results obtained are: "traumatic asphyxia syndrome" and "complications"; the input method may use "traumatic asphyxia syndrome" as a word learning result and "complications" as a word learning result.
[0071] In an embodiment of the present invention, after the input method learns words in the above manner, when the user inputs again in the edit box, the input method can obtain the input content input again by the user in the edit box, and match the input content with the first N characters of the word learning result; use the word learning result whose first N characters match the input content as a candidate, and display the candidate. Wherein, N is a positive integer such as 2, and the embodiment of the present invention does not limit this. For example, the input method learns the word learning result as: "traumatic asphyxia syndrome", when the user inputs the input content such as "trauma" in the edit box again, the input method can match "trauma" with the first 2 characters of each word learning result; wherein, the first 2 characters of the word learning result "traumatic asphyxia syndrome" match the input content "trauma"; therefore, "traumatic asphyxia syndrome" can be used as a candidate and displayed.
[0072] Among them, the user may be able to input the first N characters of the word learning result completely; however, since one or more of the first N characters of some word learning results may be uncommon characters, the user may only be able to input the simple part of them. Therefore, in order to improve the input efficiency of the user, the word learning result whose first N characters match the input content as a candidate may refer to taking the word learning result whose first N characters completely match the input content as a candidate; or may refer to taking the word learning result whose first N characters partially match the input content as a candidate, and the embodiment of the present invention does not limit this.
[0073] In an embodiment of the present invention, if the candidate item is a word learning result whose first N characters partially match the input content, the candidate order of the candidate items is determined according to the degree of matching; and the candidate items are displayed according to the candidate order. For example, the candidate order is obtained by sorting in descending order according to the degree of matching; and the candidate items with higher matching degrees are ranked higher. Among them, the matching degree may refer to the matching degree between the first N characters of the word learning result and the input content in the user input edit box; the determination method may include multiple methods, such as matching rate, etc., which are not limited in the embodiment of the present invention.
[0074] In an embodiment of the present invention, it is also possible to learn words by association based on the word segmentation results to improve the accuracy of input method association. One implementation method may be that when the word segmentation results include multiple words, learning words by association is performed based on the word segmentation results that appear on the screen twice adjacently. The word learning by association may refer to using one word as an association candidate for another, for example, using the latter word segmentation result of the word segmentation results corresponding to the two adjacent word segmentation results that appear on the screen as an association candidate for the former word segmentation result. Then, when the user inputs the former word segmentation result of the two adjacent word segmentation results that appear on the screen again in the edit box, the latter word of the word segmentation results that appear on the screen twice adjacently is used as an association candidate and displayed.
[0075] Among them, the input method can add a screen order label to the candidate items that the user puts on the screen each time the user enters content in the edit box, and then add a screen order label to the word segmentation result based on the screen order label of the candidate items that go on the screen. Furthermore, in the process of learning words based on the word segmentation results, the word segmentation results of two adjacent screens can be determined based on the screen order labels of each word segmentation result. Since the candidate items that go on the screen each time may be independently divided into a word segmentation result, or they may be combined with other candidate items that go on the screen to be divided into a word segmentation result; therefore, when the word segmentation results include multiple, for each word segmentation result, a candidate item that completely matches the word segmentation result can be found, and then the screen order label of the matching candidate item is added to the word segmentation result.
[0076] In summary, in the embodiment of the present invention, it is determined whether the user input in the edit box is finished. When it is determined that the user input is finished, the input content input by the user into the edit box is segmented, and then the word is learned based on the segmentation result, so as to learn long words that are displayed on the screen multiple times and the words displayed on the screen multiple times are not semantically related; and then when the user subsequently inputs the first few characters of the long word, the long word candidate can be matched for the user to select, thereby improving the efficiency of inputting long words. In addition, learning words based on the segmentation result can also learn short words, and then can learn relatively complete user words.
[0077] Secondly, in an embodiment of the present invention, the method of determining whether the user's input in the edit box is completed may include multiple methods, one of which is to determine whether the input content in the edit box before the user goes on screen this time is the same as the input content in the edit box after the user went on screen last time when receiving the screen display instruction. If they are not the same, it is determined that the user's last input in the edit box is completed; the other is to determine whether the user performs a preset operation, and the preset operation includes at least one of the following: a send operation, a search operation, and a go operation. If it is determined that the user performs the preset operation, it is determined that the user's input in the edit box is completed this time; of course, it can also be a combination of the two, thereby improving the accuracy of the word segmentation results by improving the accuracy of determining whether the user has finished input, thereby further improving the accuracy of word learning.
[0078] Furthermore, in an embodiment of the present invention, when the word segmentation results include multiple ones, each of the word segmentation results is taken as a word learning result; and then when the user inputs again in the edit box, the input method can obtain the input content input again by the user in the edit box, and match the input content with the first N characters of the word learning result; the word learning result whose first N characters match the input content is taken as a candidate item, and the candidate item is displayed; thereby enabling the user to quickly input long words and improve input efficiency.
[0079] Thirdly, in the embodiment of the present invention, the word learning result whose first N characters completely match the input content can be used as a candidate, and the word learning result whose first N characters partially match the input content can also be used as a candidate; thereby solving the problem that the first N characters of the word learning result affect the user input efficiency. And if the candidate is the word learning result whose first N characters partially match the input content, the candidate order of the candidate is determined according to the degree of matching; the candidate is displayed according to the candidate order, thereby providing candidates that better meet the needs of the user, improving the input efficiency; and also improving the user experience.
[0080] In addition, in an embodiment of the present invention, when the word segmentation results include multiple words, word learning is performed based on the two adjacent word segmentation results on the screen. When the user enters the previous word of the two adjacent word segmentation results on the screen again in the edit box, the next word in the two adjacent word segmentation results on the screen is used as an association candidate and displayed; thereby, the accuracy of association can be improved.
[0081] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0082] Reference Figure 3 , shows a structural block diagram of an embodiment of a word learning device of the present invention, which may specifically include the following modules:
[0083] The judging module 302 is used to judge whether the user has finished inputting in the edit box;
[0084] The word segmentation module 304 is used to perform word segmentation processing on the input content input by the user into the edit box when the user input ends;
[0085] The word learning module 306 is used to learn words based on the word segmentation results.
[0086] Reference Figure 4 , showing a structural block diagram of an optional embodiment of a word learning device of the present invention.
[0087] In an optional embodiment of the present invention, the judging module 302 includes:
[0088] The first input judgment submodule 3022 is used to determine whether the input content in the edit box before the user goes on screen this time is the same as the input content in the edit box after the user went on screen last time when receiving the screen display instruction; if they are not the same, it is determined that the user's last input in the edit box has ended.
[0089] In an optional embodiment of the present invention, the judging module 302 includes:
[0090] The second input judgment submodule 3024 is used to judge whether the user performs a preset operation, and the preset operation includes at least one of the following: a send operation, a search operation, and a go operation; if it is determined that the user performs the preset operation, it is determined that the user's input in the edit box is completed.
[0091] In an optional embodiment of the present invention, the word segmentation module 304 is used to use a natural language processing device to perform word segmentation processing on the input content input by the user into the edit box.
[0092] In an optional embodiment of the present invention, the word learning module 306 includes:
[0093] The conventional word learning submodule 3062 is used to, when the word segmentation results include multiple ones, respectively regard each of the word segmentation results as a word learning result.
[0094] In an optional embodiment of the present invention, the device further comprises:
[0095] The acquisition module 308 is used to acquire the input content inputted again by the user in the edit box, and compare the input content with the first N words of the word learning result, where N is a positive integer;
[0096] The first candidate determination module 310 is used to take the first N words that match the input content as candidate items and display the candidate items.
[0097] In an optional embodiment of the present invention, the first candidate determination module 310 is used to determine the candidate order of the candidate items based on the degree of matching if the candidate items are word learning results whose first N characters partially match the input content; and display the candidate items in the candidate order.
[0098] In an optional embodiment of the present invention, the word learning module 306 includes:
[0099] The word learning by association submodule 3064 is used to learn words by association based on two adjacent word segmentation results on the screen when the word segmentation results include multiple words.
[0100] In an optional embodiment of the present invention, the device further comprises:
[0101] The second candidate determination module 312 is used to display the next word in the two adjacent word segmentation results as an association candidate when the user inputs the previous word in the edit box again.
[0102] In summary, in the embodiments of the present invention, it is determined whether the user input in the edit box is finished. When it is determined that the user input is finished, the input content input by the user into the edit box is segmented, and then words are learned based on the segmentation results to learn long words that are displayed on the screen multiple times and the words that are displayed on the screen multiple times are not semantically related; and then, when the user subsequently inputs the first few characters of the long word, long word candidates can be matched for the user to select, thereby improving the efficiency of inputting long words.
[0103] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0104] Figure 5 1 is a block diagram of an electronic device 500 for learning vocabulary according to an exemplary embodiment. For example, the electronic device 500 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0105] Reference Figure 5 , the electronic device 500 may include one or more of the following components: a processing component 502 , a memory 504 , a power component 506 , a multimedia component 508 , an audio component 510 , an input / output (I / O) interface 512 , a sensor component 514 , and a communication component 516 .
[0106] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
[0107] The memory 504 is configured to store various types of data to support operations on the device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0108] The power component 506 provides power to the various components of the electronic device 500. The power component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.
[0109] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0110] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 516. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.
[0111] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0112] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 can detect the open / closed state of the device 500, the relative positioning of components, such as the display and keypad of the electronic device 500, and the sensor assembly 514 can also detect the position change of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0113] The communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 514 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 514 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0114] In an exemplary embodiment, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0115] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of an electronic device 500 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0116] A non-temporary computer-readable storage medium, when the instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a word learning method, the method comprising: determining whether the user input in an edit box is finished; when it is determined that the user input is finished, performing word segmentation processing on the input content input by the user into the edit box; and learning words based on the word segmentation result.
[0117] Optionally, determining whether the user's input in the edit box is completed includes: when receiving a screen-up instruction, determining whether the input content in the edit box before the user goes on screen this time is the same as the input content in the edit box after the user went on screen last time; if they are not the same, determining that the user's last input in the edit box is completed.
[0118] Optionally, determining whether the user has finished inputting includes: determining whether the user has executed a preset operation, the preset operation including at least one of the following: a send operation, a search operation, and a go operation; if it is determined that the user has executed the preset operation, then determining that the user's input in the edit box is finished.
[0119] Optionally, the performing word segmentation processing on the input content input by the user into the edit box includes: using a natural language processing method to perform word segmentation processing on the input content input by the user into the edit box.
[0120] Optionally, the learning words based on word segmentation results includes: when the word segmentation results include multiple words, taking each of the word segmentation results as a word learning result.
[0121] Optionally, the method further includes: obtaining the input content re-entered by the user in the edit box, matching the input content with the first N characters of the word learning result, where N is a positive integer; taking the word learning result whose first N characters match the input content as a candidate item, and displaying the candidate item.
[0122] Optionally, displaying the candidate items includes: if the candidate items are word learning results whose first N characters partially match the input content, determining a candidate order of the candidate items based on the degree of matching; and displaying the candidate items according to the candidate order.
[0123] Optionally, the learning of words based on word segmentation results includes: when the word segmentation results include multiple words, learning words by association based on two adjacent word segmentation results on the screen.
[0124] Optionally, the method further comprises: when the user inputs the first word of the two adjacent word segmentation results on the screen again in the edit box, the second word of the two adjacent word segmentation results on the screen is used as an association candidate and displayed.
[0125] Figure 6 : is a structural diagram of an electronic device 600 for learning words according to another exemplary embodiment of the present invention. The electronic device 600 may be a server, which may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 622 (for example, one or more processors) and memory 632, and one or more storage media 630 (for example, one or more mass storage devices) storing application programs 642 or data 644. Among them, the memory 632 and the storage medium 630 may be temporary storage or permanent storage. The program stored in the storage medium 630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processor 622 may be configured to communicate with the storage medium 630 to execute a series of instruction operations in the storage medium 630 on the server.
[0126] The server may also include one or more power supplies 626, one or more wired or wireless network interfaces 650, one or more input and output interfaces 658, one or more keyboards 656, and / or one or more operating systems 641, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0127] An electronic device includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs include instructions for performing the following operations: determining whether the user's input in an edit box is finished; when it is determined that the user's input is finished, performing word segmentation processing on the input content input by the user into the edit box; and learning words based on the word segmentation results.
[0128] Optionally, determining whether the user's input in the edit box is completed includes: when receiving a screen-up instruction, determining whether the input content in the edit box before the user goes on screen this time is the same as the input content in the edit box after the user went on screen last time; if they are not the same, determining that the user's last input in the edit box is completed.
[0129] Optionally, determining whether the user has finished inputting includes: determining whether the user has executed a preset operation, the preset operation including at least one of the following: a send operation, a search operation, and a go operation; if it is determined that the user has executed the preset operation, then determining that the user's input in the edit box is finished.
[0130] Optionally, the performing word segmentation processing on the input content input by the user into the edit box includes: using a natural language processing electronic device to perform word segmentation processing on the input content input by the user into the edit box.
[0131] Optionally, the learning words based on word segmentation results includes: when the word segmentation results include multiple words, taking each of the word segmentation results as a word learning result.
[0132] Optionally, it also includes instructions for performing the following operations: obtaining the input content re-entered by the user in the edit box, matching the input content with the first N words of the word learning result, where N is a positive integer; taking the word learning result whose first N words match the input content as a candidate item, and displaying the candidate item.
[0133] Optionally, displaying the candidate items includes: if the candidate items are word learning results whose first N characters partially match the input content, determining a candidate order of the candidate items based on the degree of matching; and displaying the candidate items according to the candidate order.
[0134] Optionally, the learning of words based on word segmentation results includes: when the word segmentation results include multiple words, learning words by association based on two adjacent word segmentation results on the screen.
[0135] Optionally, it also includes instructions for performing the following operation: when the user inputs the first word of the two adjacent word segmentation results on the screen again in the edit box, the second word of the two adjacent word segmentation results on the screen is used as an association candidate and displayed.
[0136] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0137] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0138] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0139] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0140] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0141] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0142] The above is a detailed introduction to a word learning method, a word learning device and an electronic device provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A word learning method, applied to an input method, characterized in that: include: Determine whether the user has finished inputting in the edit box; When it is determined that the user input ends, performing word segmentation processing on the input content input by the user into the edit box; Learning words based on the word segmentation results; the word learning is used to learn long words that are displayed on the screen multiple times and have no semantic connection between the words displayed on the screen multiple times; The learning of words based on the word segmentation results includes: When the word segmentation results include multiple ones, learning words by association based on the word segmentation results that appear on the screen twice adjacently; the learning words by association is to use the latter word segmentation result of the word segmentation results that appear on the screen twice adjacently as an association candidate for the former word segmentation result; The method further comprises: When the user inputs the first word of the two adjacent segmentation results on the screen again in the editing box, the second word of the two adjacent segmentation results on the screen is used as the association candidate and displayed.
2. The method according to claim 1, characterized in that The step of determining whether the user input in the edit box is finished includes: When receiving the screen display instruction, determining whether the input content in the edit box before the current screen display by the user is the same as the input content in the edit box after the previous screen display; If they are not the same, it is determined that the user's last input in the edit box is finished.
3. The method according to claim 1, characterized in that The determining whether the user input is complete includes: Determining whether the user performs a preset operation, wherein the preset operation includes at least one of the following: a send operation, a search operation, and a go operation; If it is determined that the user performs a preset operation, it is determined that the user's input in the edit box is finished.
4. The method according to claim 1, characterized in that: The word segmentation processing of the input content input by the user into the edit box includes: A natural language processing method is used to perform word segmentation processing on the input content entered by the user into the edit box.
5. The method according to claim 1, characterized in that The learning of words based on the word segmentation results includes: When the word segmentation results include multiple ones, each of the word segmentation results is taken as a word learning result.
6. The method according to claim 1, characterized in that The method further comprises: Obtain the input content inputted again by the user in the edit box, and compare the input content with the first N words of the word learning result, where N is a positive integer; The first N words that match the input content are used as candidate items, and the candidate items are displayed.
7. The method according to claim 6, characterized in that The displaying of the candidate items includes: If the candidate item is a word learning result whose first N characters partially match the input content, the candidate order of the candidate items is determined according to the degree of matching; The candidate items are displayed in the candidate order.
8. A word learning device, applied to an input method, characterized in that: include: A judgment module is used to judge whether the user has finished inputting in the edit box; A word segmentation module is used to perform word segmentation processing on the input content input by the user into the edit box when the user input ends; A word learning module is used to learn words based on the word segmentation results; the word learning module is used to learn long words that are displayed on the screen multiple times and have no semantic association between the words displayed on the screen multiple times; The word learning module includes: An associative word learning submodule is used to learn words by associating words based on the word segmentation results that appear on the screen twice adjacently when the word segmentation results include multiple words; the associative word learning is to use the latter word segmentation result of the word segmentation results that appear on the screen twice adjacently as an associative candidate for the former word segmentation result; The device also includes: The second candidate determination module is used to display the next word in the two adjacent word segmentation results as an association candidate when the user inputs the previous word in the edit box again.
9. The device according to claim 8, characterized in that The judging module comprises: The first input judgment submodule is used to determine whether the input content in the edit box before the user goes on screen this time is the same as the input content in the edit box after the user went on screen last time when receiving the screen display instruction; if they are not the same, it is determined that the user's last input in the edit box is finished.
10. The device according to claim 8, characterized in that The judging module comprises: The second input judgment submodule is used to judge whether the user performs a preset operation, and the preset operation includes at least one of the following: a send operation, a search operation, and a go operation; if it is determined that the user performs the preset operation, it is determined that the user's input in the edit box is completed.
11. The device according to claim 8, characterized in that The word segmentation module is used to use a natural language processing device to perform word segmentation processing on the input content input by the user into the edit box.
12. The device according to claim 8, characterized in that The word learning module includes: The conventional word learning submodule is used to, when the word segmentation results include multiple ones, take each of the word segmentation results as a word learning result.
13. The device according to claim 8, characterized in that The device also includes: An acquisition module, used for acquiring the input content inputted again by the user in the edit box, and combining the input content with the first N words of the word learning result, where N is a positive integer; The first candidate determination module is used to take the word learning results whose first N characters match the input content as candidate items and display the candidate items.
14. The device according to claim 13, characterized in that The first candidate determination module is used to determine the candidate order of the candidate items according to the degree of matching if the candidate items are word learning results whose first N characters partially match the input content; and display the candidate items according to the candidate order.
15. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the word learning method as described in any one of method claims 1-7.
16. An electronic device, characterized in that: It includes a memory and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by one or more processors. The one or more programs contain instructions for performing the word learning method as described in any one of method claims 1-7.
Citation Information
Patent Citations
Multifunctional and multilingual input system for numeric keyboard and method thereof
CN101008864A
Participle processing method and equipment
CN101114282A
Natural participle and mixing input by statement input method
CN101493727A
Word learning method and device
CN102810095A
Trading-platform-based structural information searching method and device
CN103309886A
