Text processing method, device and computing equipment

Through the pre-trained spoken language recognition model, the colloquial words in the spoken text are identified and eliminated, which solves the problem that the spoken text is not suitable as written language, realizes the conversion from spoken text to standardized text, and improves the accuracy of information dissemination and communication efficiency. efficiency.

CN112151019BActive Publication Date: 2024-09-20ALIBABA GROUP HOLDING LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910561669.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-26
Publication Date
2024-09-20
Estimated Expiration
2039-06-26

AI Technical Summary

Technical Problem

It is difficult to effectively eliminate colloquial errors in spoken texts with existing technology, resulting in spoken texts being unsuitable for use as written language and affecting information dissemination and communication.

Method used

By obtaining the target spoken text, the pre-trained spoken language recognition model is used to identify and eliminate colloquial words, and then the standardized text is obtained. The model is trained based on annotated colloquial training words and can identify modal particles, colloquial expressions, pause words, repeated words and corrected words, and eliminate them according to their types.

Benefits of technology

It effectively eliminates oral errors from spoken text and converts it into written text, which improves the standardization and applicability of the text and is suitable for various scenarios such as court trial records.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112151019B
    Figure CN112151019B
Patent Text Reader

Abstract

The embodiment of the present application provides a text processing method, apparatus and computing device mobile terminal. Among them, a target spoken text is obtained; a spoken language recognition model is used to identify colloquial words in the target spoken text; and the colloquial words are eliminated from the target spoken text to obtain a standard text. The technical solution provided by the embodiment of the present application achieves the purpose of eliminating colloquial errors in spoken text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer application technology, and in particular, to a text processing method, apparatus and computing device. Background Art

[0002] Spoken language, as the oral language used in informal occasions (e.g., daily conversations, informal speeches, informal written documents, etc.), has the characteristics of informality and flexibility. Written language, as the language used in formal occasions (e.g., formal speeches, formal written documents, etc.), has the characteristics of standardization and simplicity. Since spoken language does not have the characteristics of simplicity and standardization of written language, in some occasions, the use of spoken language is not conducive to dissemination and communication.

[0003] But sometimes it is inevitable to receive spoken text. For example, when using speech recognition technology to convert speech into text, the speech recognition technology will strictly convert the input speech into the corresponding text. If the input speech is spoken speech, then the corresponding recognition result is also spoken text.

[0004] Compared with written texts, spoken texts will inevitably contain some colloquial errors. Therefore, how to eliminate colloquial errors in spoken texts and standardize spoken texts is an urgent problem to be solved. Summary of the invention

[0005] Embodiments of the present application provide a text processing method, apparatus, and computing device.

[0006] In a first aspect, an embodiment of the present application provides a text processing method, comprising:

[0007] Obtain the target spoken text;

[0008] Using a spoken language recognition model to recognize colloquial words in the target spoken text;

[0009] The colloquial words are eliminated from the target spoken text to obtain a standardized text.

[0010] In a second aspect, an embodiment of the present application provides a text processing device, comprising:

[0011] A text acquisition module, used to acquire the target spoken text;

[0012] A spoken language error recognition module, used for recognizing colloquial words in the target spoken language text using a spoken language recognition model;

[0013] The spoken language error elimination module is used to eliminate the colloquial words from the target spoken language text to obtain a standard text.

[0014] In a third aspect, an embodiment of the present application provides a computing device, including a processing component and a storage component;

[0015] The storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component;

[0016] The processing component is used to:

[0017] Obtain the target spoken text;

[0018] Using a spoken language recognition model to recognize colloquial words in the target spoken text;

[0019] The colloquial words are eliminated from the target spoken text to obtain a standardized text.

[0020] In an embodiment of the present application, a spoken language recognition model can be pre-trained based on a spoken language training text with annotated spoken language training words, so that for a target spoken language text, the spoken language recognition model can be used to identify the spoken words in the target spoken text, and then the spoken words can be eliminated from the target spoken text, so that a standard text, that is, a written language text, can be obtained. The embodiment of the present application achieves the purpose of eliminating spoken language errors from a spoken text.

[0021] These and other aspects of the present application will become more clearly understood in the description of the following embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0023] Figure 1 A flowchart of an embodiment of a text processing method provided by the present application is shown;

[0024] Figure 2 A flowchart showing another embodiment of a text processing method provided by the present application is shown;

[0025] Figure 3 A flowchart showing another embodiment of a text processing method provided by the present application is shown;

[0026] Figure 4 A flowchart showing another embodiment of a text processing method provided by the present application is shown;

[0027] Figure 5A flowchart showing another embodiment of a text processing method provided by the present application is shown;

[0028] Figure 6 A schematic diagram showing the structure of an embodiment of a text processing device provided by the present application is shown;

[0029] Figure 7 A schematic diagram of the structure of an embodiment of a computing device provided by the present application is shown. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0031] In some of the processes described in the specification and claims of this application and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.

[0032] The technical solution of the embodiment of the present application can be applied to any scenario requiring the conversion of spoken text into written text.

[0033] Language is a tool people use to communicate. It usually has two different forms, namely spoken language and written language. Spoken language is oral language used for oral communication in informal occasions, while written language is used in formal occasions, especially in document writing scenarios. However, in actual applications, it is inevitable to receive spoken text. For example, when using speech recognition technology to convert speech into text, speech recognition technology will strictly convert the input speech into the corresponding text. If the input speech is spoken speech, the corresponding recognition result is also the spoken text. Since spoken text is spoken language, it is not suitable for further dissemination. It is necessary to eliminate colloquial errors and convert it into a standardized text in written form.

[0034] For example, in a court trial, the clerk needs to use written language to record the trial. In order to reduce the workload of the clerk, voice recognition equipment has also begun to enter the court. The voice of the trial can be automatically converted into a voice text of the trial. However, the voice text of the trial will inevitably contain spoken language, and the clerk's trial record is required to be in written language, so there is a need to convert the voice text of the trial into a written text.

[0035] However, there is currently no effective and accurate way to eliminate colloquial errors in spoken texts.

[0036] In order to achieve the conversion of spoken text, the inventor has proposed the technical solution of the present application after a series of studies. In the embodiment of the present application, for the target spoken text, the spoken words in the target spoken text can be identified by using the spoken recognition model; thus, the spoken words can be eliminated from the target spoken text to achieve the conversion of the target spoken text to obtain a standard text in written form. Since the spoken errors in the spoken text are usually caused by some spoken words, the technical solution of the embodiment of the present application can be used to identify the spoken words in the spoken text and then eliminate them, thereby achieving the purpose of eliminating the spoken errors in the spoken text and converting the spoken text into a written text.

[0037] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0038] Figure 1 A flowchart of an embodiment of a text processing method provided in an embodiment of the present application, the method may include the following steps:

[0039] 101: Obtain the target spoken text.

[0040] The target spoken text may be obtained by converting using speech recognition technology; therefore, optionally, the target spoken text may be obtained by:

[0041] Get the target spoken text from the speech recognition results.

[0042] The target spoken text may be any spoken text to be processed in the speech recognition result. The speech recognition result may be divided into multiple texts, which may be divided according to different roles in the speech recognition result, or at least one sentence selected in sequence according to punctuation marks in speech recognition may be used as a spoken text to be processed.

[0043] 102: Identify the colloquial words in the target spoken language text using a spoken language recognition model.

[0044] Among them, the spoken language recognition model can be trained based on a spoken language training text annotated with colloquial training words. This spoken language recognition model can be implemented using a neural network model. The specific training method of the spoken language recognition model will be described in detail below.

[0045] Among them, the reason why a spoken language text cannot be directly used as a written language text is that there are colloquial errors in the spoken language text, and these colloquial errors are mainly caused by the colloquial words appearing in the spoken language text. Therefore, in this embodiment, the colloquial words in the spoken language text can be first identified using a spoken language recognition model.

[0046] Among them, the target spoken language text may include one or more colloquial words, and the colloquial types of different colloquial words may be different. Among them, the colloquial types may include modal particles, colloquial expression words, pause words, repeated words, and corrected words, etc.

[0047] 103: Eliminate the colloquial words from the target spoken language text to obtain a standardized text;

[0048] Eliminating all the colloquial words in the target spoken language text can obtain a standardized text in written language form, thus realizing text conversion.

[0049] In this embodiment, the colloquial words in the target spoken language text can be identified using a pre-trained spoken language recognition model, so as to eliminate the colloquial words from the target spoken language text, standardize the target spoken language text, eliminate colloquial errors, and the spoken language text after eliminating colloquial errors can be used as a written language text. The technical solution of this embodiment achieves the purpose of eliminating colloquial errors in the spoken language text.

[0050] As can be seen from the above, the common colloquial types may include modal particles, colloquial expression words, pause words, repeated words, and corrected words, etc. The following will introduce these several colloquial types respectively:

[0051] Among them, modal particles are words that appear at the end of a sentence (declarative sentence, imperative sentence, interrogative sentence, etc.) and express the emotions and feelings of the speaker. Common modal particles include: uh, ah, um. For example, in the spoken language text "Also take out the household register ah ", the "ah" is a modal particle.

[0052] Among them, colloquial expression words refer to words that can be deleted and the sentence remains smooth and the semantics remains complete. Common colloquial expression words are: here, then, should say. For example, It should be said "According to the statement at that time, both men and women belonged to the NEET group", the "should say" is a colloquial expression word.

[0053] Among them, pause words refer to the speaker adding some pause words while thinking about what to say next, which is used to retain the right to continue speaking in a multi-person conversation. Common pause words include: oh, this, ah, well, that is. For example, "After nearly half a year, this The word "this" in "the two lovers have entered the stage of discussing marriage" is a pause word.

[0054] Among them, repeated words refer to words that are repeated, and usually appear in the pattern of "ABCABC" or "ABC{pause word}ABC", that is, "ABC" is repeated, and a pause word may be added between the two repetitions; for example, "September 2016" Number 10 The word "10" in "I told him about this on the 10th" is a repeated word.

[0055] The corrected word has a pattern of "ABCXYZ" or "ABC{pause word}XYZ", where "XYZ" corrects "ABC" and "ABC" is the corrected word. A pause word may appear between XYZ and ABC, and XYZ and ABC may have at least some overlapping characters. both sides The "both sides" in "The contradiction between men and women is not irreconcilable" is the corrected word, which is corrected by "both men and women".

[0056] The colloquial words may be eliminated from the target spoken text based on the colloquial types of the colloquial words.

[0057] The spoken language recognition model can also recognize the spoken language type of the spoken word.

[0058] As an optional method, the spoken language recognition model can be pre-trained in the following manner:

[0059] Get oral training text;

[0060] Determining at least one spoken language training word in the spoken language training text and a spoken language type of the at least one spoken language training word;

[0061] The spoken language recognition model is trained using the spoken language training text and the spoken language type of the at least one spoken language training word.

[0062] Optionally, the spoken training text may be segmented to obtain a word sequence; then, according to the spoken type of each word, a label indicating its spoken type is set for each word as a training label; wherein, if a word does not belong to the spoken training word, a label indicating that it does not belong to the spoken training word may also be set as the training label;

[0063] Thus, the word sequence obtained from the oral training text can be used as the model input, and the training labels corresponding to different words can be used as the model output to train the oral recognition model. Optionally, each word can be converted into a word vector and input into the model.

[0064] Thus, the steps of using the oral recognition model to identify colloquial words in the target oral text may include:

[0065] Segment the target oral text;

[0066] Use the oral recognition model to identify the target labels of each word in the target oral text;

[0067] Based on the target labels of each word, determine the colloquial words and their colloquial types.

[0068] As another optional method, the oral recognition model can be pre-trained in the following way:

[0069] Obtain the oral training text;

[0070] Determine at least one colloquial training word in the oral training text and the colloquial type of the at least one colloquial training word;

[0071] For each single character in the oral training text, set the training label of each single character according to the colloquial type of the colloquial training word formed by the single character and whether the single character is the starting character, middle character, ending character, single character, or a component character that does not belong to any colloquial type in the colloquial training word it forms;

[0072] Use the oral training text and the training labels of each single character in the oral training text to train the oral recognition model.

[0073] That is to say, the oral training text can be labeled at the character level.

[0074] Among them, when a single character is the starting character, middle character, ending character, or single character in the colloquial training word it forms, it means: for example, if the colloquial training word is "then what", "ran" is the starting character, "hou" is the middle character, and "ne" is the ending character. Of course, if the colloquial training word has only two characters, these two characters are respectively the starting character and the middle character; if the colloquial training word has only one character, it is the single character.

[0075] If a certain character in the oral training text does not form any colloquial training word, it is a component character that does not belong to any colloquial type.

[0076] For the convenience of labeling, the letters B, E, I, and S can be used to represent the start word, end word, middle word, and single word respectively. If there are 6 types of colloquialisms, the 6 types of colloquialisms can also be represented by different identification symbols. Based on the 6 types of colloquialisms and the start word, end word, middle word, and single word, 24 labels can be set. The component characters that do not belong to any colloquialism type can be represented by label O, that is, a total of 25 labels.

[0077] Therefore, based on the spoken type of the spoken training word composed of each single word and whether the single word is the starting word, middle word, ending word, single word or a component word that does not belong to any spoken type in the spoken training word composed of it, a training label for each single word can be set.

[0078] For example, assuming that the colloquial type includes colloquial expressions, and the colloquial expression type is assumed to be represented by colloquial, and assuming that a colloquial training word belonging to the colloquial expression type in the colloquial training text is "this side", then the training label of the single word "this" can be set to colloquial_B, and the training label of the single word "side" is colloquial_I.

[0079] For the components of the spoken training text that do not belong to any spoken type, their training labels can be directly set to 0.

[0080] In addition, in some embodiments, for each word in the spoken training text, according to the spoken type of the spoken training word constituted by the word and whether the word is a starting word, a middle word, an ending word, a word or a constituent word not belonging to any spoken type in the spoken word constituted by the word, setting the training label of each word may include:

[0081] For each single word in the spoken training text, a training label for each single word is set according to the text position of the single word in the spoken training text, the spoken type of the spoken training word constituted by the single word, and whether the single word is a starting word, a middle word, an ending word, a single word, or a constituent word that does not belong to any spoken type in the spoken word constituted by the single word.

[0082] That is, position information is added to the training label of each word to indicate its text position in the spoken language training text, so as to improve the accuracy of the spoken language recognition model.

[0083] In some embodiments, the training of the spoken language recognition model using the spoken language training text and the training labels of each word in the spoken language training text may include:

[0084] Convert each word of the spoken training text into a word vector;

[0085] The spoken language recognition model is trained by using the word vector of each word in the spoken language training text as a model input and the training label of each word as a model output.

[0086] The word vectors of each word in the spoken training text form a vector sequence to be input into the spoken recognition model.

[0087] Optionally, there are many ways to convert a single word into a word vector, for example, it can be obtained by using the skip-gram (a word vector conversion model) model. Of course, other Word2Vec (word to vector) models can also be used for implementation, which is the same as the prior art and will not be described in detail here.

[0088] Among them, the spoken language recognition model can be implemented using a neural network model. As an optional method, the spoken language recognition model can be implemented using a neural network architecture of BILSTM (Bi-Long Short-Term Memory) + CRF (conditional random field algorithm). That is, the spoken language recognition model consists of an input layer, a bidirectional LSTM (Long Short-Term Memory) layer, a CRF layer and an output layer, wherein the bidirectional LSTM layer and the CRF layer are also intermediate layers.

[0089] Among them, the word vector of a single word is used as the input of the input layer, and then the output result of the input layer is modeled from the positive and negative directions through the bidirectional LSTM layer. The positive and negative neuron outputs representing each word are spliced ​​together and input to the CRF layer. The label relationship is modeled through the CRF layer. The CRF layer is connected to the output layer. The output result of the output layer is the label of each single word. Based on this principle, the spoken language recognition model can be trained using spoken language training text.

[0090] In some embodiments, the step of using the spoken language recognition model to recognize colloquial words in the target spoken language text includes:

[0091] Using the spoken language recognition model to identify target labels for each word in the target spoken language text;

[0092] Based on the target tags of the individual characters, colloquial words in the target spoken text are determined.

[0093] Since the label represents the colloquial type to which the word belongs and the starting word, middle word, ending word or single word in the colloquial word it constitutes, the colloquial words in the target spoken text can be obtained based on the target labels of different words.

[0094] In some embodiments, the identifying the colloquial words of the target spoken text using the spoken language recognition model includes:

[0095] Convert each word of the target spoken text into a word vector;

[0096] Inputting the word vector of each word in the target spoken text into the spoken language recognition model to obtain a target label for each word in the target spoken text;

[0097] At least one colloquial word in the target spoken text is determined based on target tags of different characters.

[0098] Since colloquial words do not affect the correct meaning of the spoken text, they are non-essential morphemes in expressing the correct meaning of the spoken text.

[0099] Therefore, as an optional manner, the step of eliminating the colloquial words from the target spoken text includes:

[0100] The colloquial words are deleted from the target spoken text.

[0101] As another optional manner, the step of eliminating the colloquial words from the target spoken text may include:

[0102] Scoring the target spoken text including the colloquial word and the text obtained by deleting the colloquial word from the target spoken text using a first language model, wherein the first language model is obtained by training based on a first standard written text;

[0103] Based on the scoring result, it is determined whether to delete the colloquial word from the target spoken text.

[0104] The first language model is used to score the target spoken text and the first candidate text to judge the fluency. Based on the scoring result, if the scoring result of the text obtained by deleting the colloquial words is better than the scoring result of the target spoken text, it can be determined to delete the colloquial words from the target spoken text; and if the scoring result of the target spoken text is better than the scoring result of the text obtained by deleting the colloquial words, the colloquial words in the target spoken text are retained.

[0105] Among them, the first language model can adopt an N-gram (N-gram model) language model or a neural network model, such as LSTM, SRILM (SRI language model, SRI language model, a language model training tool), KenLM (Ken language model, a language model training tool) or RNNLM (RNN language model, a language model training tool), etc., or other unsupervised learning models, etc.

[0106] The first language model can be trained as follows:

[0107] Segment the first standard written text into words;

[0108] The first language model is trained using each word obtained by segmenting the first standard written text.

[0109] The first standard written text refers to a text expressed in written language.

[0110] In some embodiments, scoring the target spoken text including the colloquial word and the first candidate text obtained by deleting the colloquial word using the first language model may include:

[0111] Segmenting the target spoken text;

[0112] Scoring each word obtained by word segmentation of the target spoken text using the first language model;

[0113] Performing word segmentation on a text obtained by deleting the colloquial words from the target spoken text;

[0114] The first language model is used to score each word obtained by deleting the colloquial words from the text segmentation.

[0115] In some embodiments, the target spoken text may have a contextual relationship. For example, when the target spoken text is a spoken text to be processed in a language recognition result, the target spoken text has a contextual relationship.

[0116] Therefore, the method may further include:

[0117] Acquire at least one preceding spoken text of the target spoken text;

[0118] Using the target spoken text and the at least one preceding spoken text as texts to be processed;

[0119] Eliminating the colloquial words from the target spoken text may include:

[0120] Scoring the text to be processed including the colloquial word and the text obtained by deleting the colloquial word from the text to be processed respectively using the first language model;

[0121] Based on the scoring result, it is determined whether to delete the colloquial word from the target spoken text.

[0122] Then, using the first language model to score the text to be processed including the colloquial word and the text obtained by deleting the colloquial word from the text to be processed may include:

[0123] Tokenize the text to be processed;

[0124] Based on each word obtained by tokenizing the text to be processed, use the first language model to score;

[0125] Tokenize the text obtained by deleting the colloquial words from the text to be processed;

[0126] Based on each word obtained by tokenizing the text after deleting the colloquial words, use the first language model to score.

[0127] In addition, in practical applications, for colloquial words of the filler type, in some scenarios they are used to connect the context. For example, for the filler "um", in some cases it is the answer to the question in the previous sentence and cannot be directly deleted. While for colloquial words of non-filler type, they can be directly deleted.

[0128] Therefore, the recognition of colloquial words in the target oral text using the oral language recognition model includes:

[0129] Use the oral language recognition model to recognize the colloquial words in the target oral text and the colloquial types of the colloquial words; wherein, the colloquial types include fillers, colloquial expression words, pause words, repeated words or corrected words;

[0130] If the colloquial word is of non-filler type, delete the colloquial word from the target oral text;

[0131] If the colloquial word is of filler type, score the target oral text including the colloquial word and the text obtained by deleting the colloquial word from the target oral text respectively using the first language model; wherein, the first language model is trained based on the first standard written text;

[0132] Based on the scoring results, determine whether to delete the colloquial word from the target oral text.

[0133] Among them, for the specific implementation of deleting colloquial words of filler type and the training of the first language model, details can be seen in the above description and will not be elaborated here.

[0134] Optionally, for filler-type colloquial words, they may be the connecting content of the previous oral text of the target oral text. Therefore, the step of scoring the target oral text including the colloquial word and the text obtained by deleting the colloquial word from the target oral text respectively using the first language model when the colloquial word is of filler type may include:

[0135] If the colloquial word is a modal particle type, obtaining at least one preceding spoken text of the target spoken text;

[0136] Using the target spoken text and the at least one preceding spoken text as texts to be processed;

[0137] The text to be processed including the colloquial words and the text obtained by deleting the colloquial words from the text to be processed are scored using the first language model respectively.

[0138] In addition, in addition to colloquial errors in spoken text, if the spoken text is a descriptive text in a certain specific field, such as the text obtained by speech recognition in a court trial scenario, there will be some specific technical terms in the court trial scenario, and there will also be many entity nouns involved, such as names of people, places, and institutions. These technical terms and entity nouns can be considered professional vocabulary, and professional words are often uncommon words. The speech recognition results are likely to be wrong, thus affecting the accuracy of the spoken text expression. Even if the colloquial errors are eliminated, the accuracy of the text expression will be affected. Therefore, in order to ensure the accuracy of the text expression at the same time, such as Figure 2 The text processing method shown may include the following steps:

[0139] 201: Obtain the target spoken text.

[0140] 202: Using a spoken language recognition model to recognize colloquial words in the target spoken language text.

[0141] 203: Eliminate the colloquial words from the target spoken text.

[0142] The spoken language recognition model is obtained by training a spoken language training text marked with spoken language training words.

[0143] Among them, the operations of steps 201 to 203 are the same as Figure 1 The operations of steps 101 to 103 shown in FIG. 1 are the same and will not be repeated here.

[0144] 204: Based on the professional word list, search for incorrect professional words in the target spoken text that match the target professional words.

[0145] 205: Eliminate the erroneous professional words in the target spoken text by using the target professional words, so as to obtain a standard text in which the colloquial words and erroneous professional words are eliminated.

[0146] It should be noted that the elimination of colloquial words and the elimination of erroneous professional words from the target spoken text may be performed simultaneously or sequentially, and the sequential execution order is not limited to the step order in this embodiment.

[0147] In addition, there may be punctuation errors in the target spoken text, such as incorrect or no punctuation, especially when the target spoken text is obtained by speech recognition. Sentence punctuation errors may affect the fluency of text expression. Therefore, in order to ensure the fluency of text expression, Figure 3 The text processing method shown may include the following steps:

[0148] 301: Obtain the target spoken text.

[0149] 302: Using a spoken language recognition model to recognize colloquial words in the target spoken language text.

[0150] 303: Eliminate the colloquial words from the target spoken text.

[0151] The spoken language recognition model is obtained by training a spoken language training text marked with spoken language training words.

[0152] Among them, the operations of steps 301 to 303 are the same as Figure 1 The operations of steps 101 to 103 shown in FIG. 1 are the same and will not be repeated here.

[0153] 304: Eliminate sentence segmentation errors from the target spoken text, thereby obtaining a standard text with colloquial words and sentence segmentation errors eliminated.

[0154] It should be noted that the elimination of colloquial words and the elimination of sentence segmentation errors from the target spoken text may be performed simultaneously or sequentially, and the sequential execution order is not limited to the step order in this embodiment.

[0155] In addition, in order to eliminate colloquial errors and ensure the accuracy and fluency of text expression, such as Figure 4 The text processing method shown may include the following steps:

[0156] 401: Get the target spoken text.

[0157] 402: Using a spoken language recognition model to recognize colloquial words in the target spoken language text.

[0158] 403: Eliminate the colloquial words from the target spoken text.

[0159] The spoken language recognition model is obtained by training a spoken language training text marked with spoken language training words.

[0160] Among them, the operations of step 401 to step 403 are the same as Figure 1 The operations of steps 101 to 103 shown in FIG. 1 are the same and will not be repeated here.

[0161] 404: Based on the professional word list, search for incorrect professional words in the target spoken text that match the target professional words.

[0162] 405: Using the target professional words, eliminate the erroneous professional words in the target spoken text.

[0163] 406: Eliminate punctuation errors from the target spoken text, thereby obtaining a standard text with colloquial words, incorrect professional words, and punctuation errors eliminated.

[0164] It should be noted that the elimination of colloquial words, erroneous professional words and sentence segmentation errors from the target spoken text may be performed simultaneously or sequentially, and the sequential execution order is not limited to the step order in this embodiment.

[0165] The professional word list may include technical terms or entity nouns.

[0166] Professional words in the professional word list can be pre-configured.

[0167] In addition, entity nouns can also be obtained through offline mining of written texts in the same field as the target spoken text. For example, in a court trial scenario, written texts can be in the form of indictments, party information, evidence information, and other texts.

[0168] Mining of written text can be obtained through regular expression mining; or the written text can be segmented, and the frequency of occurrence of different words can be counted, and the words with higher frequency of occurrence can be used as entity nouns.

[0169] As an optional method, the using the target professional words to eliminate the erroneous professional words in the target spoken text may include:

[0170] The target professional words are used to replace the incorrect professional words in the target spoken text.

[0171] As another optional method, in order to further improve the accuracy of text expression, the use of the target professional words to eliminate the erroneous professional words in the target spoken text may include:

[0172] Using a second language model, scoring the target spoken text including the erroneous professional word and the text obtained by replacing the erroneous professional word in the target spoken text with the target professional word, respectively; wherein the second language model is obtained based on a second standard written text training;

[0173] Based on the scoring result, it is determined whether to use the target professional word to replace the erroneous professional word.

[0174] Among them, if the scoring result of the target spoken text is better than the scoring result of the text obtained by replacing the erroneous professional words in the target spoken text with the target professional words, the erroneous professional words in the target spoken text will not be replaced; if the scoring result of the text obtained by replacing the erroneous professional words in the target spoken text with the target professional words is better than the scoring result of the target spoken text, the erroneous professional words will be replaced with the target professional words.

[0175] The second standard written text may be a written text containing professional terms and expressed in written language.

[0176] In addition, the first standard text may be the same as the second standard text, and the first language model may be the same as the second language model. The second language model may be implemented using an N-gram language model or a neural network model, such as LSTM, SRILM, KenLM or RNNLM, or other unsupervised learning models.

[0177] In some embodiments, the using the second language model to score the target spoken text including the erroneous professional word and the text obtained by replacing the erroneous professional word in the target spoken text with the target professional word respectively includes:

[0178] Acquire at least one preceding spoken text of the target spoken text;

[0179] Using the target spoken text and the at least one preceding spoken text as texts to be processed;

[0180] Using the second language model, the text to be processed including the erroneous professional word and the text obtained by replacing the erroneous professional word in the text to be processed with the target professional word are scored respectively.

[0181] In some embodiments, searching for an incorrect professional word in the target spoken text that matches a target professional word based on the professional word list may include:

[0182] Using each professional word in the professional word list, a search is performed in the target spoken text to find an erroneous professional word that meets similar conditions with any professional word; wherein the any professional word that meets similar conditions with the erroneous professional word is used as the target professional word.

[0183] The similarity condition may refer to the similarity between word vectors being greater than a similarity threshold, etc.

[0184] In order to improve the search accuracy, in some embodiments, using each professional word in the professional word list to search in the target spoken text to find the wrong professional word that meets the similarity condition with any professional word may include:

[0185] Converting the target spoken text into a phonetic sequence;

[0186] Using the pinyin sequence of each professional word in the professional word list, a search is performed in the target spoken text to find an erroneous professional word corresponding to a candidate pinyin sequence that meets similar conditions to the pinyin sequence of any professional word.

[0187] Among them, the number of characters corresponding to the candidate pinyin sequence is the same as the number of characters corresponding to the professional word.

[0188] Among them, the candidate Pinyin sequence that meets the similarity condition with the Pinyin sequence of any professional word can refer to the candidate Pinyin sequence whose Pinyin similarity with the Pinyin sequence of any professional word is greater than the Pinyin similarity threshold.

[0189] The pinyin similarity can be obtained by calculating the edit distance, or based on the Jaro edit distance (an improved edit distance) or other improved edit distance calculations.

[0190] In some embodiments, each professional word in the professional word list may be used to search in the target spoken text using a heuristic search method, such as a forward maximum matching algorithm, to reduce the search workload.

[0191] As an optional manner, eliminating sentence segmentation errors from the target spoken text may include:

[0192] For each punctuation mark to be processed in the target spoken text, using a third language model to score the target spoken text including the punctuation mark and different texts obtained by replacing the punctuation mark to be processed in the target spoken text with different candidate punctuation marks; wherein the third language model is obtained by training with a third standard written text;

[0193] Based on the scoring results, the optimal punctuation mark is selected to replace the punctuation mark to be processed.

[0194] The candidate punctuation mark corresponding to each punctuation mark to be processed in the target spoken text may be any punctuation mark different from the punctuation mark to be processed.

[0195] Therefore, based on the scoring results, the optimal punctuation mark can be determined. The optimal punctuation mark may be any candidate punctuation mark, and of course it may also be the punctuation mark to be processed. If the optimal punctuation mark is the punctuation mark to be processed, no punctuation mark replacement is performed.

[0196] The third standard written text may be a text expressed in written language with the indicator point symbols correctly set.

[0197] Of course, the first standard written text or the second standard written text can be the same as the third standard written text, so that the first language model or the second language model can be the same as the third language model. The third speech model is a universal model that can score punctuation replacement, colloquial word deletion or professional word replacement.

[0198] In some embodiments, for each punctuation mark to be processed in the target spoken text, scoring the target spoken text including the punctuation mark and different texts obtained by replacing the punctuation mark to be processed in the target spoken text with different candidate punctuation marks respectively using a third language model includes:

[0199] Acquire at least one preceding spoken text of the target spoken text;

[0200] Using the target spoken text and the at least one preceding spoken text as texts to be processed;

[0201] For each punctuation mark to be processed in the target spoken text, a third language model is used to score the text to be processed including the punctuation mark and different texts obtained by replacing the punctuation mark to be processed in the text to be processed with different candidate punctuation marks.

[0202] As another optional manner, eliminating sentence segmentation errors from the target spoken text may include:

[0203] Determine where punctuation marks need to be inserted in the target spoken text;

[0204] For each insertion position, using a fourth language model to score different texts obtained by inserting different candidate punctuation marks into the target spoken text; wherein the fourth language model is obtained by training with a fourth standard written text;

[0205] Based on the scoring results, the best candidate punctuation mark is selected and added to the punctuation insertion position.

[0206] The fourth voice model may be the same as the third voice model, and the fourth standard text is a text expressed in written language with correct punctuation marks.

[0207] Optionally, determining a punctuation insertion position where a punctuation mark needs to be inserted in the target spoken text may include:

[0208] In some embodiments, for each insertion position, scoring different texts obtained by inserting different candidate punctuation marks into the target spoken text using the fourth language model may include:

[0209] Acquire at least one preceding spoken text of the target spoken text;

[0210] Using the target spoken text and the at least one preceding spoken text as texts to be processed;

[0211] For each insertion position, the fourth language model is used to score different texts obtained by inserting different candidate punctuation marks into the text to be processed.

[0212] The punctuation insertion position where punctuation is needed in the target spoken text can be determined by performing sentence segmentation recognition on the target spoken text, and can be recognized using a pre-trained sentence segmentation recognition model. By segmenting the target spoken text, the relevance between adjacent words can be calculated using the sentence segmentation recognition model, so that it can be determined whether punctuation needs to be inserted between two words based on the relevance between adjacent words. If so, the punctuation insertion position is between the two words.

[0213] As described above, it can be seen that standardizing the target spoken text may include eliminating spoken words, eliminating incorrect professional words by using professional words, and eliminating sentence segmentation errors.

[0214] Therefore, in some embodiments, eliminating the colloquial words from the target spoken text to obtain a standardized text may include:

[0215] The colloquial words are eliminated from the target spoken text, the erroneous professional words in the target spoken text are eliminated using the target professional words, and the segmentation errors are eliminated from the target spoken text to obtain a standardized text.

[0216] In some embodiments, eliminating the colloquial words from the target spoken text, eliminating the erroneous professional words in the target spoken text using the target professional words, and eliminating sentence segmentation errors from the target spoken text may include:

[0217] Each colloquial word, each incorrect professional word, each punctuation mark, and each punctuation insertion position in the target spoken text are respectively used as checkpoints;

[0218] For each checkpoint, using the fifth language model to score the target spoken text including the checkpoint and the candidate text eliminating the checkpoint;

[0219] Based on the scoring result, it is determined whether to eliminate the checkpoint from the target spoken text.

[0220] Among them, the scoring method and elimination method when the check points are colloquial words, incorrect professional words, punctuation marks or punctuation insertion positions can be referred to as described above, and will not be repeated here.

[0221] In some embodiments, for each checkpoint, using the fifth language model to score the target spoken text including the checkpoint and the text obtained by eliminating the checkpoint from the target spoken text may include:

[0222] Acquire at least one preceding spoken text of the target spoken text;

[0223] Using the target spoken text and the at least one preceding spoken text as texts to be processed;

[0224] For each checkpoint, the fifth language model is used to score the text to be processed including the checkpoint and the text obtained by eliminating the checkpoint from the text to be processed.

[0225] In addition, for a checkpoint with a punctuation error, there may be multiple candidate elimination methods, such as the candidate punctuation inserted at the punctuation insertion position and the candidate punctuation corresponding to the punctuation to be processed. If the fifth language model is used to score separately, there may be many candidate items. In order to improve efficiency, in some embodiments, for each checkpoint, using the fifth language model to score the target spoken text including the checkpoint and the candidate text to eliminate the checkpoint may include:

[0226] For each checkpoint, sort and screen multiple candidate elimination methods corresponding to each checkpoint to obtain a predetermined number of candidate elimination methods;

[0227] Using a fifth language model, scoring the target spoken text including the checkpoint and the text obtained by eliminating the checkpoints from the target spoken text according to the predetermined number of candidate elimination methods;

[0228] Based on the scoring result, the checkpoint is eliminated from the target spoken text in an optimal candidate elimination manner.

[0229] The multiple candidate elimination methods corresponding to each checkpoint are sorted and screened, and a predetermined number of candidate elimination methods can be obtained by using a beam search strategy.

[0230] The target spoken text is standardized by eliminating colloquial errors, punctuation errors and / or professional word errors, so that the standardized target spoken text can be obtained.

[0231] In some embodiments, the method may further include:

[0232] The specification text is output.

[0233] In addition, users can view the output standard text and modify any inaccurate conversions.

[0234] Therefore, in some embodiments, the method may further include:

[0235] An update operation for the standard text is received, and the standard text is updated.

[0236] Outputting the standard text may include sending the standard text to a display device to output the standard text on the display device.

[0237] Among them, the update operation on the standard text is also detected by the display device and fed back to the server.

[0238] In some embodiments, the method may further include:

[0239] The standard text is converted into target voice data.

[0240] That is, the standard text is converted into target voice data through TTS (Text To Speech) technology.

[0241] The target spoken recognition text can be obtained by performing speech recognition on spoken voice data, and the obtained standard text is then converted into target voice data, which can achieve the purpose of correcting spoken voice into written voice.

[0242] Optionally, the method may further include:

[0243] Play the target voice data.

[0244] In some scenarios, such as human-computer dialogue scenarios, telephone customer service scenarios, etc., the collected user input voice can be converted into text through voice recognition, and then converted into standard text in written form using the technical solution of the present application. The standard text can then be converted into voice data for playback, thereby achieving the purpose of outputting written voice, which is helpful for the dissemination and exchange of information.

[0245] In a practical application, the technical solution of the embodiment of the present application can be applied to a court trial scenario, and the target spoken text is any spoken text to be processed in the court trial speech recognition results.

[0246] Combination Figure 5 As shown in the schematic diagram, the target spoken text 501 can be obtained from the court trial speech recognition result. The court trial speech recognition result refers to the court trial speech recognition result obtained by using speech recognition technology.

[0247] In addition, in order to improve the accuracy of text processing, in addition to obtaining the target spoken text, at least one previous spoken text of the target spoken text of the trial speech recognition result can also be obtained. The trial speech result can be divided into multiple spoken texts, which are processed in chronological order.

[0248] In addition, the target spoken text can be preprocessed, such as word segmentation, part-of-speech tagging, etc., to facilitate subsequent processing.

[0249] For the target spoken text, a spoken language recognition model may be used to recognize colloquial words in the target spoken text 502;

[0250] The spoken language recognition model can be pre-trained based on the spoken language training text annotated with spoken language training words 503; the specific training method of the spoken language recognition model can be found in the above description and will not be repeated here.

[0251] In addition, for the target spoken text, the target spoken text may also be searched for erroneous professional words 504 that match the target professional words based on the professional word list.

[0252] Among them, the professional word list stores a large number of pre-configured professional words related to the trial, which can ensure the entity names involved in the trial and technical terms related to the trial such as legal terms.

[0253] If the professional word list contains entity nouns, it can also be obtained by mining the indictment, party information, evidence information, etc. related to the trial.

[0254] The specific process of searching for erroneous professional words that match the target professional words can be found in the above description.

[0255] In addition, for the target spoken text, sentence segmentation errors 505 in the target spoken text may also be identified.

[0256] After the colloquial words, incorrect professional words and punctuation errors in the target spoken text are determined, the target spoken text can be corrected to eliminate the colloquial errors, professional word errors and punctuation errors in the target spoken text, including: eliminating colloquial words 506 from the target spoken text; using target professional words to eliminate incorrect professional words 507; and punctuation errors 508 from the target spoken text.

[0257] The specific methods for eliminating spoken language errors, professional word errors, and punctuation errors can be seen in detail in the above description. The language model can be used to score each checkpoint, and based on the scoring results, it can be determined whether to eliminate the checkpoint or which method to use to eliminate the checkpoint.

[0258] By normalizing the target spoken text, a normalized text 509 can be obtained.

[0259] The standard text can be sent to a display device used by the clerk to output the standard text on the display device. At the same time, the trial speech recognition results can also be output on the display device to facilitate the clerk to compare. The clerk can also update the standard text to manually adjust the converted standard text.

[0260] Figure 6 A schematic diagram of a text processing device according to an embodiment of the present application is provided. The device may include:

[0261] A text acquisition module 601 is used to acquire a target spoken text;

[0262] A spoken language error recognition module 602, configured to recognize colloquial words in the target spoken language text using a spoken language recognition model;

[0263] The spoken language error elimination module 603 is used to eliminate the colloquial words from the target spoken language text to obtain a standard text.

[0264] The spoken language recognition model can be obtained by training a spoken language training text marked with spoken language training words.

[0265] In some embodiments, the apparatus may further include:

[0266] A model pre-training module is used to obtain a spoken language training text; determine at least one colloquial training word in the spoken language training text and the colloquial type of the at least one colloquial training word; for each single word in the spoken language training text, set a training label for each single word according to the colloquial type of the colloquial training word composed of the single word and whether the single word is a starting word, a middle word, an ending word, a single word or a component word that does not belong to any colloquial type in the colloquial word composed of the single word; and train a spoken language recognition model using the spoken language training text and the training labels of the individual words in the spoken language training text.

[0267] In some embodiments, the model pre-training module sets a training label for each word in the spoken training text according to the spoken type of the spoken training word constituted by the word and whether the word is a starting word, a middle word, an ending word, a single word, or a constituent word that does not belong to any spoken type in the spoken word constituted by the word, including: setting a training label for each word in the spoken training text according to the text position of the word in the spoken training text, the spoken type of the spoken training word constituted by the word and whether the word is a starting word, a middle word, an ending word, a single word, or a constituent word that does not belong to any spoken type in the spoken word constituted by the word.

[0268] In some embodiments, the model pre-training module uses the spoken language training text and the training labels of each word in the spoken language training text, and training the spoken language recognition model includes: converting each word in the spoken language training text into a word vector; using the word vector of each word in the spoken language training text as model input and the training label of each word as model output, to train the spoken language recognition model.

[0269] In some embodiments, the spoken language recognition model includes an input layer, a bidirectional long short-term memory network LSTM layer, a conditional random field CRF layer and an output layer.

[0270] In some embodiments, the spoken language error recognition module is specifically used to use the spoken language recognition model to identify the target label of each word in the target spoken text; based on the target label of each word, determine the colloquial words in the target spoken text.

[0271] In some embodiments, the spoken error recognition module is specifically used to convert each word of the target spoken text into a word vector; input the word vector of each word of the target spoken text into the spoken recognition model to obtain a target label for each word in the target spoken text; and determine the colloquial words in the target spoken text based on the target labels of different words.

[0272] In some embodiments, the spoken error elimination module is specifically used to score the target spoken text including the colloquial word and the text obtained by deleting the colloquial word from the target spoken text using a first language model; wherein the first language model is obtained based on standard written text training; based on the scoring result, determine whether to delete the colloquial word from the target spoken text.

[0273] In some embodiments, the text acquisition module is further used to acquire at least one preceding spoken text of the target spoken text; and use the target spoken text and the at least one preceding spoken text as texts to be processed;

[0274] The spoken error elimination module is specifically used to score the text to be processed including the colloquial word and the text obtained by deleting the colloquial word from the text to be processed using the first language model; based on the scoring results, determine whether to delete the colloquial word from the target spoken text.

[0275] In some embodiments, the spoken language error recognition module is specifically used to recognize the colloquial words in the target spoken text and the colloquial types of the colloquial words using the spoken language recognition model; wherein the colloquial types include modal particles, colloquial expression words, pause words, repeated words or corrected words;

[0276] The spoken error elimination module is specifically used for deleting the colloquial word from the target spoken text if the colloquial word is a non-modal particle type; if the colloquial word is a modal particle type, scoring the target spoken text including the colloquial word and the text obtained by deleting the colloquial word from the target spoken text using a first language model respectively; wherein the first language model is obtained based on training of a first standard written text; and determining whether to delete the colloquial word from the target spoken text based on the scoring result.

[0277] In some embodiments, the apparatus may further include:

[0278] A professional word error recognition module, used for searching for an erroneous professional word matching a target professional word in the target spoken text based on a professional word list;

[0279] The professional word error elimination module is used to eliminate the erroneous professional words in the target spoken text by using the target professional words.

[0280] In some embodiments, the professional word error elimination module is specifically configured to replace the erroneous professional word in the target spoken text with the target professional word.

[0281] In some embodiments, the professional word error elimination module is specifically used to use a second language model to score the target spoken text including the erroneous professional word and the text obtained by replacing the erroneous professional word in the target spoken text with the target professional word; wherein the second language model is obtained based on a second standard written text training; based on the scoring result, determine whether to replace the erroneous professional word with the target professional word.

[0282] In some embodiments, the professional word error recognition module is specifically used to use each professional word in the professional word list to search in the target spoken text to find erroneous professional words that meet similar conditions with any professional word; wherein any professional word that meets similar conditions with the erroneous professional word is used as the target professional word.

[0283] In some embodiments, the professional word error recognition module is specifically used to convert the target spoken text into a pinyin sequence;

[0284] Using the pinyin sequence of each professional word in the professional word list, a search is performed in the target spoken text to find an erroneous professional word corresponding to a candidate pinyin sequence that meets similar conditions to the pinyin sequence of any professional word.

[0285] In some embodiments, the apparatus may further include:

[0286] The sentence segmentation error elimination module is used to eliminate sentence segmentation errors from the target spoken text.

[0287] In some embodiments, the sentence segmentation error elimination module is specifically used to score, for each punctuation mark to be processed in the target spoken text, the target spoken text including the punctuation mark to be processed and different texts obtained by replacing the punctuation mark to be processed in the target spoken text with different candidate punctuation marks, using a third language model; wherein the third language model is obtained by training with a third standard written text; and based on the scoring result, the optimal punctuation mark is selected to replace the punctuation mark to be processed.

[0288] In some embodiments, the sentence segmentation error elimination module is specifically used to determine the punctuation insertion position where punctuation marks need to be inserted in the target spoken text; for each insertion position, different texts obtained by inserting different candidate punctuation marks are scored using a fourth language model; wherein the fourth language model is obtained by training with a fourth standard written text; based on the scoring result, the optimal candidate punctuation mark is selected to be added to the punctuation insertion position.

[0289] In some embodiments, the spoken error elimination module is specifically used to eliminate the colloquial words from the target spoken text, eliminate the erroneous professional words in the target spoken text using the target professional words, and eliminate sentence segmentation errors from the target spoken text.

[0290] In some embodiments, the spoken error elimination module is specifically used to use each colloquial word, each erroneous professional word, each punctuation mark, and each punctuation insertion position in the target spoken text as a checkpoint; for each checkpoint, using the fifth language model to score the target spoken text including the checkpoint and the text obtained by eliminating the checkpoint from the target spoken text; based on the scoring result, determine whether to eliminate the checkpoint from the target spoken text.

[0291] In some embodiments, the spoken error elimination module, for each checkpoint, uses the fifth language model to score the target spoken text including the checkpoint and the text obtained by eliminating the checkpoint from the target spoken text, including: obtaining at least one preceding spoken text of the target spoken text; using the target spoken text and the at least one preceding spoken text as texts to be processed; for each checkpoint, uses the fifth language model to score the text to be processed including the checkpoint and the text obtained by eliminating the checkpoint from the text to be processed.

[0292] In some embodiments, the text acquisition module is specifically used to acquire the target spoken text to be processed from the speech recognition result.

[0293] In some embodiments, the apparatus may further include:

[0294] A text output module, used for outputting the standard text;

[0295] The text updating module is used to receive an update operation for the standard text and update the standard text.

[0296] In some embodiments, the apparatus may further include:

[0297] The text conversion module is used to convert the standard text into target voice data.

[0298] Figure 6 The text processing device can execute Figure 1 The implementation principle and technical effect of the text processing method described in the illustrated embodiment will not be described in detail. The specific manner in which each module and unit performs operations in the text processing device in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.

[0299] In one possible design, Figure 6 The text processing apparatus of the embodiment shown can be implemented as a computing device, such as Figure 7 As shown, the computing device may include a storage component 701 and a processing component 702;

[0300] The storage component 701 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 702 .

[0301] The processing component 702 is used to:

[0302] Obtain the target spoken text;

[0303] Using a spoken language recognition model to recognize colloquial words in the target spoken text;

[0304] The colloquial words are eliminated from the target spoken text to obtain a standardized text.

[0305] The spoken language recognition model can be obtained by training a spoken language training text marked with spoken language training words.

[0306] The processing component 702 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0307] The storage component 701 is configured to store various types of data to support operations in the computing device. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0308] Of course, a computing device may also include other components, such as input / output interfaces, communication components, etc.

[0309] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.

[0310] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.

[0311] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic service resources rented or purchased from the cloud computing platform.

[0312] In addition, the present application also provides a computer-readable storage medium storing a computer program, which can achieve the above-mentioned Figure 1 The text processing method of the illustrated embodiment.

[0313] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0314] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0315] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0316] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A text processing method, characterized in that: include: Obtain the target spoken text; Using a spoken language recognition model to recognize colloquial words in the target spoken text, wherein the colloquial words are determined based on target labels of different words by converting each word of the target spoken text into a word vector and inputting the word vector of each word of the target spoken text into the spoken language recognition model to obtain a target label of each word in the target spoken text; Eliminating the colloquial words from the target spoken text to obtain a standardized text; Among them, the spoken language recognition model is trained using spoken language training text and the training labels of each single word in the spoken language training text. The training label of each single word is set according to the spoken type of the spoken training word composed of the single word and the single word is the starting word, middle word, ending word, single word or constituent word that does not belong to any spoken type in the spoken word composed of it.

2. The method according to claim 1, characterized in that: The spoken language recognition model is obtained by training based on spoken language training texts marked with spoken language training words.

3. The method according to claim 2, characterized in that The spoken language recognition model is trained in the following manner: Get oral training text; Determining at least one spoken language training word in the spoken language training text and a spoken language type of the at least one spoken language training word; For each word in the spoken language training text, a training label for each word is set according to the spoken language type of the spoken language training word constituted by the word and whether the word is a starting word, a middle word, an ending word, a word or a constituent word not belonging to any spoken language type in the spoken language word constituted by the word; The spoken language training text and the training labels of the individual words in the spoken language training text are used to train a spoken language recognition model.

4. The method according to claim 3, characterized in that For each word in the spoken language training text, setting a training label for each word according to the spoken type of the spoken training word formed by the word and the word being the starting word, middle word, end word, word or constituent word not belonging to any spoken type in the spoken word formed by the word comprises: For each single word in the spoken training text, a training label for each single word is set according to the text position of the single word in the spoken training text, the spoken type of the spoken training word constituted by the single word, and whether the single word is a starting word, a middle word, an ending word, a single word, or a constituent word that does not belong to any spoken type in the spoken word constituted by the single word.

5. The method according to claim 3, characterized in that: The training of the spoken language recognition model using the spoken language training text and the training labels of each word in the spoken language training text comprises: Convert each word of the spoken training text into a word vector; The spoken language recognition model is trained by using the word vector of each word in the spoken language training text as a model input and the training label of each word as a model output.

6. The method according to claim 5, characterized in that The spoken language recognition model includes an input layer, a bidirectional long short-term memory network LSTM layer, a conditional random field CRF layer and an output layer.

7. The method according to claim 3 or 4, characterized in that: The using the spoken language recognition model to recognize the colloquial words in the target spoken language text comprises: Using the spoken language recognition model to identify target labels for each word in the target spoken language text; Based on the target tags of the individual characters, colloquial words in the target spoken text are determined.

8. The method according to claim 5, characterized in that The step of recognizing the colloquial words of the target spoken text by using the spoken language recognition model comprises: Convert each word of the target spoken text into a word vector; Inputting the word vector of each word in the target spoken text into the spoken language recognition model to obtain a target label for each word in the target spoken text; Based on target labels of different words, colloquial words in the target spoken text are determined.

9. The method according to claim 1, characterized in that: The step of eliminating the colloquial words from the target spoken text comprises: Scoring the target spoken text including the colloquial word and the text obtained by deleting the colloquial word from the target spoken text using a first language model, wherein the first language model is obtained based on standard written text training; Based on the scoring result, it is determined whether to delete the colloquial word from the target spoken text.

10. The method according to claim 1, characterized in that Also includes: Acquire at least one preceding spoken text of the target spoken text; Using the target spoken text and the at least one preceding spoken text as texts to be processed; The step of eliminating the colloquial words from the target spoken text comprises: Scoring the text to be processed including the colloquial word and the text obtained by deleting the colloquial word from the text to be processed respectively using the first language model; Based on the scoring result, it is determined whether to delete the colloquial word from the target spoken text.

11. The method according to claim 1, characterized in that: The method of using the spoken language recognition model to recognize the colloquial words in the target spoken language text includes: Using a spoken language recognition model to identify colloquial words in the target spoken text and the colloquial types of the colloquial words; wherein the colloquial types include modal particles, colloquial expression words, pause words, repeated words or corrected words; The step of eliminating the colloquial words from the target spoken text comprises: If the colloquial word is a non-modal particle type, deleting the colloquial word from the target spoken text; If the colloquial word is a modal particle type, scoring the target spoken text including the colloquial word and the text obtained by deleting the colloquial word from the target spoken text respectively using a first language model; wherein the first language model is obtained by training based on a first standard written text; Based on the scoring result, it is determined whether to delete the colloquial word from the target spoken text.

12. The method according to claim 1, characterized in that Also includes: Based on the professional word list, searching for incorrect professional words in the target spoken text that match the target professional words; The target professional words are used to eliminate the erroneous professional words in the target spoken text.

13. The method according to claim 12, characterized in that The using the target professional words to eliminate the erroneous professional words in the target spoken text comprises: The target professional words are used to replace the incorrect professional words in the target spoken text.

14. The method according to claim 13, characterized in that The using the target professional word to replace the erroneous professional word in the target spoken text comprises: Using a second language model, scoring the target spoken text including the erroneous professional word and the text obtained by replacing the erroneous professional word in the target spoken text with the target professional word, respectively; wherein the second language model is obtained based on a second standard written text training; Based on the scoring result, it is determined whether to use the target professional word to replace the erroneous professional word.

15. The method according to claim 12, characterized in that The searching for incorrect professional words matching the target professional words in the target spoken text based on the professional word list includes: Using each professional word in the professional word list, a search is performed in the target spoken text to find an erroneous professional word that meets similar conditions to any professional word; wherein any professional word that meets similar conditions to the erroneous professional word is used as a target professional word.

16. The method according to claim 15, characterized in that The method of using each professional word in the professional word list to search in the target spoken text to find the wrong professional word that meets the similarity condition with any professional word includes: Converting the target spoken text into a phonetic sequence; Using the pinyin sequence of each professional word in the professional word list, a search is performed in the target spoken text to find an erroneous professional word corresponding to a candidate pinyin sequence that meets similar conditions to the pinyin sequence of any professional word.

17. The method according to claim 1 or 12, characterized in that: include: Sentence segmentation errors are eliminated from the target spoken text.

18. The method according to claim 17, characterized in that The step of eliminating sentence segmentation errors from the target spoken text comprises: For each punctuation mark to be processed in the target spoken text, using a third language model to score the target spoken text including the punctuation mark to be processed and different texts obtained by replacing the punctuation mark to be processed in the target spoken text with different candidate punctuation marks; wherein the third language model is obtained by training with a third standard written text; Based on the scoring results, the optimal punctuation mark is selected to replace the punctuation mark to be processed.

19. The method according to claim 17, characterized in that The step of eliminating sentence segmentation errors from the target spoken text comprises: Determine the punctuation insertion positions where punctuation marks need to be inserted in the target spoken text; Using a fourth language model to score different texts obtained by inserting different candidate punctuation marks at each insertion position; wherein the fourth language model is obtained by training with a fourth standard written text; Based on the scoring results, the best candidate punctuation mark is selected and added to the punctuation insertion position.

20. The method according to claim 1, characterized in that Also includes: Based on the professional word list, searching for incorrect professional words in the target spoken text that match the target professional words; The step of eliminating the colloquial words from the target spoken text comprises: The colloquial words are eliminated from the target spoken text, the erroneous professional words in the target spoken text are eliminated using the target professional words, and sentence segmentation errors are eliminated from the target spoken text.

21. The method according to claim 20, characterized in that The step of eliminating the colloquial words from the target spoken text, eliminating the erroneous professional words in the target spoken text by using the target professional words, and eliminating sentence segmentation errors from the target spoken text includes: Each colloquial word, each incorrect professional word, each punctuation mark, and each punctuation insertion position in the target spoken text are respectively used as checkpoints; For each checkpoint, using a fifth language model to score the target spoken text including the checkpoint and the text obtained by eliminating the checkpoint from the target spoken text; Based on the scoring result, it is determined whether to eliminate the checkpoint from the target spoken text.

22. The method according to claim 21, characterized in that For each checkpoint, using the fifth language model to score the target spoken text including the checkpoint and the text obtained by eliminating the checkpoint from the target spoken text includes: Acquire at least one preceding spoken text of the target spoken text; Using the target spoken text and the at least one preceding spoken text as texts to be processed; For each checkpoint, the fifth language model is used to score the text to be processed including the checkpoint and the text obtained by eliminating the checkpoint from the text to be processed.

23. The method according to claim 1, characterized in that The acquiring of the target spoken text comprises: Get the target spoken text to be processed from the speech recognition result.

24. The method according to claim 1, characterized in that Also includes: Outputting the standard text; An update operation for the standard text is received, and the standard text is updated.

25. The method according to claim 1, characterized in that Also includes: The standard text is converted into target voice data.

26. A text processing device, characterized in that: include: A text acquisition module, used to acquire the target spoken text; A spoken language error recognition module, used for recognizing colloquial words in the target spoken text by using a spoken language recognition model, wherein the colloquial words are determined based on target labels of different words by converting each word of the target spoken text into a word vector and inputting the word vector of each word of the target spoken text into the spoken language recognition model to obtain a target label of each word in the target spoken text; A spoken language error elimination module, used to eliminate the colloquial words from the target spoken language text to obtain a standard text; Among them, the spoken language recognition model is trained using spoken language training text and the training labels of each single word in the spoken language training text. The training label of each single word is set according to the spoken type of the spoken training word composed of the single word and the single word is the starting word, middle word, ending word, single word or constituent word that does not belong to any spoken type in the spoken word composed of it.

27. A computing device, characterized in that including a processing component and a storage component; The storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component; The processing component is used to: Obtain the target spoken text; Using a spoken language recognition model to recognize colloquial words in the target spoken text, wherein the colloquial words are determined based on target labels of different words by converting each word of the target spoken text into a word vector and inputting the word vector of each word of the target spoken text into the spoken language recognition model to obtain a target label of each word in the target spoken text; Eliminating the colloquial words from the target spoken text to obtain a standardized text; Among them, the spoken language recognition model is trained using spoken language training text and the training labels of each single word in the spoken language training text. The training label of each single word is set according to the spoken type of the spoken training word composed of the single word and the single word is the starting word, middle word, ending word, single word or constituent word that does not belong to any spoken type in the spoken word composed of it.