Information processing method, electronic device and readable storage medium
By identifying and processing the parts to be corrected in the input content, the problem of inability to be accurately processed in the existing technology is solved, the precise jump of the cursor and the rapid correction of the content are realized, and the processing efficiency is improved.
Patent Information
- Application Number
- CN202110125648.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-29
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2041-01-29
AI Technical Summary
The existing technology cannot accurately process the parts to be corrected in the input content, such as sentence errors and grammatical errors, resulting in poor processing results.
By obtaining the input content, the part to be corrected is identified, and according to the error type and location, the user is prompted and the cursor is automatically jumped to the part to be corrected for precise processing, including highlighting, underlining prompts and cursor jumping.
It achieves precise processing of input content and improves the accuracy and efficiency of corrective operations. Users can quickly and accurately delete erroneous content.
Smart Images

Figure CN112905025B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer technology, and in particular relates to an information processing method, an electronic device and a readable storage medium. Background Art
[0002] In the prior art, when a user inputs a character string or other content in a chat tool or other scenarios, if there is a part to be corrected in the input content, such as a sentence error and / or a grammatical error, the user usually long presses the delete button to delete the input content and re-enter the content. Therefore, the existing method for processing input content with a part to be corrected is poor and cannot accurately process the corrected part. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide an information processing method, an electronic device and a readable storage medium to solve the problem that the part to be corrected of the input content cannot be accurately processed at present.
[0004] In order to solve the above-mentioned technical problems, the present invention is achieved as follows:
[0005] In a first aspect, an embodiment of the present invention provides an information processing method, which is applied to an electronic device, and the method includes:
[0006] Get input content;
[0007] When it is identified that the input content has a part to be corrected, prompting the part to be corrected;
[0008] receiving a processing instruction for the part to be corrected;
[0009] In response to the processing instruction, according to the acquired position of the part to be corrected, the position of the cursor is jumped from the current position of the cursor to the position of the part to be corrected, and the part to be corrected is processed.
[0010] Optionally, after processing the part to be corrected, the method further includes:
[0011] Determining a target position of the cursor according to the error type of the part to be corrected;
[0012] The cursor is controlled to be at the target position.
[0013] Optionally, the error type of the to-be-corrected part includes at least one of the following:
[0014] Sentence error;
[0015] Sentence redundancy;
[0016] Syntax errors;
[0017] The portion to be corrected belongs to specific content.
[0018] Optionally, determining a target position of a cursor according to an error type of the part to be corrected includes:
[0019] Analyze the target sentence to obtain an analysis result of whether the target sentence is complete and / or whether there is a part to be corrected; wherein the target sentence is a sentence after processing the part to be corrected of the input content;
[0020] The target position of the cursor is determined according to the error type of the to-be-corrected part and the analysis result.
[0021] Optionally, determining the target position of the cursor according to the error type of the to-be-corrected part and the analysis result includes:
[0022] When the error type of the to-be-corrected part is a sentence error or a sentence redundancy, and the analysis result is that the target sentence does not have a to-be-corrected part, the end position of the target sentence is determined as the target position of the cursor.
[0023] Optionally, determining the target position of the cursor according to the error type of the to-be-corrected part and the analysis result includes:
[0024] When the error type of the part to be corrected is a grammatical error or the part to be corrected belongs to specific content, and the analysis result is that the target sentence is incomplete, the position of the part to be corrected is determined as the target position of the cursor.
[0025] Optionally, the prompting of the part to be corrected includes:
[0026] Prompt the part to be corrected in at least one of the following ways:
[0027] Highlighting the portion to be corrected;
[0028] Underline the part to be corrected;
[0029] Control the cursor to jump to the position of the part to be corrected.
[0030] Optionally, the method for identifying the input content includes at least one of the following:
[0031] Word library matching method;
[0032] Syntax tree analysis method;
[0033] Based on semantic model analysis.
[0034] In a second aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction can implement the steps of the above-mentioned information processing method when executed by the processor.
[0035] In a third aspect, an embodiment of the present invention provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the above-mentioned information processing method can be implemented.
[0036] In the embodiment of the present invention, during the process of content input, the input content can be obtained, and when it is identified that there is a part to be corrected in the input content, a prompt is given for the part to be corrected, a processing instruction of the part to be corrected by the user is received, and in response to the processing instruction, the position of the cursor is jumped from its current position to the position of the part to be corrected according to the position of the part to be corrected obtained, and the part to be corrected is processed. In this way, the cursor can be accurately jumped, so that the part to be corrected of the input content can be accurately processed, such as accurately and quickly deleting the erroneous content that needs to be deleted, thereby improving the accuracy and efficiency of the processing operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 is a flow chart of an information processing method provided by an embodiment of the present invention;
[0038] Figure 2 is a schematic diagram of a text recognition area in an embodiment of the present invention;
[0039] Figure 3A , Figure 3B , Figure 3C and Figure 3D is a schematic diagram of a prompting method in an embodiment of the present invention;
[0040] Figure 4A and Figure 4B is a schematic diagram of scenario 1 of an embodiment of the present invention;
[0041] Figure 5A and Figure 5B is a schematic diagram of scenario 2 of an embodiment of the present invention;
[0042] Fig. 6A and Figure 6B is a schematic diagram of scenario 3 of an embodiment of the present invention;
[0043] Fig. 7A , Figure 7B , Figure 7C and Fig.7D is a schematic diagram of scenario 4 of an embodiment of the present invention;
[0044] Figure 8 is a flow chart of the information processing process in an embodiment of the present invention;
[0045] Fig. 9 is a structural schematic diagram of an information processing device provided by an embodiment of the present invention;
[0046] Fig.10 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The term "and / or" in the specification and claims of the present invention indicates at least one of the connected objects, and the character " / " generally indicates that the previously and subsequently associated objects are in an "or" relationship.
[0049] The information processing method provided by the embodiment of the present invention is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.
[0050] See also Figure 1 , Figure 1 is a flow chart of an information processing method provided by an embodiment of the present invention, the method is applied to electronic equipment, such as Figure 1 As shown, the method comprises the following steps:
[0051] Step 11: Get input.
[0052] In this embodiment, the above input content can be obtained in the process of inputting character strings and other content in chatting with a chat tool or in other scenarios.
[0053] In one implementation, the input content may be content to be sent that is input into the text box using an input method such as Baidu Input Method. Figure 2 As shown, during the text content input process, the text recognition area of the text box, that is, the area occupied by the content to be confirmed in the preference, can be determined in real time, and the text on the text recognition area can be recognized to obtain the input content.
[0054] Step 12: When it is identified that there is a part to be corrected in the input content, a prompt is given for the part to be corrected.
[0055] In this embodiment, the above-mentioned part to be corrected can be understood as the part of the content that needs to be corrected that meets certain conditions, and the corresponding processing method is, for example, deleting the part to be corrected. The error type of the above-mentioned part to be corrected may include at least one of the following: sentence error, sentence redundancy, grammatical error, the part to be corrected belongs to specific content, etc. The specific content is, for example, an incorrect proper noun, such as a brand name, a person's name, a place name, etc.
[0056] Optionally, in order to identify whether there is a part to be corrected in the input content, a variety of methods can be used to identify the input content, including but not limited to a word library matching method, a syntax tree analysis method, a method based on semantic model analysis, and the like.
[0057] For example, for the syntax tree analysis method, the syntactic analyzer Stanford Parser can be used to perform grammatical analysis on the input content, split each word in the input content, identify the part of speech of the split words, and determine whether the identified part of speech is correct based on the grammatical rules, so as to determine whether there is an erroneous part in the input content, that is, a part to be corrected.
[0058] As for the semantic model, it can be implemented by using technologies such as edit distance and language model. The language model includes but is not limited to n-gram language model (LM), deep neural network (DNN) LM, character-based model, word-based model, etc. For example, when using n-gram LM, the training tool kenLM can be used for training, that is, the matching relationship between multiple consecutive words is obtained through training, such as the association relationship between n words. The correlation probability between consecutive words is high. When it is found that the correlation probability is lower than a certain degree of word connection, it can be determined that the corresponding sentence has an erroneous sentence part.
[0059] Step 13: Receive processing instructions for the part to be corrected.
[0060] It is understandable that after receiving the prompt of the part to be corrected, if the user confirms that there is an error in the input content, that is, determines that the part to be corrected needs to be corrected, then the user can enter a processing instruction for the part to be corrected, such as by clicking a delete button to enter a delete instruction or using other methods such as voice input to enter a processing instruction. Accordingly, the electronic device receives the processing instruction for the part to be corrected.
[0061] Step 14: In response to the processing instruction, according to the acquired position of the part to be corrected, the position of the cursor is jumped from the current position of the cursor to the position of the part to be corrected, and the part to be corrected is processed.
[0062] It is understandable that after receiving the processing instruction, the electronic device can jump the cursor from its current position to the position of the part to be corrected according to the acquired position of the part to be corrected, and process the part to be corrected. The position of the part to be corrected can be used as the cursor jump target position, which can be obtained when the input content is recognized. If there are still erroneous parts in the processed sentence, the user can be prompted to continue to enter the processing instruction to continue processing the processed sentence.
[0063] It should be noted that the position of the part to be corrected is preferably adjacent to the content to be processed (eg deleted) in the part to be corrected, without any other characters in between, so as to enable direct and efficient deletion processing.
[0064] For example, if the error type of the part to be corrected is a sentence error and the part to be corrected is "xyz", the position of the part to be corrected is the end of "xyz", the cursor is jumped from its current position to the end of "xyz", that is, the end of "z" in "xyz", and "xyz" is directly deleted; or, if the error type of the part to be corrected is sentence redundancy and the part to be corrected is "yy", the position of the part to be corrected is the end of "yy", the cursor is jumped from its current position to the end of "yy", and the redundant part "y" is deleted; or, if the error type of the part to be corrected is a grammatical error and the part to be corrected is "xAByz", "xAByz" has a grammatical error due to the existence of "AB", the position of the part to be corrected is the end of "AB", the cursor is jumped from its current position to the end of "AB", and the part "AB" that causes the grammatical error is deleted together, and so on.
[0065] The information processing method of the embodiment of the present invention can obtain input content during the content input process, and when it is identified that there is a part to be corrected in the input content, prompt the part to be corrected, receive a processing instruction for the part to be corrected, and respond to the processing instruction, jump the cursor position from its current position to the position of the part to be corrected according to the acquired position of the part to be corrected, and process the part to be corrected. In this way, the cursor can be accurately jumped, so as to accurately process the part to be corrected of the input content, such as accurately and quickly deleting the erroneous content that needs to be deleted, thereby improving the accuracy and efficiency of the processing operation.
[0066] In the embodiment of the present invention, in order to facilitate the user to know that there is a part to be corrected in the input content, the electronic device can prompt the part to be corrected in at least one of the following ways:
[0067] Highlight the part to be corrected;
[0068] Underlining the part to be corrected; for example, the underline may be a straight line with a preset color such as red, a wavy line below, etc.;
[0069] Control the cursor to jump to the position of the part to be corrected.
[0070] In this way, by means of the above prompting method, the user can be conveniently informed in a timely manner that there are parts to be corrected in the input content.
[0071] For example, if the input content is XXyyyyy, where "yyyyy" is the part to be corrected, then Figure 3A As shown in the figure, you can highlight "yyyyy" to indicate; or Figure 3B As shown in the figure, you can add an underline straight line to "yyyyy" to indicate the result; or Figure 3C As shown, you can add a wavy line below to indicate "yyyyy"; or Figure 3D As shown in the figure, you can control the cursor to jump to the position of "yyyyy" for prompting.
[0072] In the embodiment of the present invention, after processing the part to be corrected, the electronic device can also determine the target position of the cursor according to the error type of the part to be corrected, and control the cursor to be at the target position, so as to facilitate the user to continue to input content without affecting the subsequent input. The target position can be the position of the part to be corrected, or the end position of the corrected input content.
[0073] Furthermore, the process of determining the target position of the cursor may also include: first, the electronic device analyzes the target sentence to obtain an analysis result of whether the target sentence is complete and / or whether there is a part to be corrected; wherein the target sentence is a sentence after processing the part to be corrected of the input content; then, the electronic device determines the target position of the cursor according to the error type of the part to be corrected and the analysis result. In this way, the target position of the cursor is determined by comprehensively considering the error type of the part to be corrected and the analysis result of the target sentence, which can improve the accuracy of the determined target position.
[0074] Optionally, depending on the error type of the part to be corrected, the process of determining the target position of the cursor according to the error type of the part to be corrected and the analysis result may include:
[0075] When the error type of the to-be-corrected part is a sentence error or a sentence redundancy, and the analysis result is that the target sentence does not have a to-be-corrected part, the end position of the target sentence is determined as the target position of the cursor;
[0076] Alternatively, when the error type of the part to be corrected is a syntax error or the part to be corrected belongs to specific content, and the analysis result indicates that the target statement is incomplete, the position of the part to be corrected is determined as the target position of the cursor.
[0077] The following Figure 8 and specific application scenarios are used to elaborate on this application in detail.
[0078] Scenario 1:
[0079] In this Scenario 1, the error type of the part to be corrected is a statement error. For example, the content input by the user using the input method, such as a string of characters, includes an incorrect statement, such as a part with incorrect spelling and / or a part that cannot form a normal word.
[0080] As Figure 4A shown, the input content obtained by the electronic device is "Hello Jiayi, hi what". Obviously, the part after "Hello" in this input statement is the part that cannot form a normal statement due to input errors, that is, the part to be corrected. At this time, because the content after "Hello" is incorrect, it is hoped to quickly delete the incorrect part. When using this solution to delete the incorrect part (i.e., the part to be corrected), the incorrect part can be prompted by positioning the incorrect part, and after receiving the user's deletion instruction, the cursor automatically jumps to the position of the character after the incorrect part, that is, the end position of "Jiayi, hi what", to achieve one-key deletion of the incorrect part "Jiayi, hi what" and retain the correct part. Then, according to the error type of the incorrect part and the analysis of the statement after deletion, the position of the cursor is determined as the end position of the statement after deletion to facilitate the user to continue entering content.
[0081] Specifically, for Figure 4A the input content shown, the input content can be matched through a general Chinese word library, and the string parts that cannot form words due to input errors are identified. Since it is recognized that the part after "Hello" is not a conventional word combination, it is recognized that there is a part to be corrected in this input content.
[0082] The methods for prompting the identified part to be corrected include, but are not limited to, highlighting, underlining, cursor prompting, etc.
[0083] After receiving the prompt, if the user confirms that there is an incorrect statement in the input content, they can enter a deletion instruction by clicking the delete button. After receiving the deletion instruction, the device system can jump the cursor from its current position to the end position of "Jiayi ahi sha" according to the position of the part to be corrected, directly delete "Jiayi ahi sha", and retain "Hello". After completing the deletion operation, the electronic device can analyze the remaining statement part, obtain that there is no incorrect part in the current statement, and combine the error type of the part to be corrected to determine that the position of the cursor is behind "Hello", that is, the end position of the remaining statement, as Figure 4B shown, to facilitate the user to continue entering content. In addition, after completing the deletion operation, if there is still an incorrect part in the corresponding statement, the user can be prompted to continue entering the deletion instruction to continue the deletion operation.
[0084] Scenario 2:
[0085] In this Scenario 2, the error type of the part to be corrected is a grammar error. For example, the content input by the user using the input method, such as a string of characters, includes content with grammar errors, such as a certain word not conforming to the grammar or semantic norms, resulting in the input content being unsmooth.
[0086] As Figure 5B shown, the input content obtained by the electronic device is "Today is really too happy paradise. How about you". Obviously, "too happy paradise" in this input statement is a sick sentence. After "too", there should be an adjective "happy", but "happy paradise" is a noun. At this time, it can be found that the correct statement should be "too happy", and "paradise" should be deleted and directly modified at the position of "paradise" to complete the correction of the input statement. When using this solution for correction, the incorrect content part, that is, the part to be corrected, can be located, a prompt can be given to the part to be corrected, and after receiving the user's deletion instruction, the cursor can be jumped to the part causing the grammar error, that is, the end position of "paradise", and "paradise" can be directly deleted, retaining the correct part. Then, according to the error type of the part to be corrected and the analysis of the statement after deletion, the position of the cursor is determined to be its current position to facilitate the user to continue to supplement the content.
[0087] Specifically, for Figure 5AFor the input content shown, the semantic analysis module can be used to match the grammar rules through syntactic tree analysis, or to measure the correlation relationship before and after word combinations through Chinese word segmentation methods and semantic models for syntactic splitting, so as to identify the word collocations that do not conform to the grammar rules in the input content. For example, when using the syntactic tree analysis method, since "too" is an adverb of degree, it should be followed by an adjective. However, "happy paradise" is a noun, which does not conform to the grammar rules, while "happy" is an adjective, which conforms to the grammar rules. Therefore, the incorrect part is "paradise". Another example is when using the semantic model. Since the correlation probability between "too" and "happy paradise" is too low, but the correlation probability between "too" and "happy" is very high, it can be found that the incorrect part is "paradise".
[0088] For the ways of prompting the identified parts to be corrected, including but not limited to highlighting, underlining, cursor prompting, etc.
[0089] After the user receives the prompt, if it is confirmed that there are grammar error parts in the input content, the user can input a deletion instruction by clicking the delete button. After the device system receives the deletion instruction, it can jump the cursor from its current position to the end position of the part causing the grammar error, that is, "paradise", according to the position of the part to be corrected, and directly delete "paradise", retaining the correct part. After completing the deletion operation, the electronic device analyzes the remaining statement part, obtains that the current statement is incomplete, and combines the error type of the part to be corrected to determine and adjust the position of the cursor to the position of the deleted part, that is, "paradise", as Figure 5B shown, to facilitate the user to continue to supplement the content. In addition, after completing the deletion operation, if there are still error parts in the corresponding statement, the user can be prompted to continue to input the deletion instruction to continue the deletion operation.
[0090] Scenario 3:
[0091] In this Scenario 3, the error type of the part to be corrected is statement redundancy. For example, the content input by the user using the input method includes redundant parts that need to be deleted.
[0092] As Fig. 6A shown, the input content obtained by the electronic device is "I am a big star". Obviously, "am am" in this input statement is redundant and one of them needs to be deleted, that is, the redundant content needs to be deleted. When using this solution to delete the redundant content, the redundant character can be directly located, and after receiving the user's deletion instruction, the cursor can be directly jumped to the end position of the redundant character "am", and the redundant part "am" can be directly deleted with one key. Then, according to the error type of the error part and the analysis of the statement after deletion, the position of the cursor is determined to be the end position of the statement after deletion to facilitate the user to continue to input content.
[0093] Specifically, for Fig. 6A For the input content shown, the grammar rules can be matched through syntactic tree analysis, or the matching degree of word connection can be measured by using Chinese word segmentation methods and semantic models to identify that the redundant part of "是是" appears, and the redundant part is the single character "是".
[0094] For the ways to prompt the identified redundant part, including but not limited to highlighting, underlining, cursor prompting, etc.
[0095] After the user receives the prompt, if it is confirmed that there is a redundant part in the input content, the deletion instruction can be input by clicking the delete button. After the device system receives the deletion instruction, according to the error type of the part to be corrected, that is, statement redundancy, the cursor can be directly jumped to the end position of the redundant character "是", and the redundant part "是" can be directly deleted, that is, one "是" character is deleted, and the correct part is retained. After the deletion operation is completed, the electronic device analyzes the remaining statement part, obtains that there is no error part in the current statement, and combines the error type of the part to be corrected to determine the position of the cursor as the end position of the remaining statement, as Figure 6B shown, to facilitate the user to continue with content input.
[0096] Scenario 4:
[0097] In this Scenario 4, the error type of the part to be corrected is that the part to be corrected belongs to specific content. For example, when the user inputs content using the input method, some incorrect specific content is input, such as brand names, personal names, place names, fixed idioms, etc., and when modifying, the user hopes to delete the whole rather than delete character by character. These personal names are such as the names of celebrities, personal names in the address book, etc.
[0098] As Fig. 7A shown, the input content obtained by the electronic device is "XX has been since ancient times RRRR DDDD". Among them, "XX" is a place name, and "RRRR" and "DDDD" belong to idioms. The parts to be corrected "XX", "RRRR" and "DDDD" need to be deleted as a whole. When adopting this solution, these specific proper nouns can be recognized, and when performing the deletion operation, the deletion part can be directly located, and the whole word can be deleted with one click through the deletion operation. Then, according to the error type of the part to be corrected and the analysis of the sentence after deletion, the position of the cursor is determined at the deleted character to facilitate the user to continue with content input.
[0099] Specifically, for Fig. 7A the input content shown, it can be recognized by using the dictionary libraries of common star names, place names, brand names, idioms, etc. and the rules of the user's address book, common input content, etc. to identify that there is specific content in the input content.
[0100] The method of providing prompts for the identified specific content includes, but is not limited to, highlighting, underlining, cursor prompts, etc.
[0101] After receiving the prompt, if the user confirms that there is an error in the input content, he can enter a deletion command by clicking the delete button. After receiving the deletion command, the electronic device can delete the specific phrase word by word according to the error type and the specific content in the input content that has errors. Among them, according to the number of errors in the specific content, the user can enter multiple deletion commands. For example, for Fig. 7A As shown in the input content, the number of specific contents is 3, and the user can enter the deletion command 3 times. When entering the deletion command for the first time, the cursor jumps to the end of "DDDD" and directly deletes the specific content "DDDD" on the far right. Figure 7B When you enter the delete command for the second time, move the cursor to the end of "RRRR" and directly delete the specific content "RRRR" on the far right. Figure 7C When you enter the delete command for the third time, the cursor jumps to the end of "XX" and directly deletes the specific content "XX". Fig.7D That is, when the delete key is input multiple times, the specific phrase is deleted word by word from right to left. After the deletion operation is completed, the electronic device analyzes the remaining sentence part, obtains that the current sentence is incomplete, and combines the error type to determine and adjust the cursor position to the position of the deleted part, that is, the position in front of "since ancient times", such as Fig.7D As shown, the user can continue to input the correct text to supplement. In addition, after completing the deletion operation, if the corresponding sentence still has an erroneous part, the user can be prompted to continue to input the deletion instruction to continue the deletion operation.
[0102] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of an information processing device provided by an embodiment of the present invention, and the device is applied to electronic equipment, such as Fig. 9 As shown, the information processing device 90 includes:
[0103] An acquisition module 91 is used to acquire input content;
[0104] A prompting module 92, configured to prompt the part to be corrected when it is identified that the input content has a part to be corrected;
[0105] A receiving module 93, used for receiving a processing instruction for the part to be corrected;
[0106] The processing module 94 is used to respond to the processing instruction, jump the cursor position from the current position of the cursor to the position of the part to be corrected according to the acquired position of the part to be corrected, and process the part to be corrected.
[0107] Optionally, the error type of the to-be-corrected part includes at least one of the following:
[0108] Sentence error;
[0109] Sentence redundancy;
[0110] Syntax errors;
[0111] The portion to be corrected belongs to specific content.
[0112] Optionally, the information processing device 90 further includes:
[0113] A determination module, used for determining a target position of a cursor according to the error type of the part to be corrected;
[0114] A control module is used to control the cursor to be at the target position.
[0115] Optionally, the determining module includes:
[0116] An analysis unit, configured to analyze the target sentence to obtain an analysis result of whether the target sentence is complete and / or whether there is a part to be corrected; wherein the target sentence is a sentence after processing the part to be corrected of the input content;
[0117] A determination unit is used to determine a target position of the cursor according to the error type of the part to be corrected and the analysis result.
[0118] Optionally, the determining unit is specifically configured to:
[0119] When the error type of the to-be-corrected part is a sentence error or a sentence redundancy, and the analysis result is that the target sentence does not have a to-be-corrected part, determining the end position of the target sentence as the target position of the cursor;
[0120] Alternatively, when the error type of the part to be corrected is a grammatical error or the part to be corrected belongs to specific content, and the analysis result is that the target sentence is incomplete, the position of the part to be corrected is determined as the target position of the cursor.
[0121] Optionally, the prompt module 92 is specifically configured to: prompt the part to be corrected in at least one of the following ways:
[0122] Highlighting the portion to be corrected;
[0123] Underline the part to be corrected;
[0124] Control the cursor to jump to the position of the part to be corrected.
[0125] Optionally, the method for identifying the input content includes at least one of the following:
[0126] Word library matching method;
[0127] Syntax tree analysis method;
[0128] Based on semantic model analysis.
[0129] It is understandable that the information processing device 90 of the embodiment of the present invention can implement the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.
[0130] It should be noted that the division of units in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0131] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a processor-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0132] In addition, an embodiment of the present invention further provides an electronic device 100, including a processor 101, a memory 102, and a program or instruction stored in the memory 102 and executable on the processor 101. When the program or instruction is executed by the processor 101, each process of the above-mentioned information processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0133] The embodiment of the present invention further provides a readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, the above Figure 1 The various processes of the method embodiment shown can achieve the same technical effect, and to avoid repetition, they will not be described again here.
[0134] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or 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 device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0136] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0137] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a service classification device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0138] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An information processing method, applied to an electronic device, characterized in that: include: Get input content; When it is identified that the input content has a part to be corrected, prompting the part to be corrected; receiving a processing instruction for the part to be corrected; In response to the processing instruction, according to the acquired position of the part to be corrected, the position of the cursor is jumped from the current position of the cursor to the position of the part to be corrected, and the part to be corrected is processed; Wherein, after processing the part to be corrected, the method further comprises: Determining a target position of the cursor according to an error type of the to-be-corrected portion of the input content; Controlling the cursor to be at the target position; Wherein, determining the target position of the cursor according to the error type of the to-be-corrected portion of the input content includes: Analyze the target sentence to obtain an analysis result of whether the target sentence is complete and / or whether there is a part to be corrected; wherein the target sentence is a sentence after processing the part to be corrected of the input content; When the error type of the to-be-corrected part of the input content is a word error or a redundant sentence, and the analysis result is that the target sentence does not have a to-be-corrected part, the end position of the target sentence is determined as the target position of the cursor; or, when the error type of the to-be-corrected part of the input content is a grammatical error or the to-be-corrected part belongs to a special word, and the analysis result is that the target sentence is incomplete, the position of the to-be-corrected part of the input content is determined as the target position of the cursor.
2. The method according to claim 1, characterized in that The prompting of the part to be corrected includes: Prompt the part to be corrected in at least one of the following ways: Highlighting the portion to be corrected; Underline the part to be corrected; Control the cursor to jump to the position of the part to be corrected.
3. The method according to claim 1, characterized in that The method of identifying the input content includes at least one of the following: Word library matching method; Syntax tree analysis method; Based on semantic model analysis.
4. An electronic device, comprising: A memory, a processor, and a program or instruction stored in the memory and executable on the processor; characterized in that: The processor is used to read the program or instructions in the memory to implement the steps in the information processing method according to any one of claims 1 to 3.
5. A readable storage medium for storing a program or an instruction, characterized in that: When the program or instruction is executed by a processor, the steps in the information processing method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Method and device for determining modification point in input conversion process
CN102023782A
Terminal device and input method character error correction method
CN103777774A
Character detection method and electronic equipment
CN111061383A
Methods for facilitating text entry
US20140047394A1
