Text error correction method and device

By identifying the entity to be corrected from the text sequence in text error correction technology, determining the candidate entity using the knowledge base and performing similarity processing, the problem of poor text error correction in human-computer dialogue scenarios in the prior art is solved, and the problem of poor text error correction in human-computer dialogue scenarios is realized Higher recognition accuracy and efficiency improve user experience.

CN113836874BActive Publication Date: 2024-11-08BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202111089181.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-16
Publication Date
2024-11-08
Estimated Expiration
2041-09-16

AI Technical Summary

Technical Problem

Existing text error correction technology is poor in recognition and correction in human-computer dialogue scenarios, especially when facing speech truncation, environmental noise interference and spoken expression, it is difficult to accurately identify and correct entities such as video names, resulting in downstream tasks. Not effective.

Method used

By identifying the entity to be corrected from the text sequence, determining the candidate entity using the target knowledge base, and performing preset processing based on similarity, and correcting errors in combination with rough search and fine search, avoiding word dimension correction and improving recognition accuracy and efficiency.

Benefits of technology

It improves the accuracy of text recognition and error correction efficiency in human-computer dialogue scenarios, enhances the effect of downstream tasks, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113836874B_ABST
    Figure CN113836874B_ABST
Patent Text Reader

Abstract

The present disclosure relates to the field of text recognition technology, and in particular to a text error correction method and device. A text error correction method comprises: identifying an entity to be corrected from a text sequence; determining a preset number of candidate entities from a target knowledge base according to the entity to be corrected; and performing a preset process on the entity to be corrected according to the similarity between the entity to be corrected and each candidate entity. The embodiments of the present disclosure improve the efficiency and accuracy of text error correction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of text recognition, and in particular to a text error correction method and device. Background Art

[0002] Text error correction is mainly used to identify error fragments in text and give the correct text after error correction. Text error correction has a wide range of applications in search tasks, input tasks, and OCR (Optical Character Recognition) tasks. The performance of text error correction directly affects the effect of downstream tasks. In related technologies, the performance of text error correction systems is poor and difficult to implement. Summary of the invention

[0003] In order to improve the accuracy of text error correction, the embodiments of the present disclosure provide a text error correction method, device, electronic device and storage medium.

[0004] In a first aspect, an embodiment of the present disclosure provides a text error correction method, comprising:

[0005] Identify entities to be corrected from the text sequence;

[0006] According to the entity to be corrected, determining a preset number of candidate entities from a target knowledge base;

[0007] According to the similarity between the entity to be corrected and each of the candidate entities, a preset process is performed on the entity to be corrected.

[0008] In some implementations, determining a preset number of candidate entities from a target knowledge base according to the entity to be corrected includes:

[0009] Determine a first similarity between the entity to be corrected and each entity in the target knowledge base;

[0010] Based on the first similarities between the entity to be corrected and each entity, the similarity sequence is obtained by sorting from high to low;

[0011] Entities corresponding to a first preset number of first similarities in the similarity sequence are determined as candidate entities.

[0012] In some implementations, performing a preset process on the entity to be corrected according to the similarity between the entity to be corrected and each of the candidate entities includes:

[0013] Determining a second similarity between the entity to be corrected and each candidate entity;

[0014] When the second similarity corresponding to at least one candidate entity is not less than a preset threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity;

[0015] The entity to be corrected is rewritten according to the target entity.

[0016] In some implementations, determining the second similarity between the entity to be corrected and each candidate entity includes:

[0017] For any candidate entity, extract features of the entity to be corrected to obtain a first semantic feature, and extract features of the candidate entity to obtain a second semantic feature;

[0018] The second similarity between the entity to be corrected and the candidate entity is obtained according to the first semantic feature and the second semantic feature.

[0019] In some implementations, performing a preset process on the entity to be corrected according to the similarity between the entity to be corrected and each of the candidate entities further includes:

[0020] When the second similarity of each candidate entity is less than a preset threshold, the entity to be corrected is determined to be a correct entity.

[0021] In some implementations, when the second similarity corresponding to at least one candidate entity is not less than a preset threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity includes:

[0022] In the case where the second similarity of at least one candidate entity is not less than a preset threshold, determining a matching entity from a preset knowledge base according to the entity to be corrected; the preset knowledge base is different from the target knowledge base;

[0023] In the case where the matching degree between the entity to be corrected and the matching entity is not greater than a preset matching degree threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity;

[0024] and / or,

[0025] In a case where the matching degree between the entity to be corrected and the matching entity is greater than a preset matching degree threshold, the entity to be corrected is determined to be a correct entity.

[0026] In some implementations, identifying the entity to be corrected from the text sequence includes: inputting the text sequence into a pre-trained text recognition network to obtain the entity to be corrected output by the text recognition network.

[0027] In some implementations, performing a preset process on the entity to be corrected according to the similarity between the entity to be corrected and each candidate entity includes:

[0028] For each candidate entity, the entity to be corrected and the candidate entity are input into a pre-trained semantic matching network to obtain the similarity between the entity to be corrected and each candidate entity output by the semantic matching network.

[0029] In some implementations, before identifying the entity to be corrected from the text sequence, the method further includes:

[0030] Get the audio information picked up by the microphone;

[0031] The audio information is processed into the text sequence.

[0032] In some implementations, the entity to be corrected is a video name, and the target knowledge base is a video library.

[0033] In a second aspect, the present disclosure provides a text error correction device, including:

[0034] A text recognition module is configured to recognize entities to be corrected from a text sequence;

[0035] An indexing module, configured to determine a preset number of candidate entities from a target knowledge base according to the entity to be corrected;

[0036] The text error correction module is configured to perform preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each of the candidate entities.

[0037] In some implementations, the index module is specifically configured to:

[0038] Determine a first similarity between the entity to be corrected and each entity in the target knowledge base;

[0039] Based on the first similarities between the entity to be corrected and each entity, the similarity sequence is obtained by sorting from high to low;

[0040] Entities corresponding to a first preset number of first similarities in the similarity sequence are determined as candidate entities.

[0041] In some implementations, the text error correction module is specifically configured to:

[0042] Determining a second similarity between the entity to be corrected and each candidate entity;

[0043] When the second similarity corresponding to at least one candidate entity is not less than a preset threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity;

[0044] The entity to be corrected is rewritten according to the target entity.

[0045] In some implementations, the text error correction module is specifically configured to:

[0046] For any candidate entity, extract features of the entity to be corrected to obtain a first semantic feature, and extract features of the candidate entity to obtain a second semantic feature;

[0047] The second similarity between the entity to be corrected and the candidate entity is obtained according to the first semantic feature and the second semantic feature.

[0048] In some implementations, the text error correction module is specifically configured to:

[0049] When the second similarity of each candidate entity is less than a preset threshold, the entity to be corrected is determined to be a correct entity.

[0050] In some implementations, the text error correction module is specifically configured to:

[0051] In the case where the second similarity of at least one candidate entity is not less than a preset threshold, determining a matching entity from a preset knowledge base according to the entity to be corrected; the preset knowledge base is different from the target knowledge base;

[0052] In the case where the matching degree between the entity to be corrected and the matching entity is not greater than a preset matching degree threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity;

[0053] and / or,

[0054] In a case where the matching degree between the entity to be corrected and the matching entity is greater than a preset matching degree threshold, the entity to be corrected is determined to be a correct entity.

[0055] In some implementations, the text recognition module is specifically configured to input the text sequence into a pre-trained text recognition network to obtain the entity to be corrected output by the text recognition network.

[0056] In some embodiments, the text correction module is specifically configured to input the entity to be corrected and the candidate entity into a pre-trained semantic matching network for each candidate entity, and obtain the similarity between the entity to be corrected and each candidate entity output by the semantic matching network.

[0057] In some embodiments, the text error correction device of the embodiment of the present disclosure further includes:

[0058] An acquisition module, configured to acquire audio information picked up by a microphone;

[0059] The processing module is configured to process the audio information into the text sequence.

[0060] In some implementations, the entity to be corrected is a video name, and the target knowledge base is a video library.

[0061] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0062] Processor; and

[0063] A memory stores computer instructions that can be read by the processor, and when the computer instructions are read, the processor executes the method according to any implementation of the first aspect.

[0064] In a fourth aspect, an embodiment of the present disclosure provides a storage medium for storing computer-readable instructions, wherein the computer-readable instructions are used to enable a computer to execute the method according to any embodiment of the first aspect.

[0065] The text error correction method provided in the embodiment of the present disclosure includes identifying the entity to be corrected from the text sequence, determining a preset number of candidate entities from the target knowledge base according to the entity to be corrected, and performing preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each candidate entity. In the embodiment of the present disclosure, the error correction recognition of the text sequence can be assisted based on the entities included in the target knowledge base to improve the recognition accuracy of the human-computer dialogue scene. In addition, the error correction processing of the entity to be corrected is performed by combining a rough search with a fine search to improve the efficiency and accuracy of text correction. Moreover, since the recognition of the entity to be corrected does not rely on the error correction of the word dimension, it is more conducive to human-computer dialogue scenarios such as voice interaction, improves the effect of downstream tasks, and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0067] Figure 1 It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0068] Figure 2 It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0069] Figure 3 It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0070] Figure 4It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0071] Figure 5 It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0072] Figure 6 It is a schematic diagram of a text error correction method according to some embodiments of the present disclosure.

[0073] Figure 7 It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0074] Figure 8 It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0075] Fig. 9 It is a flowchart of a text error correction method according to some embodiments of the present disclosure.

[0076] Fig.10 It is a structural block diagram of a text error correction device in some implementations of the present disclosure.

[0077] Fig.11 It is a structural block diagram of a text error correction device in some implementations of the present disclosure.

[0078] Fig.12 It is a structural block diagram of an electronic device suitable for implementing the text error correction method disclosed in the present invention. DETAILED DESCRIPTION

[0079] The technical solution of the present disclosure will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described implementation is a part of the implementation of the present disclosure, rather than all the implementations. Based on the implementation in the present disclosure, all other implementations obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. In addition, the technical features involved in the different implementations of the present disclosure described below can be combined with each other as long as they do not conflict with each other.

[0080] The text error correction task is a very challenging task in the field of NLP (Natural Language Processing). Text error correction technology is mainly used to identify erroneous fragments in text sequences and give the correct text after error correction. In related technologies, text error correction schemes based on deep learning networks are generally based on word-dimensional error correction based on the encoder-decoder architecture. In actual use, the text length of the input and output sequences is required to be equal, resulting in low accuracy in scene recognition and error correction such as human-computer dialogue, making it difficult to implement.

[0081] Taking the human-computer dialogue scenario of smart voice TV as an example, the main demand of users is to use the smart voice assistant on TV to play video names on demand. However, due to factors such as microphone truncation errors, environmental noise interference, and user colloquial expressions, text recognition errors often occur in the recognized user dialogues. For example, in one example, the recognized text is "Play China in Clicks", and the corresponding correct text is "Play China in Classics"; for example, in another example, the recognized text is "I want to watch Balala the Fairies", and the corresponding correct text is "I want to watch Balala the Fairies"; for example, in another example, the recognized text is "Play Don't Disturb My Study", and the corresponding correct text is "Play Don't Want to Disturb My Study".

[0082] For the human-computer dialogue scenario of video on demand in the above example, the recognition and correction of text error sequences are only performed in the character dimension. It is difficult to identify video name errors caused by voice truncation, colloquialism, etc., making it difficult to achieve accurate recognition and correction of text sequences, resulting in poor results for downstream video retrieval tasks. Users are required to repeatedly correct their pronunciation or adjust their voice expressions, which reduces the user experience.

[0083] Based on the defects existing in the above-mentioned related technologies, the embodiments of the present disclosure provide a text error correction method, device, electronic device and storage medium, aiming to improve the accuracy of text error correction.

[0084] In a first aspect, the embodiments of the present disclosure provide a text error correction method, which can be applied to electronic devices. In the embodiments of the present disclosure, the electronic device can be any type of device suitable for implementation, such as smart home appliances such as smart TVs and smart speakers, mobile terminals such as smart phones and tablet computers, wearable devices such as smart watches and smart bracelets, and desktop terminals such as laptops and personal computers (Personal Computers), and the present disclosure does not limit this.

[0085] like Figure 1 As shown, in some embodiments, the text error correction method of the present disclosure example includes:

[0086] S110, identifying entities to be corrected from the text sequence.

[0087] The text sequence represents input text data for which text error correction is desired, and the entity to be corrected represents an entity in the text sequence that may have text errors.

[0088] In some implementations, the text sequence may be obtained by user input. Alternatively, in other implementations, the text sequence may also be obtained by recognizing user voice information. This disclosure does not limit this.

[0089] It can be understood that in the field of NLP, an entity (mention) can refer to any subject in a text sequence, such as a person's name, a place name, an organization name, a video name, a song name, etc. In the embodiment of the present disclosure, the entity to be corrected can be identified from the text sequence based on the entity recognition technology.

[0090] In some implementations, taking a human-computer dialogue scenario of multimedia on demand as an example, the text corresponding to the text sequence is "Play Me and My Motherland", where "Me and My Motherland" is the entity to be corrected identified from the text sequence.

[0091] For entity recognition, in some exemplary implementations, a BERT, ALBERT, or ERNIE network based on a transformer architecture may be used to perform entity recognition on entities to be corrected in a text sequence.

[0092] S120: Determine a preset number of candidate entities from the target knowledge base according to the entity to be corrected.

[0093] In the disclosed embodiment, after the entity to be corrected is identified, the text sequence of the entity to be corrected is not rewritten in the word dimension for correction, but a preset number of candidate entities are determined from the target knowledge base.

[0094] The target knowledge base refers to a database including a large number of linked entities. The target knowledge base may be a pre-established knowledge base or an acquired existing knowledge base, and the present disclosure does not impose any limitation on this.

[0095] In some embodiments, the target knowledge base may be a database corresponding to the type of entity to be corrected, thereby improving the efficiency and accuracy of the retrieval of candidate entities. For example, for a human-computer dialogue scenario of video on demand, the entity to be corrected is often the name of the video, so the target knowledge base may be a video knowledge base. For another example, for a human-computer dialogue scenario of audio playback, the entity to be corrected is often a song title, a book title, etc., so the target knowledge base may be an audio knowledge base. Of course, it is understandable that the target knowledge base may also be other types of knowledge bases, and the present disclosure does not limit this.

[0096] In the disclosed embodiment, a preset number of candidate entities can be determined from the target knowledge base according to the similarity between the entity to be corrected and each entity in the target knowledge base. The candidate entity represents the entity in the target knowledge base that is most similar to the entity to be corrected. In the case where the entity to be corrected is an erroneous text, the corresponding correct text is most likely to exist in the candidate entity.

[0097] The process of determining candidate entities is described in detail below in this disclosure and will not be described in detail here.

[0098] S130: Perform preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each candidate entity.

[0099] It is understandable that the entity to be corrected in the text sequence may be a correct text or an erroneous text. In the embodiment of the present disclosure, the similarity between the entity to be corrected and each candidate entity is calculated, and whether the entity to be corrected is an erroneous text is determined based on the similarity.

[0100] If the entity to be corrected is an erroneous text, it means that the entity to be corrected in the text sequence needs to be rewritten for correction, so based on the similarity between the entity to be corrected and the candidate entity, the target entity is determined from a preset number of candidate entities to rewrite and replace the original entity to be corrected.

[0101] If the entity to be corrected is the correct text, it means that the entity to be corrected in the text sequence does not need to be rewritten for error correction, and the original text sequence can be directly output to the downstream task.

[0102] From the above, it can be seen that in the embodiment of the present disclosure, the error correction recognition of the text sequence is assisted by the knowledge base entity, so as to improve the recognition accuracy of the human-computer dialogue scene. In addition, the candidate entity is quickly determined from the target knowledge base by using a rough search, and then the error correction entity is corrected by combining the method of a fine search, so as to improve the efficiency and accuracy of text error correction. Moreover, since the recognition of the error correction entity does not rely on the error correction of the word dimension, it is more conducive to human-computer dialogue scenes such as voice interaction, improves the effect of downstream tasks, and improves the user experience.

[0103] In some implementations, the index module can be used to determine the similarity between the entity to be corrected and each entity in the target knowledge base, and the candidate entity can be determined from the target knowledge base. Figure 2 The implementation method is described.

[0104] like Figure 2 As shown, in some embodiments, the text error correction method of the present disclosure example, the process of determining a preset number of candidate entities from the target knowledge base includes:

[0105] S121, determining a first similarity between the entity to be corrected and each entity in the target knowledge base.

[0106] S122 , sorting the entities to be corrected and the first similarities between the entities from high to low to obtain a similarity sequence.

[0107] S123: Determine entities corresponding to a preset number of first similarities in the similarity sequence as candidate entities.

[0108] In the disclosed embodiment, a rough search may be performed on the target knowledge base through an index module to determine a preset number of candidate entities from the target knowledge base.

[0109] In some implementations, the index module may be an Elasticsearch search module based on the Lucene architecture, an Oakbay search module based on the Lucene architecture, or a Faiss index module, etc., which is not limited in the present disclosure. Moreover, for the specific implementation of the index module, those skilled in the art can understand and fully implement it based on the relevant technology, and the present disclosure will not elaborate on it.

[0110] It is worth noting that the purpose of the indexing module is to quickly recall entities that have textual similarities with the entity to be corrected from the knowledge base. In the embodiment of the present disclosure, the advantage of its high-speed retrieval is utilized to perform a rough search of the target knowledge base to obtain a preset number of candidate entities.

[0111] Specifically, the indexing module can determine the first similarity between the entity to be corrected and each entity according to the textual similarity between the entity to be corrected and each entity in the target knowledge base. It can be understood that the first similarity represents the textual similarity between the entity to be corrected and the entity in the target knowledge base. The higher the first similarity, the higher the similarity between the entity to be corrected and the entity in the target knowledge base, and vice versa.

[0112] Thus, the first similarities can be sorted from high to low, and the entities corresponding to the first similarities with a preset number of top rankings can be determined as candidate entities. For example, in an exemplary implementation, the index module can sort the first similarities in reverse order from high to low, and then determine the entities corresponding to the first 10 similarities with the top rankings as candidate entities.

[0113] It is understandable that the number of candidate entities can be selected by those skilled in the art according to the needs of specific scenarios, and is not limited to the above examples. It is also understandable that the greater the number of candidate entities, the better the effect of subsequent error correction identification of the error-correcting entity, but the lower the computational efficiency. Conversely, the fewer the number of candidate entities, the higher the computational efficiency of subsequent error correction entity identification, but the greater the risk of missing candidate entities, resulting in a worse effect of error correction identification of the error-correcting entity. Those skilled in the art can select an appropriate number of candidate entities accordingly, and the present disclosure does not impose any restrictions on this.

[0114] It can be seen from the above that in the embodiments of the present disclosure, the index module is used to quickly retrieve candidate entities that match the entity to be corrected from the target knowledge base, thereby improving the efficiency and effect of text correction.

[0115] In some embodiments, as mentioned above, the text to be corrected in the text sequence may be a correct text or an erroneous text. In the embodiment of the present disclosure, the matching module can determine whether the text to be corrected is an erroneous text based on the similarity between the entity to be corrected and the candidate entity. Figure 3 Provide specific instructions.

[0116] like Figure 3 As shown, in some embodiments, the text error correction method of the present disclosure example, the process of performing preset processing on the error correction entity includes:

[0117] S310: Determine a second similarity between the entity to be corrected and each candidate entity.

[0118] S320: When the second similarity corresponding to at least one candidate entity is not less than a preset threshold, determine the candidate entity corresponding to the maximum second similarity as the target entity.

[0119] S330, rewrite the entity to be corrected according to the target entity.

[0120] After determining a preset number of candidate entities, the matching module may determine a second similarity between the entity to be corrected and each candidate entity according to the semantic similarity between the entity to be corrected and the candidate entities.

[0121] The purpose of the matching module is to perform a more accurate similarity calculation between the entity to be corrected and the candidate entity based on the semantics, heat and other characteristics of the entity to be corrected and the candidate entity. In some embodiments, the matching module can use a machine learning network based on deep semantics, such as an LSTM (Long Short-Term Memory) network, a bidirectional LSTM network, etc., which is not limited in this disclosure.

[0122] like Figure 4 As shown, in some embodiments, the text error correction method of the present disclosure example, the process of determining the second similarity between the entity to be corrected and the candidate entity includes:

[0123] S311. For any candidate entity, extract features of the entity to be corrected to obtain a first semantic feature, and extract features of the candidate entity to obtain a second semantic feature.

[0124] S312: Obtain a second similarity between the entity to be corrected and the candidate entity according to the first semantic feature and the second semantic feature.

[0125] Taking any candidate entity as an example, the matching module can extract the semantic features of the to-be-corrected entity sequence and the semantic features of the candidate entity, which are the first semantic features and the second semantic features, respectively, by means of, for example, convolution processing. Then, based on the similarity of the first semantic features and the second semantic features, the second similarity between the to-be-corrected entity and the candidate entity is obtained.

[0126] In some embodiments, the matching module takes a bidirectional LSTM neural network as an example, and the sequence of the entity to be corrected and the candidate entity can be input into the matching module for encoding to obtain the first semantic feature and the second semantic feature. Then the second similarity of the semantic features of the two is calculated, which is expressed as:

[0127] R(Q,D)=||y_Q-y_D||

[0128] In the formula, y_Q represents the first semantic feature of the entity to be corrected, y_D represents the second semantic feature of the candidate entity, and R(Q,D) represents the second similarity between the entity to be corrected and the candidate entity. In the output layer of the matching module, a softmax activation function can be used to calculate the similarity score between the entity to be corrected and the candidate entity, that is, the second similarity.

[0129] Based on the above process, the second similarity corresponding to each candidate entity can be obtained. The higher the second similarity, the higher the semantic similarity between the candidate entity and the entity to be corrected, and vice versa.

[0130] Combined with the above, it can be seen that the candidate entity represents the entity indexed by the target knowledge base through a rough search by the index module. The higher the second similarity between the entity to be corrected in the text sequence and the candidate entity, the more likely it is that the entity to be corrected in the text sequence is the same entity as the candidate entity.

[0131] For example, in one example, the text represented by the text sequence is "play click China", and the entity to be corrected is "click China". If the second similarity between the entity to be corrected and the candidate entity "China in Classics" determined in the target knowledge base is very high, it means that the entity to be corrected in the text sequence and "China in Classics" should be the same entity, that is, the entity to be corrected needs to be corrected and rewritten.

[0132] Thus, a preset threshold can be set for the second similarity. When there is a second similarity not less than the preset threshold among the second similarities corresponding to the preset number of candidate entities, it indicates that the entity to be corrected is an erroneous entity and needs to be corrected and rewritten. When the second similarities corresponding to the preset number of candidate entities are all less than the preset threshold, it indicates that the entity to be corrected is a correct entity and does not need to be corrected and rewritten.

[0133] In some embodiments, in response to the second similarity of at least one candidate entity being not less than a preset threshold, it indicates that the entity to be corrected is an erroneous entity and needs to be corrected and rewritten. However, there may be multiple candidate entities whose second similarity is not less than the preset threshold. In this case, the candidate entity with the largest second similarity among the multiple candidate entities whose second similarities are not less than the preset threshold can be determined as the target entity, and then the target entity can be used to replace and rewrite the entity to be corrected.

[0134] For instance, in the above example, the entity to be corrected is "China in Clicks", and the candidate entities whose second similarity exceeds the preset threshold include "China in Classics", "China in Stories" and "China in the Countryside", so that the candidate entity "China in Classics" with the largest second similarity can be determined as the target entity, and the target entity "China in Classics" is used to replace and rewrite the entity to be corrected "China in Clicks".

[0135] In some embodiments, in response to the second similarity of each candidate entity being less than a preset threshold, the entity to be corrected is determined to be a correct entity. That is, there is no candidate entity in the target knowledge base whose similarity satisfies the condition, and the entity to be corrected in the text sequence is a correct entity, and no correction is required.

[0136] In some implementations, the preset threshold can be set according to specific scenario requirements. For example, in some examples, the preset threshold can be 0.6. When the second similarity corresponding to the candidate entity is greater than 0.6, it indicates that the entity to be corrected is an erroneous entity and needs to be corrected and rewritten. Otherwise, it is a correct entity and does not need to be corrected and rewritten.

[0137] From the above, it can be seen that in the embodiment of the present disclosure, the index module is used to quickly retrieve candidate entities that match the entity to be corrected from the target knowledge base, and then the similarity between the entity to be corrected and the candidate entity is accurately calculated based on the deep semantic features, and the efficiency and accuracy of text correction are improved by combining rough search with fine search.

[0138] In some implementations, in order to further improve the error correction recognition accuracy of the text to be corrected, the implementation of the present disclosure further judges the text to be corrected that is determined to be an erroneous entity in combination with other knowledge bases. Figure 5 The implementation method is described.

[0139] like Figure 5 As shown, in some embodiments, the text error correction method of the present disclosure example further includes:

[0140] S510: When the second similarity of at least one candidate entity is not less than a preset threshold, determine a matching entity from a preset knowledge base according to the entity to be corrected.

[0141] S520: When the matching degree between the entity to be corrected and the matching entity is not greater than a preset matching degree threshold, determine the candidate entity corresponding to the maximum second similarity as the target entity.

[0142] S530: When the matching degree between the entity to be corrected and the matching entity is greater than a preset matching degree threshold, determine that the entity to be corrected is a correct entity.

[0143] For example, in the human-computer dialogue scenario of video playback, the text sequence input by the user is "Open my football world", the entity to be corrected is "My Football World", and the entity to be corrected corresponds to the e-book "My Football World". If the above text correction method is used to determine that the second similarity of the candidate entity "The World of Football" is greater than the preset threshold, and the candidate entity "The World of Football" is a movie.

[0144] In some implementations, in this case, instead of directly determining the entity to be corrected "my football world" as an erroneous entity and rewriting it with the candidate entity "football world", the entity to be corrected is matched with entities in a preset knowledge base.

[0145] The preset knowledge base is an entity base different from the target knowledge base. For example, the target knowledge base is a video knowledge base, while the preset knowledge base may include knowledge bases of e-books, music, games, etc. In the above example, by matching the e-book entity "My Football World" in the preset knowledge base, it can be determined that the entity to be corrected in the text sequence refers to the e-book entity, that is, the entity to be corrected is the correct text, and no correction rewriting is required.

[0146] Specifically, based on the above Figure 3 In the embodiment, when determining the second similarities corresponding to multiple candidate entities, if there is at least one candidate entity whose second similarity is not less than a preset threshold, entity matching can be performed in a preset knowledge base different from the target knowledge base according to the entity to be corrected to obtain a matching entity that meets the matching requirements. Figure 2 In the manner shown, a number of matching entities are determined from a preset knowledge base.

[0147] After obtaining multiple matching entities, a preset matching degree threshold can be set based on the matching degree between the entity to be corrected and the matching entity. The preset matching degree threshold represents the threshold value associated with the entity to be corrected and the matching entity. For any matching entity, when the matching degree between the entity to be corrected and the matching entity is not greater than the preset matching degree threshold, it means that the entity to be corrected does not belong to the entity in the preset knowledge base, that is, the entity to be corrected is determined to be an erroneous entity, thereby utilizing the aforementioned Figure 3 When the matching degree between the entity to be corrected and the matching entity is greater than the preset matching degree threshold, it means that the entity to be corrected is an entity in the preset knowledge base, and the entity to be corrected is determined to be a correct entity, and no correction rewriting is required.

[0148] As described in the above example, the entity to be corrected "My Football World" is determined in the e-book knowledge base to be the same entity as the matching entity "e-book "My Football World"", so there is no need to use the candidate entity "World of Football" to correct it.

[0149] Of course, it is understandable that the preset knowledge base is not limited to the e-book knowledge base in the above example, and it can also be any other type suitable for implementation, such as a game knowledge base, a music knowledge base, etc., and the present disclosure does not impose any limitation on this.

[0150] From the above, it can be seen that in the embodiments of the present disclosure, a preset knowledge base different from the target knowledge base is used to identify entities to be corrected, thereby further improving the accuracy of text correction, avoiding excessive correction of text sequences, and improving robustness.

[0151] In some implementations, the text error correction method of the present disclosure example may be implemented using a text error correction network. Figure 6 The structural principle diagram of the text error correction network in some embodiments of the present disclosure is shown in FIG. Figure 6 Provide specific instructions.

[0152] like Figure 6 As shown, in some embodiments, the text error correction network includes a text recognition network 100 , an indexing module 200 , and a semantic matching network 300 .

[0153] The text recognition network 100 is used to identify entities to be corrected in a text sequence, and its input can be a text sequence, and its output is a sequence fragment corresponding to the entity to be corrected. In some embodiments, the text recognition network 100 can adopt a 12-layer Bert-base neural network structure, and a CRF layer can be added to the token-level output of the original network structure to improve the annotation effect of the sequence fragment of the entity to be corrected.

[0154] exist Figure 6 In the example, the text corresponding to the text sequence is "I want to see the name of a family", the input of the text recognition network 100 is the text sequence, and the output is the sequence segment corresponding to the entity to be corrected "the name of a family".

[0155] The index module 200 is used to determine a preset number of candidate entities from the target knowledge base according to the sequence fragments of the entities to be corrected output by the text recognition network 100. In some embodiments, the index module can be an Elasticsearch search module based on the Lucene architecture, or an Oakbay search module based on the Lucene architecture, or a Faiss index module, etc., which is not limited in the present disclosure.

[0156] exist Figure 6 In the example, the index module 200 determines from the video knowledge base that the three candidate entities with the highest first similarity ranking with the entity to be corrected "in the name of a family" are "in the name of the family", "in the name of the people", and "a happy family".

[0157] The semantic matching network 300 is used to determine the second similarity between the entity to be corrected and each candidate entity, and its input is the entity to be corrected and the candidate entity, and its output is the second similarity. Figure 6 In an implementation, the semantic matching network 300 uses a bidirectional LSTM network, which can extract deep semantic features of the entity to be corrected and the candidate entity, and finally output the second similarity between the entity to be corrected and the candidate entity using a softmax activation function based on the deep semantic features of the two.

[0158] exist Figure 6 In the example, the second similarity score corresponding to the candidate entity "in the name of family" output by the semantic matching network 300 is 0.76, the second similarity score corresponding to the candidate entity "in the name of the people" is 0.45, and the second similarity score corresponding to the candidate entity "happy family" is 0.25.

[0159] In this example, the preset threshold can be set to 0.6, where the second similarity 0.76 corresponding to the candidate entity "in the name of the family" is greater than the preset threshold 0.6, so that the entity to be corrected "in the name of the family" can be determined as an erroneous entity, and the candidate entity "in the name of the family" is determined as the target entity. Then, the target entity "in the name of the family" is used to correct the entity to be corrected "in the name of the family", and the corrected text sequence is obtained as "I want to see in the name of the family".

[0160] In some implementations, after obtaining the rewritten text sequence, the rewritten text sequence "I want to watch In the Name of My Family" can be output to the downstream task. For example, taking the video playback scenario as an example, the downstream search task can search and play the video "In the Name of My Family" according to the rewritten entity "In the Name of My Family".

[0161] From the above, it can be seen that in the embodiment of the present disclosure, the index module and the semantic matching network are used to realize the error correction identification of the entity to be corrected by the rough search combined with the fine search, so as to improve the efficiency and accuracy of text error correction, and the semantic matching network of the bidirectional LSTM is used to perform deep semantic feature matching to improve the accuracy of text error correction. In addition, the text recognition network and the semantic matching network are decoupled from each other, and the two can be trained separately to improve the efficiency of network training and maintenance.

[0162] In some embodiments, Figure 6 Based on the example text error correction network structure, the text error correction method disclosed in the present invention also includes a process of training the network.

[0163] In the embodiment of the present disclosure, the text recognition network 100 and the semantic matching network 300 may be trained separately. Figure 7 As shown, the training process of the text recognition network 100 may include:

[0164] S710: Obtain training sample data.

[0165] S720: Input the sample data into an untrained text recognition network to obtain an output result of the text recognition network.

[0166] S730. According to the difference between the output result and the label of the sample data, the network parameters of the text recognition network are adjusted until the convergence condition is met, thereby obtaining a trained text recognition network.

[0167] Specifically, in some implementations, the sample data can be obtained by cleaning the historical human-computer dialogue data of the user, and mining the text with entity retrieval intent to generate sample data. At the same time, the entity segments in the text sequence of the sample data can be annotated by manual or automatic annotation as the labels corresponding to the sample data. In an exemplary implementation, the amount of sample data is about 250,000.

[0168] By inputting sample data into an untrained text recognition network, we can obtain the sequence fragments corresponding to the entities to be corrected predicted by the text recognition network, that is, the output results. The output results represent the predicted values ​​of the text recognition network, while the labels represent the true values ​​of the manual annotations. The difference between the output results and the labels is obtained through the loss function. The smaller the difference, the better the prediction effect of the text recognition network. Therefore, the network parameters of the text recognition network can be continuously adjusted according to the difference until the network meets the convergence conditions, and the iterative training of the text recognition network is stopped to obtain the trained text recognition network.

[0169] like Figure 8 As shown, the training process of the semantic matching network 300 may include:

[0170] S810: Obtain training sample data.

[0171] S820: Input the sample data into an untrained semantic matching network to obtain an output result of the semantic matching network.

[0172] S730. According to the difference between the output result and the label of the sample data, the network parameters of the semantic matching network are adjusted until the convergence condition is met, thereby obtaining a trained semantic matching network.

[0173] Specifically, in some embodiments, for obtaining sample data, high-click entity names after error correction based on entity name index results can be used as positive samples, and low-click entity names after error correction can be used as negative samples, and corresponding labels can be obtained through manual annotation. In some embodiments, the amount of sample data is about 200,000, and the ratio of positive to negative samples is about 3:7.

[0174] The sample data includes entities to be corrected and candidate entities. The sample data is input into the untrained semantic matching network to obtain the output result of the semantic matching network prediction output. The output result represents the predicted value of the semantic matching network, while the label represents the true value of the manual annotation. The difference between the output result and the label is obtained through the loss function. The smaller the difference, the better the prediction effect of the semantic matching network. Therefore, the network parameters of the semantic matching network can be continuously adjusted according to the difference until the network meets the convergence conditions, and the iterative training of the semantic matching network is stopped to obtain the trained semantic matching network.

[0175] In some implementations, after the text recognition network 100 and the semantic matching network 300 are trained separately, the text recognition network 100 and the semantic matching network 300 may be jointly trained. Those skilled in the art may understand and fully implement this, and the present disclosure does not limit this.

[0176] In an exemplary implementation, in the above Figure 6 On the basis of the network architecture shown, based on the human-computer dialogue scenario of video playback, through the reproduction comparison with the existing solutions, the implementation scheme of the present disclosure can achieve a higher text error correction accuracy. On the manually annotated test set, the recall rate of video name error correction can reach more than 91%, and the error correction accuracy can reach more than 90%. The actual online error correction data is manually sampled and evaluated, and the text error correction accuracy of the video name can also reach more than 88%, which can fully meet the actual human-computer dialogue scenario and realize the application landing.

[0177] In some embodiments, the text error correction method of the example of the present disclosure can be applied to a smart TV, which is provided with a microphone or a remote control, so as to pick up the user's voice and convert the user's voice into a text sequence. Fig. 9 The implementation method is described.

[0178] like Fig. 9 As shown, in some embodiments, the text error correction method of the present disclosure example, the process of obtaining a text sequence includes:

[0179] S910: Acquire audio information picked up by a microphone.

[0180] S920: Obtain a text sequence based on audio information processing.

[0181] Specifically, taking a smart TV as an example, a microphone may be provided on the TV and / or the remote control so as to pick up the audio information of the user.

[0182] For example, a user can wake up the TV's smart voice assistant and say "play China in Classical Chinese". The TV can then acquire the user's audio information through a microphone, and then process the audio information to convert it into a text sequence.

[0183] It is understandable that due to various factors such as noise interference, colloquial expressions, and sound pickup truncation, the converted text sequence may contain entity errors. For example, the converted text sequence is "play click China". Therefore, through the process of the text error correction method in the above embodiment of the present disclosure, the video name in the text sequence can be corrected and rewritten, and the correct video entity can be obtained and retrieved and played. The user is unaware of the whole process, which improves the user experience.

[0184] Of course, the text correction method of the embodiment of the present disclosure can also be applied to any other suitable implementation scenarios, and is not limited to the above-mentioned human-computer dialogue scenarios, such as OCR recognition, search tasks, etc., and the present disclosure does not impose any restrictions on this.

[0185] From the above, it can be seen that in the embodiment of the present disclosure, error correction recognition is performed on the text sequence based on the knowledge base entity to improve the recognition accuracy of the human-computer dialogue scene. In addition, a rough search is used to quickly determine the candidate entity from the target knowledge base, and then the error correction entity is corrected in combination with a fine search method to improve the efficiency and accuracy of text error correction. Moreover, since the recognition of the error correction entity does not rely on the error correction of the word dimension, it is more conducive to human-computer dialogue scenarios such as voice interaction, improves the effect of downstream tasks, and improves the user experience.

[0186] In a second aspect, the embodiments of the present disclosure provide a text error correction device, which can be applied to electronic devices. In the embodiments of the present disclosure, the electronic device can be any type of device suitable for implementation, such as smart home appliances such as smart TVs and smart speakers, mobile terminals such as smart phones and tablet computers, wearable devices such as smart watches and smart bracelets, and desktop terminals such as laptops and personal computers (Personal Computers), and the present disclosure does not limit this.

[0187] like Fig.10 As shown, in some embodiments, the text error correction device of the example of the present disclosure includes:

[0188] A text recognition module 10 is configured to recognize entities to be corrected from a text sequence;

[0189] The indexing module 200 is configured to determine a preset number of candidate entities from a target knowledge base according to the entity to be corrected;

[0190] The text error correction module 30 is configured to perform preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each candidate entity.

[0191] From the above, it can be seen that in the embodiment of the present disclosure, the error correction recognition of the text sequence is assisted by the knowledge base entity, so as to improve the recognition accuracy of the human-computer dialogue scene. In addition, the candidate entity is quickly determined from the target knowledge base by using a rough search, and then the error correction entity is corrected by combining the method of a fine search, so as to improve the efficiency and accuracy of text error correction. Moreover, since the recognition of the error correction entity does not rely on the error correction of the word dimension, it is more conducive to human-computer dialogue scenes such as voice interaction, improves the effect of downstream tasks, and improves the user experience.

[0192] In some implementations, the index module 200 is specifically configured to:

[0193] Determine a first similarity between the entity to be corrected and each entity in the target knowledge base;

[0194] Based on the first similarities between the entity to be corrected and each entity, the similarity sequence is obtained by sorting from high to low;

[0195] Entities corresponding to a first preset number of first similarities in the similarity sequence are determined as candidate entities.

[0196] In some implementations, the text error correction module 30 is specifically configured to:

[0197] Determining a second similarity between the entity to be corrected and each candidate entity;

[0198] When the second similarity corresponding to at least one candidate entity is not less than a preset threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity;

[0199] The entity to be corrected is rewritten according to the target entity.

[0200] In some implementations, the text error correction module 30 is specifically configured to:

[0201] For any candidate entity, extract features of the entity to be corrected to obtain a first semantic feature, and extract features of the candidate entity to obtain a second semantic feature;

[0202] The second similarity between the entity to be corrected and the candidate entity is obtained according to the first semantic feature and the second semantic feature.

[0203] In some implementations, the text error correction module 30 is specifically configured to:

[0204] When the second similarity of each candidate entity is less than a preset threshold, the entity to be corrected is determined to be a correct entity.

[0205] In some implementations, the text error correction module 30 is specifically configured to:

[0206] In the case where the second similarity of at least one candidate entity is not less than a preset threshold, determining a matching entity from a preset knowledge base according to the entity to be corrected; the preset knowledge base is different from the target knowledge base;

[0207] In the case where the matching degree between the entity to be corrected and the matching entity is not greater than a preset matching degree threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity;

[0208] and / or,

[0209] In a case where the matching degree between the entity to be corrected and the matching entity is greater than a preset matching degree threshold, the entity to be corrected is determined to be a correct entity.

[0210] In some implementations, the text recognition module 10 is specifically configured to input the text sequence into a pre-trained text recognition network to obtain the entity to be corrected output by the text recognition network.

[0211] In some embodiments, the text correction module 30 is specifically configured to input the entity to be corrected and the candidate entity into a pre-trained semantic matching network for each candidate entity, and obtain the similarity between the entity to be corrected and each candidate entity output by the semantic matching network.

[0212] like Fig.11 As shown, in some embodiments, the text error correction device of the embodiment of the present disclosure further includes:

[0213] An acquisition module 40 is configured to acquire audio information picked up by a microphone;

[0214] The processing module 50 is configured to process the audio information into the text sequence.

[0215] In some implementations, the entity to be corrected is a video name, and the target knowledge base is a video library.

[0216] From the above, it can be seen that in the embodiment of the present disclosure, error correction recognition is performed on the text sequence based on the knowledge base entity to improve the recognition accuracy of the human-computer dialogue scene. In addition, a rough search is used to quickly determine the candidate entity from the target knowledge base, and then the error correction entity is corrected in combination with a fine search method to improve the efficiency and accuracy of text error correction. Moreover, since the recognition of the error correction entity does not rely on the error correction of the word dimension, it is more conducive to human-computer dialogue scenarios such as voice interaction, improves the effect of downstream tasks, and improves the user experience.

[0217] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:

[0218] Processor; and

[0219] A memory stores computer instructions that can be read by the processor, and when the computer instructions are read, the processor executes the method according to any implementation of the first aspect.

[0220] In a fourth aspect, an embodiment of the present disclosure provides a storage medium for storing computer-readable instructions, wherein the computer-readable instructions are used to enable a computer to execute the method according to any embodiment of the first aspect.

[0221] Specifically, Fig.12 A schematic diagram of the structure of an electronic device 600 suitable for implementing the method disclosed in the present invention is shown. Fig.12 The electronic device shown can realize the corresponding functions of the above-mentioned processor and storage medium.

[0222] like Fig.12 As shown, the electronic device 600 includes a processor 601, which can perform various appropriate actions and processes according to the program stored in the memory 602 or the program loaded from the storage part 608 into the memory 602. In the memory 602, various programs and data required for the operation of the electronic device 600 are also stored. The processor 601 and the memory 602 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0223] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0224] In particular, according to an embodiment of the present disclosure, the above method process can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the above method. In such an embodiment, the computer program can be downloaded and installed from a network through the communication part 609, and / or installed from a removable medium 611.

[0225] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0226] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the embodiments. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived therefrom are still within the scope of protection of the present invention.

Claims

1. A text error correction method, It is characterized in that include: Identify entities to be corrected from the text sequence; According to the entity to be corrected, determining a preset number of candidate entities from a target knowledge base; The target knowledge base is a database corresponding to the entity type to be corrected; According to the similarity between the entity to be corrected and each of the candidate entities, performing a preset process on the entity to be corrected; The performing of preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each of the candidate entities includes: Determining a second similarity between the entity to be corrected and each candidate entity; In the case where the second similarity of at least one candidate entity is not less than a preset threshold, determining a matching entity from a preset knowledge base according to the entity to be corrected; the preset knowledge base is different from the target knowledge base; When the degree of matching between the entity to be corrected and the matching entity is not greater than a preset matching degree threshold, the candidate entity corresponding to the maximum second similarity is determined as the target entity.

2. The method according to claim 1, It is characterized in that The step of determining a preset number of candidate entities from a target knowledge base according to the entity to be corrected includes: Determine a first similarity between the entity to be corrected and each entity in the target knowledge base; Based on the first similarities between the entity to be corrected and each entity, the similarity sequence is obtained by sorting from high to low; Entities corresponding to a first preset number of first similarities in the similarity sequence are determined as candidate entities.

3. The method according to claim 1, It is characterized in that The performing preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each of the candidate entities comprises: When the second similarity corresponding to at least one candidate entity is not less than a preset threshold, determining the candidate entity corresponding to the maximum second similarity as the target entity; The entity to be corrected is rewritten according to the target entity.

4. The method according to claim 3, It is characterized in that The determining the second similarity between the to-be-corrected entity and each candidate entity comprises: For any candidate entity, extract features of the entity to be corrected to obtain a first semantic feature, and extract features of the candidate entity to obtain a second semantic feature; The second similarity between the entity to be corrected and the candidate entity is obtained according to the first semantic feature and the second semantic feature.

5. The method according to claim 3, It is characterized in that The step of performing preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each of the candidate entities further includes: When the second similarity of each candidate entity is less than a preset threshold, the entity to be corrected is determined to be a correct entity.

6. The method according to claim 3, It is characterized in that The step of determining, when the second similarity corresponding to at least one candidate entity is not less than a preset threshold, the candidate entity corresponding to the maximum second similarity is the target entity, comprising: In a case where the matching degree between the entity to be corrected and the matching entity is greater than a preset matching degree threshold, the entity to be corrected is determined to be a correct entity.

7. The method according to claim 1, It is characterized in that The identifying the entity to be corrected from the text sequence comprises: inputting the text sequence into a pre-trained text recognition network to obtain the entity to be corrected output by the text recognition network; and / or, The step of performing preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each candidate entity includes: For each candidate entity, the entity to be corrected and the candidate entity are input into a pre-trained semantic matching network to obtain the similarity between the entity to be corrected and each candidate entity output by the semantic matching network.

8. The method according to any one of claims 1 to 7, It is characterized in that Before identifying the entity to be corrected from the text sequence, the method further includes: Get the audio information picked up by the microphone; The audio information is processed into the text sequence.

9. The method according to any one of claims 1 to 7, It is characterized in that The entity to be corrected is a video name, and the target knowledge base is a video library.

10. A text error correction device, It is characterized in that include: A text recognition module is configured to recognize entities to be corrected from a text sequence; An indexing module is configured to determine a preset number of candidate entities from a target knowledge base according to the entity to be corrected; the target knowledge base is a database corresponding to the type of entity to be corrected; A text error correction module, configured to perform preset processing on the entity to be corrected according to the similarity between the entity to be corrected and each of the candidate entities; Wherein, the text error correction module is specifically used for: Determining a second similarity between the entity to be corrected and each candidate entity; In the case where the second similarity of at least one candidate entity is not less than a preset threshold, determining a matching entity from a preset knowledge base according to the entity to be corrected; the preset knowledge base is different from the target knowledge base; When the degree of matching between the entity to be corrected and the matching entity is not greater than a preset matching degree threshold, the candidate entity corresponding to the maximum second similarity is determined as the target entity.

11. An electronic device, It is characterized in that include: processor; as well as A memory storing computer instructions that can be read by the processor, and when the computer instructions are read, the processor executes the method according to any one of claims 1 to 9.

12. A storage medium, It is characterized in that Used to store computer-readable instructions, wherein the computer-readable instructions are used to make a computer execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Method and system for linking entities

    CN105224648A

  • Method and equipment for connecting entity mention in short text with entity in semantic knowledge base

    CN106940702A

  • Entity processing method and device and storage medium

    CN109684625A

  • Text keyword extraction method and system for national defense science and technology field

    CN110162791A

  • Character error correction method and device, electronic equipment and storage medium

    CN110472701A