Text error correction method, device, equipment and computer-readable storage medium
By using a dictionary that meets word frequency requirements to correct the multi-domain speech recognition text in the intelligent voice control system, the problem of low error correction accuracy of multi-domain text is solved, and higher error correction accuracy and targetedness are achieved.
Patent Information
- Application Number
- CN202111555001.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-12-17
AI Technical Summary
The prior art reduces the accuracy of multi-domain text error correction when correcting text errors in multi-domain speech recognition, thereby affecting the accuracy of intelligent voice control systems.
By obtaining the first text to be corrected and the dictionary of at least one corresponding field, the word frequency of the words in the dictionary meets the requirements, the first text is split and matched, the matching relationship between the words is obtained, and the error correction text is determined.
Improve the accuracy of text error correction results, especially when correcting text errors for multiple fields, and enhance targetedness and accuracy.
Smart Images

Figure CN114298014B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a text error correction method, apparatus, device, and computer-readable storage medium. Background Art
[0002] With the continuous development of smart homes, the development of smart voice control systems with better performance has become the key. To ensure the performance of smart voice control systems, it is necessary to correct the text obtained by voice recognition to ensure the accuracy of the text.
[0003] In the related art, the text error correction method can realize error correction of text obtained by speech recognition in a single field, and can ensure the accuracy of text error correction in a single field.
[0004] However, the same intelligent control system may need to recognize speech belonging to multiple fields, and thus also need to correct texts in multiple fields. When recognizing speech in multiple fields, the text correction method provided by the related art reduces the accuracy of multi-field text correction, thereby reducing the accuracy of the intelligent voice control system. Summary of the invention
[0005] The embodiments of the present application provide a text error correction method, device, equipment and computer-readable storage medium, which can be used to solve the problems in the related art. The technical solution is as follows:
[0006] On the one hand, an embodiment of the present application provides a method for text error correction, the method comprising:
[0007] Obtaining a first text to be corrected and at least one dictionary of a corresponding field, wherein the frequency of words in the dictionary meets the requirement;
[0008] Splitting the first text to obtain at least one character, matching the at least one character using the dictionary to obtain matching characters of each character in the at least one character that is successfully matched;
[0009] Obtaining a first matching relationship and a second matching relationship, wherein the first matching relationship is a matching relationship between the characters, and the second matching relationship is a matching relationship between a matching character of the first character and a second character, wherein the first character is any character in the at least one character, and the second character is a character in the at least one character except the first character and a matching character of a character except the first character;
[0010] An error correction text of the first text is determined according to the first matching relationship and the second matching relationship.
[0011] In a possible implementation, determining the error correction text of the first text according to the first matching relationship and the second matching relationship includes:
[0012] Acquire at least one candidate text according to the first matching relationship and the second matching relationship;
[0013] Determining the matching degree between each candidate text and the first text;
[0014] According to the matching degree between each candidate text and the first text, a correction text of the first text is determined from the at least one candidate text.
[0015] In a possible implementation, obtaining the first matching relationship and the second matching relationship includes:
[0016] Obtain a one-way graph according to the at least one character and the matching characters of the respective characters, wherein the one-way graph is used to indicate the first matching relationship and the second matching relationship;
[0017] The obtaining of at least one candidate text according to the first matching relationship and the second matching relationship includes: performing a path search on the unidirectional graph to obtain at least one candidate path, wherein different candidate paths correspond to different candidate texts.
[0018] In a possible implementation, determining the matching degree between each candidate text and the first text includes:
[0019] Scoring each candidate text based on the scoring index to obtain a scoring result for each candidate text, wherein the scoring result of any candidate text is used to indicate a matching degree between any candidate text and the first text;
[0020] Among them, the scoring indicators include at least one of the rationality of any of the alternative texts, the phonetic similarity between any of the alternative texts and the first text, the number of characters that hit the dictionary in any of the alternative texts, and the length of words composed of characters that hit the dictionary in any of the alternative texts. The rationality of any of the alternative texts is used to indicate the fluency of the sentences of any of the alternative texts.
[0021] In a possible implementation, determining the error correction text of the first text from the at least one candidate text according to the matching degree between the candidate texts and the first text includes:
[0022] According to the matching degree between each candidate text and the first text, at least one optional text whose matching degree reaches a threshold is selected from the at least one candidate text;
[0023] The intention of each optional text is determined, and based on the intention of each optional text, an error correction text of the first text is determined from the at least one optional text.
[0024] In a possible implementation, after determining the error correction text of the first text from the at least one optional text based on the intentions of the various optional texts, the method further includes:
[0025] Determine an error correction behavior corresponding to at least one intention of the error correction text, where any intention corresponds to zero or more error correction behaviors;
[0026] Performing negative feedback weighting on any of the intentions through the error correction behavior corresponding to any of the intentions, to obtain a weighted result of at least one intention of the error correction text;
[0027] In response to a weighted result of any of the intentions being higher than a weighted threshold, an operation corresponding to any of the intentions is executed.
[0028] In a possible implementation, the at least one dictionary corresponding to the field is obtained based on a TF-IDF (Term Frequency–Inverse Document Frequency) algorithm and manual annotation.
[0029] On the other hand, a text error correction device is provided, the device comprising:
[0030] A first acquisition module, used to acquire a first text to be corrected and at least one dictionary of a corresponding field, wherein the frequency of words in the dictionary meets the requirement;
[0031] a matching module, configured to split the first text into at least one character, match the at least one character using the dictionary, and obtain matching characters of each character in the at least one character that is successfully matched;
[0032] A second acquisition module is used to acquire a first matching relationship and a second matching relationship, wherein the first matching relationship is a matching relationship between the characters, and the second matching relationship is a matching relationship between a matching character of the first character and a second character, wherein the first character is any character in the at least one character, and the second character is a character in the at least one character except the first character and a matching character of a character except the first character;
[0033] A determination module is used to determine an error correction text of the first text according to the first matching relationship and the second matching relationship.
[0034] In a possible implementation, a determination module is used to obtain at least one alternative text based on the first matching relationship and the second matching relationship; determine the matching degree between each alternative text and the first text; and determine the correction text of the first text from the at least one alternative text based on the matching degree between each alternative text and the first text.
[0035] In a possible implementation, the second acquisition module is used to obtain a one-way graph according to the at least one word and the matching words of each word, wherein the one-way graph is used to indicate the first matching relationship and the second matching relationship;
[0036] The determination module is used to perform path search on the unidirectional graph to obtain at least one candidate path, and different candidate paths correspond to different candidate texts.
[0037] In one possible implementation, a determination module is used to score the various alternative texts based on a scoring index to obtain a scoring result for each of the alternative texts, and the scoring result of any alternative text is used to indicate the degree of matching between any alternative text and the first text; wherein the scoring index includes at least one of the rationality of any alternative text, the phonetic similarity between any alternative text and the first text, the number of characters in any alternative text that hit the dictionary, and the length of words composed of characters in any alternative text that hit the dictionary, and the rationality of any alternative text is used to indicate the fluency of a sentence of any alternative text.
[0038] In one possible implementation, a determination module is used to filter out at least one optional text whose matching degree reaches a threshold from the at least one alternative text based on the matching degree between the various alternative texts and the first text; determine the intention of each optional text, and determine the correction text of the first text from the at least one optional text based on the intention of each optional text.
[0039] In one possible implementation, the determination module is also used to determine the correction behavior corresponding to at least one intention of the correction text, and any intention corresponds to zero or more correction behaviors; negative feedback weighting is performed on any intention through the correction behavior corresponding to any intention to obtain a weighted result of at least one intention of the correction text; in response to the weighted result of any intention being higher than a weighted threshold, executing the operation corresponding to any intention.
[0040] In a possible implementation manner, the at least one dictionary corresponding to the field is obtained based on a TF-IDF algorithm and manual annotation.
[0041] On the other hand, a computer device is provided, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor so that the computer device implements any of the above-mentioned text error correction methods.
[0042] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor so that the computer implements any of the above-mentioned text error correction methods.
[0043] On the other hand, a computer program product or a computer program is also provided, the computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the above-mentioned text error correction methods.
[0044] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0045] In the embodiment of the present application, matching characters are obtained by matching characters in a first text to be corrected through at least one dictionary in a corresponding field, and the frequency of the characters in the dictionary meets the requirements, thereby improving the specificity of the matching relationship between any character in the first text and the matching character of the character for the corresponding field. Then, the correction text is determined based on the matching relationship, which not only strengthens the text correction in the corresponding field, but also improves the accuracy of the text correction results. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0047] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application;
[0048] Figure 2 It is a flow chart of a text error correction method provided by an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of a one-way diagram provided in an embodiment of the present application;
[0050] Figure 4 is a flow chart of another text error correction method provided by an embodiment of the present application;
[0051] Figure 5 It is a schematic diagram of a text error correction device provided in an embodiment of the present application;
[0052] Figure 6 is a structural schematic diagram of a computer device provided in an embodiment of the present application;
[0053] Figure 7 It is a structural diagram of another computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0054] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0055] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0056] This application embodiment provides a method for text error correction, please refer to Figure 1 , which shows a schematic diagram of an implementation environment of the method provided in an embodiment of the present application. The implementation environment may include: a terminal 11 and a server 12.
[0057] Among them, the terminal 11 can obtain the first text to be corrected, and after obtaining the first text to be corrected, the text correction method provided in the embodiment of the present application can be applied to obtain the correction text, and the correction text is sent to the server 12. The server 12 can receive the correction text and perform subsequent operations based on the correction text, for example, it can execute the corresponding operation in the correction text.
[0058] Alternatively, terminal 11 can obtain the first text to be corrected, and after obtaining the first text to be corrected, the text correction method provided in the embodiment of the present application can be applied to obtain the correction text, and subsequent operations can be performed based on the correction text, for example, corresponding operations in the correction text can be executed.
[0059] Alternatively, the server 12 can obtain the first text to be corrected, and after obtaining the first text to be corrected, it can apply the text correction method provided in the embodiment of the present application to obtain the correction text, and perform subsequent operations based on the correction text, for example, it can execute corresponding operations in the correction text.
[0060] Alternatively, the server 12 may obtain the first text to be corrected, and after obtaining the first text to be corrected, the text correction method provided in the embodiment of the present application may be applied to obtain the correction text, and the correction text may be sent to the terminal 11. The terminal 11 may receive the correction text, and perform subsequent operations based on the correction text, for example, the corresponding operation in the correction text may be executed.
[0061] Optionally, the terminal 11 can be any electronic product that can interact with the user through one or more methods such as keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device, such as PC (Personal Computer), mobile phone, smart phone, PDA (Personal Digital Assistant), wearable device, PPC (Pocket PC), tablet computer, smart car machine, smart TV, smart speaker, etc. The server 12 can be a server, a server cluster composed of multiple servers, or a cloud computing service center. The terminal 11 establishes a communication connection with the server 12 through a wired or wireless network.
[0062] Those skilled in the art should understand that the above-mentioned terminal 11 and server 12 are only examples, and other existing or future terminals or servers that are applicable to the present application should also be included in the protection scope of the present application and are included here by reference.
[0063] Based on the above Figure 1 In the implementation environment shown, the present application embodiment provides a method for text error correction, taking the method applied to a terminal as an example. Figure 2 As shown, the method provided in the embodiment of the present application may include the following steps.
[0064] In step 201, a first text to be corrected and at least one dictionary of a corresponding field are obtained, and the frequency of words in the dictionary meets the requirements.
[0065] The embodiment of the present application does not limit the method for obtaining the first text to be corrected, and the method for obtaining can be determined based on the implementation scenario. In addition, the content of the first text is not limited.
[0066] For example, in a voice control scenario, the first text may be a text obtained by any terminal with a voice recognition function recognizing the voice of an interactive object of the terminal. The content of the first text may be a command issued by an interactive object of any terminal with a voice recognition function to the terminal. Since voice recognition may have recognition errors, or the interactive object may have problems such as slips of the tongue, it is necessary to correct the first text.
[0067] For another example, in a web page search scenario, the first text may be text input by an interactive object of a terminal through a text input method or the like. The content of the first text may be content that needs to be searched by an interactive object of any terminal that can perform web page search. Since the first text may have input errors and other problems, the first text may be corrected by the method provided in the embodiment of the present application.
[0068] Exemplarily, at least one dictionary of the corresponding field is obtained based on the TF-IDF algorithm and manual annotation. The embodiment of the present application does not limit the number of corresponding fields, and the field can be determined based on the implementation environment. In a possible implementation, the dictionary can be applied to a voice control scenario. In this scenario, the corresponding field can be at least one of the fields of lighting control and door control.
[0069] The embodiments of the present application do not limit the dictionary of at least one corresponding field, including but not limited to the following three situations.
[0070] Case 1: The dictionary used in the embodiment of the present application is a dictionary of a corresponding field, and the frequency of words in the dictionary meets the requirements.
[0071] In this case 1, although a dictionary of a corresponding field is used, the frequency of words in the dictionary of the corresponding field meets the requirements, so compared with a dictionary whose frequency does not meet the requirements, the accuracy of text correction can be improved when a dictionary whose frequency meets the requirements is used for text correction. The embodiment of the present application does not limit the method for obtaining a dictionary of a corresponding field whose frequency meets the requirements, including but not limited to obtaining words whose frequency meets the requirements in the corresponding field based on the TF-IDF algorithm and manual annotation, and obtaining a dictionary in the field based on words whose frequency meets the requirements in the field.
[0072] Exemplarily, it can be set that the number of times a word in a corpus within a threshold range appears in a corpus within a threshold range reaches a number threshold, or the frequency of a word in a corpus within a threshold range appears in a corpus within a threshold range reaches a frequency threshold, then the word frequency of the word meets the requirement, and the word can be used as a word in the dictionary. Among them, the corpus within the threshold range can be a section of corpus corresponding to the instruction issued by the interactive object to the terminal, or a section of corpus selected from the historical corpus. The threshold range refers to the length of the corpus, which can be determined by the number of words contained in the corpus. The embodiment of the present application does not limit the threshold range, nor does it limit the above-mentioned number threshold and frequency threshold, which can be determined based on experience or application scenarios. For example, the corpus within the above-mentioned threshold range is a corpus belonging to the field of lighting control and containing 100 words. For example, in the corpus containing 100 words, the number of occurrences is obtained as 3 times, or the words with a frequency higher than 3% are used as words in the dictionary.
[0073] Case 2: The dictionary used in the embodiment of the present application is a dictionary of multiple corresponding fields, and there is no restriction on whether the frequency of words in the dictionary meets the requirements.
[0074] In the second case, although there is no restriction on whether the frequency of words in the dictionary meets the requirement, since multiple dictionaries in corresponding fields are used, compared with using one dictionary, using multiple dictionaries in corresponding fields to correct text can have correction performance in multiple fields, and can also improve the accuracy of text correction.
[0075] The embodiment of the present application does not limit the number of multiple corresponding fields and the specific fields, which can be determined based on the application scenario. Take the dictionaries of two corresponding fields as an example, namely the dictionary of the lighting control field and the dictionary of the door control field. The embodiment of the present application does not limit the method of obtaining the dictionary of each field. For example, a certain number of words can be selected from the historical forecasts of each field as the words in the dictionary.
[0076] Case three: the dictionary used in the embodiment of the present application is a dictionary of multiple corresponding fields, and among the dictionaries of the multiple corresponding fields, the word frequency of the words in each dictionary meets the requirements.
[0077] In the third case, not only are multiple dictionaries of corresponding fields used, but the word frequencies of the words in the dictionaries also meet the requirements. Therefore, compared with using one dictionary, not only does it have error correction capabilities for multiple fields, but the error correction performance in each field can be guaranteed, thereby further improving the accuracy of text correction.
[0078] For the method of obtaining dictionaries in each corresponding field, you can refer to the method of obtaining dictionaries in situation one, and will not go into details here.
[0079] In step 202, the first text is split to obtain at least one character, and the at least one character is matched through a dictionary to obtain matching characters of each successfully matched character in the at least one character.
[0080] Exemplarily, the first text can be segmented by the Jieba word segmentation tool. For example, if the first text is "turn on the light in the room", the first text can be split into six words: "open", "room", "inside", "of", and "light".
[0081] The embodiments of the present application do not limit the method of matching at least one character through a dictionary. In an exemplary embodiment, when any word formed by any one of the at least one character can match a word in the dictionary, the character corresponding to the matched word in the dictionary is the matching character of the any one of the characters. For example, when the words in the dictionary are one to four characters, during the matching, each character in the first text and the one to three characters connected to and following the character are respectively combined to form words for matching. For example, the first text is "Turn on the sound frame linkage mode". After splitting the first text, we get "da", "kai", "sheng", "kuang", "lian", "dong", "mo", "shi". We can first match the character "da". For the character "da" and the one character "kai" connected to it, they can form "dakai" (open). "Dakai" can match "dakai" in the dictionary. Therefore, through "dakai", we can get the character "da" that can match the character "da". After that, for the character "da" and the two characters "kaisheng" connected to it, they can form "da kaisheng" (open sound). "Da kaisheng" does not match any word in the dictionary. Therefore, through "da kaisheng", we do not get a character that can match the character "da". Finally, for the character "da" and the three characters "kaishengkuang" connected to it, they can form "da kaishengkuang" (open sound frame). "Da kaishengkuang" still does not match any word in the dictionary. Therefore, through "da kaishengkuang", we do not get a character that can match the character "da". In summary, the character "da" can be matched with the character "da". For the other characters in the first text, the matching characters can be obtained through the same matching method as that for the character "da".
[0082] In step 203, obtain a first matching relationship and a second matching relationship. The first matching relationship is the matching relationship between each character, and the second matching relationship is the matching relationship between the matching character of the first character and the second character. The first character is any one of the at least one character, and the second character is any character other than the first character among the at least one character and the matching characters of the characters other than the first character.
[0083] The embodiments of the present application do not limit the manner of obtaining the first matching relationship and the second matching relationship. For example, the first matching relationship and the second matching relationship can be obtained by connecting the characters having the first matching relationship or the second matching relationship. In some embodiments, the first text is a single character. At this time, the number of the second characters is zero. Therefore, the obtained second matching relationship is also zero.
[0084] In an exemplary embodiment, the first matching relationship and the second matching relationship can be obtained through a directed graph. In this case, obtaining the first matching relationship and the second matching relationship includes: obtaining a directed graph according to at least one character and the matching characters of each character. The directed graph is used to indicate the first matching relationship and the second matching relationship.
[0085] The embodiments of the present application do not limit the unidirectional graph. In a possible implementation, for any word in the unidirectional graph that hits the dictionary, the characters in the word can be connected by edges. Exemplarily, the first text is "Turn on the sound frame linkage mode". After splitting the first text, we get "打", "开", "声", "框", "联", "动", "模", "式". For example, the character "打" can be matched with the character "大", and the character "框" can be matched with the character "光". Then, the schematic diagram of the unidirectional graph can be as Figure 3 shown.
[0086] Exemplarily, Figure 3 in Figure 3 , since "打开" hits the dictionary, there is an edge between the character "打" and the character "开", and this edge indicates the first matching relationship between the character "打" and the character "开". "大开" hits the dictionary, so there is also an edge between the character "大" and the character "开", and this edge indicates the second matching relationship between the character "大" and the character "开". Based on the method, "开声" does not hit the dictionary, so the character "开" forms an edge by itself, and the character "声" forms an edge by itself, and there is no connection between the character "开" and the character "声" by an edge. The matching character "光" of the character "声" and the character "框" can form "声光" and hit the dictionary, so there is an edge between the character "声" and the character "光", while "声框" does not hit the dictionary, so there is no connection between the character "声" and the character "框" by an edge. "框联" does not hit the dictionary, so there is no connection between the character "框" and the character "联" by an edge. Since "声光联动" also hits the dictionary, for the characters from "声" to "动" in "声光联动", they can be connected by an edge. The subsequent "联动" and "模式" both hit the dictionary, so there are edges between the character "联" and the character "动" and between the character "模" and the character "式", and since "联动模式" hits the dictionary, for the characters from "联" to "式" in "联动模式", they can be connected by an edge.
[0087] The embodiments of the present application match the characters in the first text to be corrected by using at least one dictionary whose word frequencies of words in the corresponding field meet the requirements, improving the pertinence of the second matching relationship to the corresponding field.
[0088] In step 204, determine the corrected text of the first text according to the first matching relationship and the second matching relationship.
[0089] Optionally, determining the corrected text of the first text according to the first matching relationship and the second matching relationship includes: obtaining at least one alternative text according to the first matching relationship and the second matching relationship; determining the matching degree between each alternative text and the first text; and determining the corrected text of the first text from at least one alternative text according to the matching degree between each alternative text and the first text.
[0090] The embodiments of the present application do not limit the manner of obtaining at least one alternative text according to the first matching relationship and the second matching relationship. For example, the possible replacement ways of any character in the first text can be determined through the first matching relationship and the second matching relationship. Exemplarily, the first text is "Turn on the sound frame linkage mode", and the characters in the first text may have a first matching relationship. In addition, the character "打 (dǎ)" can be matched with the character "大 (dà)", and the second matching relationship exists between the character "打 (dǎ)" and the character "大 (dà)"; the character "框 (kuàng)" can be matched with the character "光 (guāng)", and the second matching relationship exists between the character "框 (kuàng)" and the character "光 (guāng)". Thus, by performing permutations and combinations on the possible replacement ways of each character in the first text, three possible replacement ways, namely "大开声框联动模式 (Turn on the large sound frame linkage mode)", "打开声光联动模式 (Turn on the sound and light linkage mode)", and "大开声光联动模式 (Turn on the large sound and light linkage mode)", can be obtained. Each replacement way can be used as an alternative text, and the first text itself can also be used as an alternative text.
[0091] In a possible implementation manner, both the first matching relationship and the second matching relationship can be indicated by a directed graph. Optionally, obtaining at least one alternative text according to the first matching relationship and the second matching relationship includes: performing a path search on the directed graph to obtain at least one alternative path, and different alternative paths correspond to different alternative texts.
[0092] The embodiments of the present application do not limit the method of performing the path search. Exemplarily, the beam search algorithm can be used to perform the path search on the directed graph. When performing the path search on the directed graph through the beam search algorithm, the first character or its matching character can be searched to the second character or its matching character first, and the matching degree between the alternative text corresponding to each combination and the first text is determined. Any combination is an alternative path, and the N (for example, N is a positive integer greater than or equal to 1) alternative paths with the highest matching degree are retained. Based on the retained N alternative paths, continue to search backward. Each time a character is searched, the matching degree of the current alternative path is determined, and the N alternative paths with the highest matching degree are retained. At least one alternative path can be finally obtained based on the above method.
[0093] In the exemplary embodiment, Figure 3Taking the schematic unidirectional graph as an example, when performing path search on the unidirectional graph through the beam search algorithm, the alternative paths from the first character "打" and its matching characters such as "大" to the second character "开" can be searched first. Here, alternative paths such as "打开" and "大开" are included. The matching degrees between the alternative texts corresponding to the above alternative paths and the first text are determined respectively, and the N alternative paths with the highest matching degrees are retained. For example, N can be 2. When the two alternative paths with the highest matching degrees are "打开" and "大开", the two alternative paths "打开" and "大开" are retained. Then, "打开声" and "大开声" can be searched and the matching degrees of the current alternative paths are determined based on the above method. Since there is no matching character for the character "声" here, the two alternative paths "打开声" and "大开声" can be retained. Then, continue to search based on the above method. Each time a character is searched, the matching degree of the current alternative path is determined, and the N alternative paths with the highest matching degrees are retained as the optional texts.
[0094] Exemplarily, determining the matching degrees between each alternative text and the first text includes: scoring each alternative text based on a scoring index to obtain the scoring results of each alternative text, and the scoring result of any alternative text is used to indicate the matching degree between any alternative text and the first text; wherein, the scoring index includes at least one of the rationality of any alternative text, the pinyin similarity between any alternative text and the first text, the number of characters in any alternative text that hit the dictionary, and the length of the words in any alternative text that hit the dictionary. The rationality of any alternative text is used to indicate the smoothness of the sentence of any alternative text.
[0095] Exemplarily, the rationality of any alternative text can be determined based on the kenlm (Kenneth Language Model, a language model tool) model, and the kenlm model can be trained based on the corpus containing the corresponding field. Training the kenlm model with the corpus containing the corresponding field can make the rationality of any alternative text obtained more accurate.
[0096] In a possible implementation manner, both the first matching relationship and the second matching relationship are indicated by a unidirectional graph. Then, the number of characters in any alternative text that hit the dictionary is the number of edges in the alternative path corresponding to the unidirectional graph. Among them, the more the number of edges in the alternative path corresponding to the unidirectional graph, the more the number of characters in the alternative text that hit the dictionary, and the higher the matching degree between the alternative text and the first text. The length of the word composed of the characters in any alternative text that hit the dictionary is the total length of the edges included in the word in the alternative path corresponding to the unidirectional graph. Among them, the longer the total length of the edges included in any word in the alternative path corresponding to the unidirectional graph, the longer the length of the word in the corresponding alternative text that hit the dictionary, and the higher the matching degree between the alternative text and the first text.
[0097] Optionally, based on the degree of matching between each alternative text and the first text, a correction text for the first text is determined from at least one alternative text, including: based on the degree of matching between each alternative text and the first text, screening out at least one optional text whose matching degree reaches a threshold from at least one alternative text; determining the intention of each optional text, and determining a correction text for the first text from at least one optional text based on the intention of each optional text.
[0098] Exemplarily, N matches with higher matching degrees can be set to reach a threshold, for example, N is a positive integer greater than or equal to 1. Alternatively, the threshold can be set based on experience or implementation scenarios, for example, the threshold can be set to 70%. In this way, at least one alternative text with a matching degree greater than 70% can be screened out as an optional text. The embodiment of the present application does not limit the method for determining the intention of at least one optional text. For example, the intention of at least one optional text can be obtained by NLP (Natural Language Processing) analysis. In an exemplary embodiment, the method is applied to the field of voice control, and the voice control may include the field of light control. An optional text may be "turn on the lights in the house". The optional text can obtain the intention of turning on the lights after NLP analysis, and the intention is consistent with the field of light control. Therefore, based on the intention of the optional text, the optional text can be used as the error correction text of the first text.
[0099] Optionally, after determining the correction text of the first text from at least one optional text based on the intentions of each optional text, it also includes: determining the correction behavior corresponding to at least one intention of the correction text, any intention corresponds to zero or more correction behaviors; performing negative feedback weighting on any intention through the correction behavior corresponding to any intention, to obtain a weighted result of at least one intention of the correction text; in response to the weighted result of any intention being higher than a weighted threshold, executing an operation corresponding to any intention.
[0100] Exemplarily, in a voice control scenario, the first text to be corrected may be "turn off the speaker and answer the question", and the correction text may be "turn off the speaker and turn on the light". Therefore, there are two intentions in the correction text: "turn off the speaker" and "turn on the light". Among them, the intention of "turning off the speaker" corresponds to zero correction behaviors, and the intention of "turning on the light" corresponds to two correction behaviors. Therefore, through negative feedback weighting, the weighted result of the intention of "turning off the speaker" may be higher than the weighted threshold, while the weighted result of the intention of "turning on the light" may be lower than the weighted threshold. Therefore, only the operation of turning off the speaker may be executed, and the operation of turning on the light may not be executed. The embodiment of the present application does not limit the weighted threshold, and the weighted threshold may be set based on experience and implementation environment.
[0101] In the embodiment of the present application, matching characters are obtained by matching characters in a first text to be corrected through at least one dictionary in a corresponding field, and the frequency of the characters in the dictionary meets the requirements, thereby improving the specificity of the matching relationship between any character in the first text and the matching character of the character for the corresponding field. Then, the correction text is determined based on the matching relationship, which not only strengthens the text correction in the corresponding field, but also improves the accuracy of the text correction results.
[0102] like Figure 4 As shown, an embodiment of the present application provides a method for text error correction, which may include the following steps.
[0103] 401, obtain the first text to be corrected and at least one dictionary of the corresponding field, the frequency of the words in the dictionary meets the requirements. The implementation of this step can refer to the above step 201, which will not be repeated here.
[0104] 402, split the first text to obtain at least one character, match the at least one character through a dictionary, and obtain matching characters of each character in the at least one character that successfully matches. The implementation method of this step can refer to the above step 202, which will not be repeated here.
[0105] 403, determining a unidirectional graph based on the matching characters of the first text and each character in the at least one character. The implementation of this step can refer to the above step 203, which will not be described in detail here.
[0106] 404, perform path search on the unidirectional graph to obtain at least one candidate path, and each candidate path corresponds to one candidate text. The implementation of this step can refer to the above step 204, which will not be repeated here.
[0107] 405, based on the matching degree between each candidate text and the first text, at least one optional text whose matching degree reaches a threshold is selected from at least one candidate text. The implementation of this step can refer to the above step 204, which will not be described in detail here.
[0108] 406, determine the intention of each optional text, and determine the error correction text of the first text from at least one optional text based on the intention of each optional text. The implementation of this step can refer to the above step 204, which will not be repeated here.
[0109] See also Figure 5 , an embodiment of the present application provides a text error correction device, the device comprising:
[0110] A first acquisition module 501 is used to acquire a first text to be corrected and a dictionary whose word frequency of at least one word in a corresponding field meets the requirements;
[0111] A matching module 502 is used to split the first text to obtain at least one character, match the at least one character through a dictionary, and obtain matching characters of each character in the at least one character that is successfully matched;
[0112] A second acquisition module 503 is used to acquire a first matching relationship and a second matching relationship, wherein the first matching relationship is a matching relationship between characters, and the second matching relationship is a matching relationship between a matching character of the first character and a second character, wherein the first character is any character in at least one character, and the second character is a character in at least one character except the first character and a matching character of a character except the first character;
[0113] The determination module 504 is used to determine the error correction text of the first text according to the first matching relationship and the second matching relationship.
[0114] In one possible implementation, the determination module 504 is used to obtain at least one alternative text based on the first matching relationship and the second matching relationship; determine the matching degree between each alternative text and the first text; and determine the correction text of the first text from the at least one alternative text based on the matching degree between each alternative text and the first text.
[0115] In a possible implementation, the second acquisition module 503 is used to obtain a one-way graph according to at least one word and matching words of each word, wherein the one-way graph is used to indicate the first matching relationship and the second matching relationship;
[0116] The determination module 504 is used to perform path search on the one-way graph to obtain at least one candidate path, and different candidate paths correspond to different candidate texts.
[0117] In one possible implementation, the determination module 504 is used to score each alternative text based on a scoring index to obtain a scoring result for each alternative text, and the scoring result of any alternative text is used to indicate the matching degree of any alternative text with the first text; wherein the scoring index includes at least one of the rationality of any alternative text, the pinyin similarity between any alternative text and the first text, the number of words in any alternative text that hit the dictionary, and the length of words composed of words in any alternative text that hit the dictionary, and the rationality of any alternative text is used to indicate the sentence fluency of any alternative text.
[0118] In one possible implementation, the determination module 504 is used to filter out at least one optional text whose matching degree reaches a threshold from at least one alternative text based on the matching degree of each alternative text with the first text; determine the intention of each optional text, and determine the correction text of the first text from at least one optional text based on the intention of each optional text.
[0119] In one possible implementation, the determination module 504 is also used to determine the correction behavior corresponding to at least one intention of the correction text, and any intention corresponds to zero or more correction behaviors; any intention is negatively feedback weighted by the correction behavior corresponding to any intention to obtain a weighted result of at least one intention of the correction text; in response to the weighted result of any intention being higher than a weighted threshold, an operation corresponding to any intention is executed.
[0120] In a possible implementation, a dictionary in which the frequency of words in at least one corresponding field meets the requirements is obtained based on the TF-IDF algorithm and manual annotation.
[0121] In the embodiment of the present application, matching characters are obtained by matching characters in a first text to be corrected through at least one dictionary in a corresponding field, and the frequency of the characters in the dictionary meets the requirements, thereby improving the specificity of the matching relationship between any character in the first text and the matching character of the character for the corresponding field. Then, the correction text is determined based on the matching relationship, which not only strengthens the text correction in the corresponding field, but also improves the accuracy of the text correction results.
[0122] It should be noted that the device provided in the above embodiment only uses the division of the above functional modules as an example to implement its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0123] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present application. The computer device may be a server. The server may have relatively large differences due to different configurations or performances. It may include one or more processors (Central Processing Units, CPU) 601 and one or more memories 602, wherein at least one computer program is stored in the one or more memories 602, and the at least one computer program is loaded and executed by the one or more processors 601, so that the server implements the text error correction method provided by the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server may also include other components for implementing device functions, which will not be repeated here.
[0124] Figure 71 is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. The device may be a terminal, such as a smart phone, a tablet computer, an MP3 (Moving Picture Experts Group Audio Layer III) player, an MP4 (Moving Picture Experts Group Audio Layer IV) player, a laptop computer or a desktop computer. The terminal may also be referred to as a user device, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0125] Typically, the terminal includes: a processor 701 and a memory 702 .
[0126] The processor 701 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 701 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 701 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 701 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 701 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0127] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 702 is used to store at least one instruction, which is used to be executed by the processor 701 so that the terminal implements the text error correction method provided in the method embodiment of the present application.
[0128] In some embodiments, the terminal may further optionally include: a peripheral device interface 703 and at least one peripheral device. The processor 701, the memory 702 and the peripheral device interface 703 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 703 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 704, a display screen 705, a camera assembly 706, an audio circuit 707, a positioning assembly 708 and a power supply 709.
[0129] The peripheral device interface 703 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 701 and the memory 702. In some embodiments, the processor 701, the memory 702, and the peripheral device interface 703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 701, the memory 702, and the peripheral device interface 703 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0130] The radio frequency circuit 704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 704 communicates with communication networks and other communication devices through electromagnetic signals. The radio frequency circuit 704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 704 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 704 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0131] The display screen 705 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 705 is a touch display screen, the display screen 705 also has the ability to collect touch signals on the surface or above the surface of the display screen 705. The touch signal can be input to the processor 701 as a control signal for processing. At this time, the display screen 705 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 705 can be one, set on the front panel of the terminal; in other embodiments, the display screen 705 can be at least two, respectively set on different surfaces of the terminal or in a folding design; in other embodiments, the display screen 705 can be a flexible display screen, set on a curved surface or a folding surface of the terminal. Even, the display screen 705 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 705 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc.
[0132] The camera assembly 706 is used to capture images or videos. Optionally, the camera assembly 706 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the terminal, and the rear camera is arranged on the back of the terminal. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 706 may also include a flash. The flash can be a monochrome temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.
[0133] The audio circuit 707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals and input them into the processor 701 for processing, or input them into the radio frequency circuit 704 to achieve voice communication. For the purpose of stereo acquisition or noise reduction, there may be multiple microphones, which are respectively arranged at different parts of the terminal. The microphone may also be an array microphone or an omnidirectional acquisition microphone. The speaker is used to convert the electrical signal from the processor 701 or the radio frequency circuit 704 into sound waves. The speaker may be a traditional film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into sound waves audible to humans, but also convert the electrical signal into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 707 may also include a headphone jack.
[0134] Positioning component 708 is used to locate the current geographical location of the terminal to implement navigation or LBS (Location Based Service). Positioning component 708 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Grenas system or the European Union's Galileo system.
[0135] The power supply 709 is used to power various components in the terminal. The power supply 709 can be an alternating current, a direct current, a disposable battery, or a rechargeable battery. When the power supply 709 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0136] In some embodiments, the terminal further includes one or more sensors 710 , including but not limited to: an acceleration sensor 711 , a gyroscope sensor 712 , a pressure sensor 713 , an optical sensor 714 , and a proximity sensor 715 .
[0137] The acceleration sensor 711 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the terminal. For example, the acceleration sensor 711 can be used to detect the components of gravity acceleration on the three coordinate axes. The processor 701 can control the display screen 705 to display the user interface in a horizontal view or a vertical view according to the gravity acceleration signal collected by the acceleration sensor 711. The acceleration sensor 711 can also be used for collecting game or user motion data.
[0138] The gyroscope sensor 712 can detect the body direction and rotation angle of the terminal, and the gyroscope sensor 712 can cooperate with the acceleration sensor 711 to collect the user's 3D actions on the terminal. The processor 701 can implement the following functions based on the data collected by the gyroscope sensor 712: motion sensing (such as changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
[0139] The pressure sensor 713 can be set in the side frame of the terminal and / or the lower layer of the display screen 705. When the pressure sensor 713 is set in the side frame of the terminal, the user's holding signal of the terminal can be detected, and the processor 701 performs left and right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 713. When the pressure sensor 713 is set in the lower layer of the display screen 705, the processor 701 controls the operability controls on the UI interface according to the user's pressure operation on the display screen 705. The operability controls include at least one of a button control, a scroll bar control, an icon control, and a menu control.
[0140] The optical sensor 714 is used to collect the ambient light intensity. In one embodiment, the processor 701 can control the display brightness of the display screen 705 according to the ambient light intensity collected by the optical sensor 714. Specifically, when the ambient light intensity is high, the display brightness of the display screen 705 is increased; when the ambient light intensity is low, the display brightness of the display screen 705 is reduced. In another embodiment, the processor 701 can also dynamically adjust the shooting parameters of the camera assembly 706 according to the ambient light intensity collected by the optical sensor 714.
[0141] The proximity sensor 715, also known as a distance sensor, is usually arranged on the front panel of the terminal. The proximity sensor 715 is used to collect the distance between the user and the front of the terminal. In one embodiment, when the proximity sensor 715 detects that the distance between the user and the front of the terminal is gradually decreasing, the processor 701 controls the display screen 705 to switch from the screen-on state to the screen-off state; when the proximity sensor 715 detects that the distance between the user and the front of the terminal is gradually increasing, the processor 701 controls the display screen 705 to switch from the screen-off state to the screen-on state.
[0142] Those skilled in the art will understand that Figure 7 The structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0143] In an exemplary embodiment, a computer device is also provided, the computer device comprising a processor and a memory, wherein at least one computer program is stored in the memory. The at least one computer program is loaded and executed by one or more processors, so that the computer device implements any of the above-mentioned text error correction methods.
[0144] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor of a computer device to enable the computer to implement any of the above-mentioned text error correction methods.
[0145] In one possible implementation, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0146] In an exemplary embodiment, a computer program product or a computer program is also provided, the computer program product or the computer program comprising computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs any of the above-mentioned text error correction methods.
[0147] It should be understood that the "plurality" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0148] The above description is only an exemplary embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for text error correction, characterized in that: The method comprises: Obtaining a first text to be corrected and at least one dictionary of a corresponding field, wherein the frequency of words in the dictionary meets the requirement; Splitting the first text to obtain at least one character, matching the at least one character using the dictionary to obtain matching characters of each character in the at least one character that is successfully matched; Obtaining a first matching relationship and a second matching relationship, wherein the first matching relationship is a matching relationship between the characters, and the second matching relationship is a matching relationship between a matching character of the first character and a second character, wherein the first character is any character in the at least one character, and the second character is a character in the at least one character except the first character and a matching character of a character except the first character; An error correction text of the first text is determined according to the first matching relationship and the second matching relationship.
2. The method according to claim 1, characterized in that The determining the error correction text of the first text according to the first matching relationship and the second matching relationship includes: Acquire at least one candidate text according to the first matching relationship and the second matching relationship; Determining the matching degree between each candidate text and the first text; According to the matching degree between each candidate text and the first text, a correction text of the first text is determined from the at least one candidate text.
3. The method according to claim 2, characterized in that The obtaining of the first matching relationship and the second matching relationship includes: Obtain a one-way graph according to the at least one character and the matching characters of the respective characters, wherein the one-way graph is used to indicate the first matching relationship and the second matching relationship; The obtaining of at least one candidate text according to the first matching relationship and the second matching relationship includes: performing a path search on the unidirectional graph to obtain at least one candidate path, wherein different candidate paths correspond to different candidate texts.
4. The method according to claim 2, characterized in that: The determining the matching degree between each candidate text and the first text includes: Scoring each candidate text based on the scoring index to obtain a scoring result for each candidate text, wherein the scoring result of any candidate text is used to indicate a matching degree between any candidate text and the first text; Among them, the scoring indicators include at least one of the rationality of any of the alternative texts, the phonetic similarity between any of the alternative texts and the first text, the number of characters that hit the dictionary in any of the alternative texts, and the length of words composed of characters that hit the dictionary in any of the alternative texts. The rationality of any of the alternative texts is used to indicate the fluency of the sentences of any of the alternative texts.
5. The method according to claim 2, characterized in that: The step of determining the error correction text of the first text from the at least one candidate text according to the matching degree between each candidate text and the first text includes: According to the matching degree between each candidate text and the first text, at least one optional text whose matching degree reaches a threshold is selected from the at least one candidate text; The intention of each optional text is determined, and based on the intention of each optional text, an error correction text of the first text is determined from the at least one optional text.
6. The method according to claim 5, characterized in that After determining the error correction text of the first text from the at least one optional text based on the intentions of the various optional texts, the method further includes: Determine an error correction behavior corresponding to at least one intention of the error correction text, where any intention corresponds to zero or more error correction behaviors; Performing negative feedback weighting on any of the intentions through the error correction behavior corresponding to any of the intentions, to obtain a weighted result of at least one intention of the error correction text; In response to a weighted result of any of the intentions being higher than a weighted threshold, an operation corresponding to any of the intentions is executed.
7. The method according to any one of claims 1 to 6, characterized in that: The dictionary of at least one corresponding field is obtained based on a term frequency-inverse document frequency TF-IDF algorithm and manual annotation.
8. A device for text error correction, characterized in that: The device comprises: A first acquisition module, used to acquire a first text to be corrected and at least one dictionary of a corresponding field, wherein the frequency of words in the dictionary meets the requirement; A matching module, configured to split the first text into at least one character, match the at least one character using the dictionary, and obtain matching characters of each character in the at least one character that is successfully matched; A second acquisition module is used to acquire a first matching relationship and a second matching relationship, wherein the first matching relationship is a matching relationship between the characters, and the second matching relationship is a matching relationship between a matching character of the first character and a second character, wherein the first character is any character in the at least one character, and the second character is a character in the at least one character except the first character and a matching character of a character except the first character; A determination module is used to determine an error correction text of the first text according to the first matching relationship and the second matching relationship.
9. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor so that the computer device implements the text error correction method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor so that a computer implements the text error correction method according to any one of claims 1 to 7.
11. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the text correction method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Error correction method, device and equipment and readable storage medium
CN111444705A
Text error correction method and device and communication equipment
CN112949290A