WO2022105083A1 - 文本纠错方法、装置、设备及介质 - Google Patents
文本纠错方法、装置、设备及介质 Download PDFInfo
- Publication number
- WO2022105083A1 WO2022105083A1 PCT/CN2021/084546 CN2021084546W WO2022105083A1 WO 2022105083 A1 WO2022105083 A1 WO 2022105083A1 CN 2021084546 W CN2021084546 W CN 2021084546W WO 2022105083 A1 WO2022105083 A1 WO 2022105083A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- word
- replacement
- text
- candidate
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/232—Orthographic correction, e.g. spell checking or vowelisation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/226—Validation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/237—Lexical tools
- G06F40/242—Dictionaries
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Definitions
- the present application relates to the technical field of artificial intelligence, and in particular, to a text error correction method, apparatus, device and medium.
- Text error correction refers to the automatic identification and correction of problems in the use of natural language, such as word errors (pain points are written as common points), grammatical errors (the ground must be mixed), word collocation errors (aided decision-making) Written as support for decision-making), multiple words, missing words, etc.
- the inventor realizes that the existing error correction technologies are mostly combined with the rule engine for specific scenarios, but relying only on the rule engine will result in limited coverage of the text error correction model, which cannot be handled for errors other than rules, and the rule engine will also easily cause problems. misjudgment.
- the error correction technology in the prior art only relies on the rule engine, which results in limited coverage of the text error correction model, and cannot handle errors other than the rules. Meanwhile, the rule engine can easily cause technical problems of misjudgment.
- the main purpose of this application is to provide a text error correction method, device, equipment and medium, which aims to solve the problem that the error correction technology of the prior art only relies on the rule engine, resulting in limited coverage of the text error correction model. It cannot be handled, and the rule engine will easily cause technical problems of misjudgment.
- the present application proposes a text error correction method, the method includes:
- a target candidate replacement sentence is determined.
- the present application also proposes a text error correction device, the device comprising:
- the engine error correction module is used to obtain the text to be corrected, input the text to be corrected into the error correction rule engine for error correction processing, and obtain the text corrected by the engine;
- the first potential wrong word data determination module is used to obtain a target dictionary, and according to the target dictionary, the text after error correction by the engine is subjected to word segmentation and wrong word judgment to obtain the first potential wrong word data;
- the second potential error word data determination module is used for inputting the error-corrected text of the engine into the pre-training model for replacement probability prediction, obtaining a replacement probability prediction result, and determining the second potential error word according to the replacement probability prediction result. word data;
- a candidate replacement sentence determination module to be scored is used to determine candidate replacement sentences according to the text after error correction by the engine, the first potential wrong word data and the second potential wrong word data, and obtain a plurality of to be scored. candidate replacement sentence;
- the candidate replacement sentence scoring result determination module is used for inputting each candidate replacement sentence to be scored into the statistical language model to score the candidate replacement sentence, and obtain a plurality of candidate replacement sentence scoring results;
- the target candidate replacement sentence determination module is configured to determine the target candidate replacement sentence according to the scoring results of the plurality of candidate replacement sentences.
- the present application also proposes a computer device, including a memory and a processor, the memory stores a computer program, and the processor implements the following method steps when executing the computer program:
- a target candidate replacement sentence is determined.
- the present application also proposes a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following method steps are implemented:
- a target candidate replacement sentence is determined.
- a text error correction method, device, device and medium of the present application by using a rule engine, a target dictionary and a pre-training model in the error detection stage to improve the possibility of error location identification, realizes the error conditions within the rules and outside the rules.
- the error correction stage according to the text after the engine error correction, the first potential wrong word data and the second potential wrong word data to determine the candidate replacement sentence to obtain a plurality of candidate replacement sentences to be scored , and then combined with the statistical language model to judge the reasonableness of the replacement word in the candidate replacement sentence, reducing the misjudgment caused by the error detection stage, thereby improving the accuracy of text error correction.
- FIG. 1 is a schematic flowchart of a text error correction method according to an embodiment of the application.
- FIG. 2 is a schematic structural block diagram of a text error correction apparatus according to an embodiment of the present application.
- FIG. 3 is a schematic structural block diagram of a computer device according to an embodiment of the present application.
- An error correction method uses an error correction rule engine for error correction, then uses a dictionary to find out the first potential wrong word data and uses a pre-training model to determine the second potential wrong word data, and then uses the first potential wrong word data according to the first potential error.
- the word data and the second potential error word data determine candidate replacement sentences, score the candidate replacement sentences, and determine the text error correction result according to the score, which realizes the identification of errors within and outside the rules, thereby improving coverage. Improves the accuracy of text error correction.
- an embodiment of the present application provides a text error correction method, the method includes:
- S2 Obtain a target dictionary, perform word segmentation and wrong word judgment on the text after error correction by the engine according to the target dictionary, and obtain first potential wrong word data;
- S4 Determine candidate replacement sentences according to the error-corrected text of the engine, the first potential wrong word data and the second potential wrong word data, and obtain a plurality of candidate replacement sentences to be scored;
- S6 Determine a target candidate replacement sentence according to the scoring results of the plurality of candidate replacement sentences.
- the target dictionary and the pre-training model in the error detection stage to improve the possibility of identifying the wrong position, it realizes the identification of the error conditions within the rules and outside the rules, thereby improving the coverage; in the error correction stage , according to the text corrected by the engine, the data of the first potential wrong words and the data of the second potential wrong words to determine the candidate replacement sentences to obtain a plurality of candidate replacement sentences to be scored, and then combine the statistical language model to determine whether the replacement word is in the candidate replacement sentence
- the reasonable degree of existence in the sentence reduces the misjudgment caused by the error detection stage, thereby improving the accuracy of text error correction.
- the text to be corrected may be obtained from the database, the text to be corrected entered by the user, or the text to be corrected sent by other application systems.
- the text to be corrected is the text that needs to be corrected for text errors.
- the text to be corrected is input into the error correction rule engine to perform error word recognition and error word replacement to obtain the text corrected by the engine.
- the error correction rule engine is a model obtained by training the neural network with general corpus, wherein the general corpus includes but is not limited to: Wikipedia Chinese corpus and People's Daily Chinese corpus.
- the language category of the text to be corrected is the same as that of the corpus for training the error correction rule engine.
- the error correction rule engine obtained by training the neural network is expected to be used in Chinese to perform error word recognition and error word replacement on the Chinese text to be corrected, which is not specifically limited in this example.
- the target dictionary can be obtained from the database, the target dictionary input by the user, or the target dictionary sent by other application systems.
- the target dictionary includes at least one word.
- the word segmentation is performed on the text after error correction by the engine, and the target dictionary is used to judge the wrong word in the word segmentation result, and the words judged to be wrong words are placed in a set to obtain the first potential wrong word data. That is, the first potentially misused word data is a set.
- the replacement probability prediction result includes at least one replacement probability prediction value.
- the second potential wrong word data is determined.
- the pre-training model can be selected from the existing technology, or it can be a model obtained by training a neural network.
- the text after error correction by the engine has the same language category as the text on which the pre-trained model is trained.
- the pre-training model obtained by training the neural network with Chinese text is used to predict the replacement probability of the Chinese text after the engine error correction, which is not specifically limited by this example.
- step S2 and step S3 may also be performed synchronously, and may also be performed asynchronously in the order of step S3 and step S2, which is not specifically limited herein.
- a candidate word is determined according to the first potential wrong word data and the second potential wrong word data, and then a candidate replacement sentence is determined according to the candidate word and the text corrected by the engine, to obtain multiple Candidate replacement sentences to be scored. All possible replacement sentence combinations are included in the multiple candidate replacement sentences to be scored.
- each candidate replacement sentence to be scored is input into the statistical language model for candidate replacement sentence scoring, that is, each candidate replacement sentence to be scored corresponds to a candidate replacement sentence scoring result.
- the statistical language model can be selected from the prior art, or it can be a model obtained by training a neural network.
- the candidate replacement sentence to be scored is of the same language category as the text of the statistical language model.
- a statistical language model obtained by training a neural network with Chinese text is used to score candidate replacement sentences in Chinese for the candidate replacement sentences to be scored, which is not specifically limited by this example.
- the candidate replacement sentence corresponding to the candidate replacement sentence scoring result with the largest score value is extracted from the multiple candidate replacement sentence scoring results as the target candidate replacement sentence.
- the scoring results of the multiple candidate replacement sentences are: candidate replacement sentence B has a score of 80, candidate replacement sentence A has a score of 70, candidate replacement sentence D has a score of 60, and candidate replacement sentence B has a score of 80, which is the maximum score. value, then the candidate replacement sentence B corresponding to 80 points is used as the target candidate replacement sentence, which is not specifically limited in this example.
- the above step of acquiring the target dictionary it includes:
- S022 Perform word segmentation on the multiple business scene text samples to obtain a word set to be counted
- S023 perform word frequency statistics on each word in the set of words to be counted to obtain a plurality of word frequencies to be analyzed;
- S027 Use the new word discovery algorithm of inter-point mutual information and left and right entropy to perform new word mining on the multiple business scene text samples to obtain business scene new word data;
- S029 Determine the target dictionary according to the business scenario common word data, the business scenario new word data, the business scenario specific word data, and the general scenario common word data.
- the target dictionary is determined according to the business scenario common word data, the business scenario new word data, the business scenario specific word data, and the general scenario common word data, so that the target dictionary covers the general scenario , various related terms and professional terms of business scenarios, so as to improve the possibility of error location identification through the target dictionary in the error detection stage, thereby improving the coverage.
- multiple business scenario text samples may be obtained from the database, multiple business scenario text samples input by the user, or multiple business scenario text samples sent by other application systems.
- the business scenario text sample is the text data used in the business scenario.
- word segmentation is performed on the plurality of business scene text samples, and the words obtained by the segmentation are placed in a set to obtain a word set to be counted.
- the number of occurrences of each word in the set of words to be counted is calculated respectively to obtain a plurality of target occurrence times; the total number of words in the set of words to be counted is obtained to obtain the total number of target words; The number of occurrences of the target is divided by the total number of the target words to obtain the word frequencies of a plurality of words to be analyzed. That is, each word in the word set to be counted corresponds to a word frequency of the word to be analyzed.
- the word frequency to be analyzed is the word frequency that needs to be analyzed.
- the word frequency threshold may be obtained from the database, or may be the word frequency threshold input by the user, or may be the word frequency threshold sent by other application systems.
- the word frequency threshold is a specific value from 0 to 1.
- Words are used as data of common words in business scenarios, which is beneficial to improve the accuracy of data of common words in business scenarios.
- the new word discovery algorithm using the inter-point mutual information and left and right entropy is used to perform new word mining on the multiple business scene text samples, and the steps of obtaining business scene new word data include:
- S0271 Generate an n_gram (probability-based discriminant model) dictionary according to the multiple business scene text samples;
- the method for generating the n_gram dictionary according to the plurality of business scene text samples can be selected from the prior art, and details are not described here.
- S0272 adopt the mutual information method between points to screen out alternative new words from the n_gram dictionary to obtain new word data to be selected;
- the method for selecting alternative new words from the n_gram dictionary using the point-to-point mutual information method may be selected from the prior art, which will not be repeated here.
- S0273 Use the left and right entropy method to select new words from the to-be-selected new word data to obtain business scene new word data.
- the method for selecting new words from the to-be-selected new word data by using the left and right entropy method may be selected from the prior art, which will not be repeated here.
- the business scenario specific word data may be obtained from the database, the business scenario specific word data input by the user, or the business scenario specific word data sent by other application systems.
- the data of common words in common scenes can be obtained from the database, or the data of common words in common scenes input by the user, or the data of common words in common scenes sent by other application systems.
- the business scenario-specific word data are words formed by the characteristics of the business scenario.
- the internal vision of the organization is "prophet, foresight, first”
- "prophet, foresight, first” can be used as a specific word for business scenarios, and there is no specific limitation in this example.
- the data of common words in general scenes is the words that are often used in most scenes.
- the business scenario common word data, the business scenario new word data, the business scenario specific word data, and the general scenario common word data are put into a set, and the obtained set is used as the target dictionary. That is to say, the target dictionary covers various related terms and professional terms in general scenarios and business scenarios.
- the above-mentioned steps of performing word segmentation and erroneous word judgment on the text after error correction by the engine according to the target dictionary to obtain the first potential erroneous word data include:
- This embodiment realizes the judgment of wrong words according to the target dictionary, because the target dictionary covers various related terms and professional terms in general scenarios and business scenarios, thereby improving the possibility of identifying wrong positions, thereby improving the first potential error. Coverage of word data.
- word segmentation is performed on the text after error correction by the engine, and the word obtained by the segmentation is used as the word to be determined.
- a word to be determined refers to a word that needs to be determined whether it is a wrong word.
- each of the multiple to-be-determined words is searched in the target dictionary, and when the same word is found in the target dictionary, it means that the to-be-determined word is a correct word, When the same word cannot be found in the target dictionary, it means that the to-be-determined word is a wrong word, and at this time, it is determined that the to-be-determined word does not exist in the target dictionary.
- the steps include:
- training samples include: training text sample data and training text sample calibration data;
- S032 inputting the training text sample data into the generator to be trained to perform word replacement to obtain replacement sample sentences;
- S033 Input the replacement sample sentence into the discriminator to be trained to perform replacement probability prediction, and obtain the replacement probability sample predicted value, wherein the discriminator to be trained adopts the Discriminator of Electra;
- the discriminator to be trained in this example adopts Electra (Efficiently Learning an Encoder that Classifies Token Replacement Accurately) Discriminator, Electra relative to Bert (Bidirectional Encoder Representations from Transformers, pre-trained language representation model) to predict the correct value of the Mask, and Electra to predict whether the Token has been replaced, thereby improving the training efficiency; by using the trained discriminator as the A pretrained model so that the pretrained model can predict the probability of each replacement.
- multiple training samples may be obtained from a database, multiple training samples input by a user, or multiple training samples sent by other application systems.
- Each of the training samples includes a training text sample data and a training text sample calibration data
- the training text sample calibration data is a calibration value for each word in the training text sample data to be replaced.
- the training text sample data is text data.
- the training text sample calibration data is a one-dimensional vector, and each vector element represents the calibration value of a replaced word in the training text sample data.
- the generator to be trained adopts the Generator model.
- the training text sample data is randomly selected to set [MASK], and then input to the Generator model, and the Generator model is responsible for turning [MASK] into a replaced word.
- the Generator model tries to predict the correct word like Bert does.
- S033 Input the replacement sample sentence into the discriminator to be trained to perform replacement probability prediction, and obtain a replacement probability sample predicted value, that is, each replacement sample sentence corresponds to a replacement probability sample predicted value.
- the Discriminator predicts whether the word at each position in the replacement sample sentence has been replaced.
- the generator to be trained and the discriminator to be trained are trained according to the predicted value of the replacement probability sample and the calibration data of the training text sample, and the trained discriminator to be trained is trained
- the steps of the pre-training model include:
- S0341 Input the predicted value of the replacement probability sample and the calibration data of the training text sample into a loss function for calculation to obtain a target loss value, and update the parameters of the generator to be trained and the to-be-trained generator according to the target loss value
- the parameters of the discriminator, the updated generator to be trained and the discriminator to be trained are used to calculate the predicted value of the replacement probability sample next time;
- the first convergence condition means that the size of the target loss value calculated twice adjacently satisfies the Lipschitz condition (the Lipschitz continuity condition).
- the number of iterations refers to the number of times that the generator to be trained and the discriminator to be trained are used to calculate the predicted value of the replacement probability sample, that is, the number of iterations increases by 1 for one calculation.
- the second convergence condition is a preset number of times.
- the loss function can be selected from the prior art, and details are not described here.
- the above-mentioned step of determining the second potential wrong word data according to the replacement probability prediction result includes:
- the word corresponding to the value greater than the replacement probability threshold in the replacement probability prediction result is used as the second potential wrong word data, thereby reducing misjudgments and improving the accuracy of the second potential wrong word data. accuracy.
- the replacement probability threshold may be obtained from the database, or may be the replacement probability threshold input by the user, or may be the replacement probability threshold sent by other application systems.
- the replacement probability threshold which is a specific value from 0 to 1.
- a replacement probability prediction value greater than the replacement probability threshold is extracted from all replacement probability prediction values of the replacement probability prediction result, and the found replacement probability prediction value is used as the target replacement probability prediction data. That is to say, the target replacement probability prediction data can have one value, multiple values, or zero values.
- the words corresponding to the target replacement probability prediction data are put into a set to obtain the second potential wrong word data.
- the above-mentioned determination of candidate replacement sentences according to the text after error correction by the engine, the first potential wrong word data and the second potential wrong word data, to obtain a plurality of candidate replacement sentences to be scored steps including:
- candidate replacement sentences are determined by using the text corrected by the engine, the first potential wrong word data, and the second potential wrong word data, thereby providing a data basis for scoring the candidate replacement sentences.
- a dictionary of homophones and homographs can be obtained from a database, or a dictionary of homophones and homographs input by a user, or a dictionary of homophones and homographs sent by other application systems.
- the homophone and homograph dictionary includes: homophone sub-dictionary and homophone sub-dictionary.
- the homophone sub-dictionary includes: words before the first replacement and words after the first replacement, and the words before the first replacement and the words after the first replacement have the same pronunciation.
- the homograph sub-dictionary includes: words before the second replacement and words after the second replacement, and the words before the second replacement and the words after the second replacement have similar glyphs.
- the candidate words in the candidate word set are randomly combined, and each combination is grouped as a candidate word. It can be understood that the multiple candidate word groups cover all possible groupings of the candidate words in the candidate word set.
- each candidate word is grouped to replace the text after error correction by the engine, so as to obtain candidate replacement sentences to be scored. That is, each candidate word group corresponds to a candidate replacement sentence to be scored.
- Candidate replacement sentences to be scored refer to candidate replacement sentences that need to be scored.
- a dictionary of homophones and homographs other than the dictionary of homophones and homographs may be used to perform candidate word matching to determine a candidate word set, which is not specifically limited herein.
- the above-mentioned step of determining the target candidate replacement sentence according to the scoring results of the plurality of candidate replacement sentences includes:
- This embodiment realizes that the candidate replacement sentence scoring result corresponding to the maximum value among the multiple candidate replacement sentence scoring results is used as the target candidate replacement sentence scoring result, and the candidate replacement sentence corresponding to the target candidate replacement sentence scoring result is used as the target candidate replacement sentence scoring result. the target candidate replacement sentence, thereby further improving the accuracy of the determined target candidate replacement sentence.
- the present application also proposes a text error correction device, the device includes:
- the engine error correction module 100 is used to obtain the text to be corrected, input the text to be corrected into the error correction rule engine for error correction processing, and obtain the text corrected by the engine;
- the first potential wrong word data determination module 200 is used to obtain a target dictionary, and according to the target dictionary, the text after error correction by the engine is subjected to word segmentation and wrong word judgment, to obtain the first potential wrong word data;
- the second potential error word data determination module 300 is configured to input the text corrected by the engine into the pre-training model for replacement probability prediction, obtain a replacement probability prediction result, and determine the second potential error according to the replacement probability prediction result word data;
- the candidate replacement sentence determination module 400 to be scored is configured to determine candidate replacement sentences according to the text after error correction by the engine, the first potential wrong word data and the second potential wrong word data, and obtain a plurality of candidate replacement sentences.
- candidate replacement sentences for scoring are configured to determine candidate replacement sentences according to the text after error correction by the engine, the first potential wrong word data and the second potential wrong word data, and obtain a plurality of candidate replacement sentences.
- the candidate replacement sentence scoring result determination module 500 is used for inputting each candidate replacement sentence to be scored into the statistical language model to perform candidate replacement sentence scoring, to obtain a plurality of candidate replacement sentence scoring results;
- the target candidate replacement sentence determination module 600 is configured to determine the target candidate replacement sentence according to the scoring results of the plurality of candidate replacement sentences.
- the target dictionary and the pre-trained model in the error detection stage to improve the possibility of identifying the error location, it realizes the identification of the error conditions within the rules and outside the rules, thereby improving the coverage; in the error correction stage , according to the text corrected by the engine, the data of the first potential wrong words and the data of the second potential wrong words to determine the candidate replacement sentences to obtain a plurality of candidate replacement sentences to be scored, and then combine the statistical language model to determine whether the replacement word is in the candidate replacement sentence
- the reasonable degree of existence in the sentence reduces the misjudgment caused by the error detection stage, thereby improving the accuracy of text error correction.
- an embodiment of the present application further provides a computer device.
- the computer device may be a server, and its internal structure may be as shown in FIG. 3 .
- the computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities.
- the memory of the computer device includes a non-volatile storage medium, an internal memory.
- the nonvolatile storage medium stores an operating system, a computer program, and a database.
- the memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
- the database of the computer equipment is used to store data such as text error correction methods.
- the network interface of the computer device is used to communicate with an external terminal through a network connection.
- the computer program when executed by a processor implements a text error correction method.
- the text error correction method includes: acquiring the text to be corrected, inputting the text to be corrected into an error correction rule engine for error correction processing, and obtaining the text corrected by the engine; acquiring a target dictionary, and correcting the text according to the target dictionary.
- the text after the error correction of the engine is subjected to word segmentation and wrong word judgment to obtain the first potential wrong word data; the text after the engine error correction is input into the pre-training model for replacement probability prediction, and the replacement probability prediction result is obtained, according to According to the replacement probability prediction result, the second potential wrong word data is determined; the candidate replacement sentence is determined according to the text after error correction by the engine, the first potential wrong word data and the second potential wrong word data, Obtain multiple candidate replacement sentences to be scored; input each candidate replacement sentence to be scored into a statistical language model to score candidate replacement sentences, and obtain multiple candidate replacement sentence scoring results; score according to the multiple candidate replacement sentences As a result, the target candidate replacement sentence is determined.
- the target dictionary and the pre-trained model in the error detection stage to improve the possibility of identifying the error location, it realizes the identification of the error conditions within the rules and outside the rules, thereby improving the coverage; in the error correction stage , according to the text corrected by the engine, the data of the first potential wrong words and the data of the second potential wrong words to determine the candidate replacement sentences to obtain a plurality of candidate replacement sentences to be scored, and then combine the statistical language model to determine whether the replacement word is in the candidate replacement sentence
- the reasonable degree of existence in the sentence reduces the misjudgment caused by the error detection stage, thereby improving the accuracy of text error correction.
- An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements a text error correction method, including the steps of: acquiring text to be corrected, storing the text to be corrected
- the error correction text is input into the error correction rule engine for error correction processing, and the text after the engine error correction is obtained; the target dictionary is obtained, and the word segmentation and wrong word judgment are performed on the text after the error correction by the engine according to the target dictionary, and the first error correction is obtained.
- Potentially incorrect word data inputting the error-corrected text of the engine into a pre-training model for replacement probability prediction, obtaining a replacement probability prediction result, and determining the second potential wrong word data according to the replacement probability prediction result; according to the The text after the engine error correction, the first potential wrong word data and the second potential wrong word data determine candidate replacement sentences, and obtain a plurality of candidate replacement sentences to be scored;
- the candidate replacement sentence is input into the statistical language model to score the candidate replacement sentence, and a plurality of candidate replacement sentence scoring results are obtained; according to the multiple candidate replacement sentence scoring results, the target candidate replacement sentence is determined.
- the text error correction method implemented above improves the possibility of error location identification by using the rule engine, target dictionary and pre-trained model in the error detection stage, and realizes the identification of error conditions within and outside the rules, thereby improving coverage.
- the error correction stage according to the text after the engine error correction, the first potential wrong word data and the second potential wrong word data to determine the candidate replacement sentence to obtain a plurality of candidate replacement sentences to be scored, and then combined with the statistical language model to judge The reasonableness of the replacement words in the candidate replacement sentences reduces the misjudgment caused by the error detection stage, thereby improving the accuracy of text error correction.
- the computer-readable storage medium may be non-volatile or volatile.
- Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
- Volatile memory may include random access memory (RAM) or external cache memory.
- RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
Abstract
一种文本纠错方法、装置、设备及介质,涉及人工智能技术领域,其中方法包括:根据目标词典对引擎纠错后的文本进行分词及错误用词判断得到第一潜在错误用词数据;将引擎纠错后的文本输入预训练模型进行替换概率预测得到替换概率预测结果,根据替换概率预测结果确定第二潜在错误用词数据;根据引擎纠错后的文本、第一潜在错误用词数据和第二潜在错误用词数据确定候选替换句得到多个待评分的候选替换句;分别将每一个待评分的候选替换句输入统计语言模型进行候选替换句评分得到多个候选替换句评分结果;根据多个候选替换句评分结果确定目标候选替换句。从而实现了对规则以内和规则以外的错误情况的识别,提高了文本纠错的准确性。
Description
本申请要求于2020年11月19日提交中国专利局、申请号为2020113025303,发明名称为“文本纠错方法、装置、设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及到人工智能技术领域,特别是涉及到一种文本纠错方法、装置、设备及介质。
文本纠错指的是对自然语言在使用过程中出现的问题自动进行识别和纠正,比如,用字错误(痛点写成通点)、语法错误(的地得混用)、用词搭配错误(辅助决策写成扶助决策)、多字、漏字等。
因为特定场景的相关术语、专业术语,比如,机构的缩写:广东分公司写成广分,公司内部的缩写用语:会议纪要写成会纪,导致采用通用语料(如维基百科中文语料、人民日报中文语料)训练出的文本纠错模型的纠错效果不会太好。
发明人意识到目前已有的纠错技术针对特定场景大都结合规则引擎,但是仅依赖规则引擎会造成文本纠错模型覆盖率有限,针对规则以外的错误情况无法处理,同时规则引擎也会容易引起误判。
现有技术的纠错技术仅依赖规则引擎会造成文本纠错模型覆盖率有限,针对规则以外的错误情况无法处理,同时规则引擎也会容易引起误判的技术问题。
本申请的主要目的为提供一种文本纠错方法、装置、设备及介质,旨在解决现有技术的纠错技术仅依赖规则引擎会造成文本纠错模型覆盖率有限,针对规则以外的错误情况无法处理,同时规则引擎也会容易引起误判的技术问题。
为了实现上述发明目的,本申请提出一种文本纠错方法,所述方法包括:
获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;
获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;
将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;
根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;
分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;
根据所述多个候选替换句评分结果,确定目标候选替换句。
本申请还提出了一种文本纠错装置,所述装置包括:
引擎纠错模块,用于获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;
第一潜在错误用词数据确定模块,用于获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;
第二潜在错误用词数据确定模块,用于将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;
待评分的候选替换句确定模块,用于根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;
候选替换句评分结果确定模块,用于分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;
目标候选替换句确定模块,用于根据所述多个候选替换句评分结果,确定目标候选替换句。
本申请还提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现如下方法步骤:
获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;
获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;
将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;
根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;
分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;
根据所述多个候选替换句评分结果,确定目标候选替换句。
本申请还提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现如下方法步骤:
获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;
获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;
将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;
根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;
分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;
根据所述多个候选替换句评分结果,确定目标候选替换句。
本申请的一种文本纠错方法、装置、设备及介质,通过在错误检测阶段使用规则引擎、目标词典及预训练模型提高错误位置识别的可能性,实现了对规则以内和规则以外的错误情况的识别,从而提高了覆盖率;在错误纠正阶段,根据引擎纠错后的文本、第一潜在错误用词数据和第二潜在错误用词数据确定候选替换句得到多个待评分的候选替换句,然后再结合统计语言模型判断替换词在候选替换句中存在的合理程度,减少了错误检测阶段带来的误判,从而提高了文本纠错的准确性。
图1为本申请一实施例的文本纠错方法的流程示意图;
图2 为本申请一实施例的文本纠错装置的结构示意框图;
图3 为本申请一实施例的计算机设备的结构示意框图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
为了解决现有技术的纠错技术仅依赖规则引擎会造成文本纠错模型覆盖率有限,针对规则以外的错误情况无法处理,同时规则引擎也会容易引起误判的技术问题,本申请提出了文本纠错方法,所述方法应用于人工智能技术领域,所述方法进一步应用于人工智能的自然语言处理技术领域。所述文本纠错方法通过先进采用纠错规则引擎进行纠错,再用词典找出第一潜在错误用词数据和用预训练模型确定第二潜在错误用词数据,然后根据第一潜在错误用词数据和第二潜在错误用词数据确定候选替换句,对候选替换句进行评分,根据评分确定文本纠错结果,实现了对规则以内和规则以外的错误情况的识别,从而提高了覆盖率,提高了文本纠错的准确性。
参照图1,本申请实施例中提供一种文本纠错方法,所述方法包括:
S1:获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;
S2:获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;
S3:将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;
S4:根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;
S5:分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;
S6:根据所述多个候选替换句评分结果,确定目标候选替换句。
本实施例通过在错误检测阶段使用规则引擎、目标词典及预训练模型提高错误位置识别的可能性,实现了对规则以内和规则以外的错误情况的识别,从而提高了覆盖率;在错误纠正阶段,根据引擎纠错后的文本、第一潜在错误用词数据和第二潜在错误用词数据确定候选替换句得到多个待评分的候选替换句,然后再结合统计语言模型判断替换词在候选替换句中存在的合理程度,减少了错误检测阶段带来的误判,从而提高了文本纠错的准确性。
对于S1,可以从数据库中获取待纠错文本,也可以是用户输入的待纠错文本,还可以是其他应用系统发送的待纠错文本。
待纠错文本,是需要进行文本纠错的文本。
其中,将所述待纠错文本输入纠错规则引擎进行错误词识别和错误词替换,得到引擎纠错后的文本。
纠错规则引擎是采用通用语料对神经网络训练得到的模型,其中,通用语料包括但不限于:维基百科中文语料、人民日报中文语料。
可以理解的是,所述待纠错文本和训练纠错规则引擎的语料的语言类别相同。比如,采用中文预料对神经网络训练得到的纠错规则引擎,用于对中文的待纠错文本进行错误词识别和错误词替换,在此举例不做具体限定。
对于S2,可以从数据库中获取目标词典,也可以是用户输入的目标词典,还可以是其他应用系统发送的目标词典。
目标词典包括至少一个词语。
其中,对所述引擎纠错后的文本进行分词,采用所述目标词典对分词结果进行错误用词判断,将判断为错误用词的词语放在集合中,得到第一潜在错误用词数据。也就是说,第一潜在错误用词数据是一个集合。
对于S3,将所述引擎纠错后的文本输入预训练模型进行每个字是否被替换的替换概率预测,得到替换概率预测结果。也就是说,替换概率预测结果中包含至少一个替换概率预测值。
根据所述替换概率预测结果中所有的替换概率预测值,确定第二潜在错误用词数据。
预训练模型可以从现有技术中选择,也可以是基于神经网络训练得到的模型。
可以理解的是,所述引擎纠错后的文本和训练预训练模型的文本的语言类别相同。比如,采用中文文本对神经网络训练得到的预训练模型,用于对中文的所述引擎纠错后的文本进行替换概率预测,在此举例不做具体限定。
可以理解的是,步骤S2和步骤S3还可以同步执行,还可以按步骤S3和步骤S2的顺序异步执行,在此不做具体限定。
对于S4,根据所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选词,然后根据所述候选词和所述引擎纠错后的文本确定候选替换句,得到多个待评分的候选替换句。多个待评分的候选替换句中包括了所有可能的替换句组合。
对于S5,分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,也就是说,每个所述待评分的候选替换句对应一个候选替换句评分结果。
统计语言模型可以从现有技术中选择,也可以是基于神经网络训练得到的模型。
可以理解的是,所述待评分的候选替换句和统计语言模型的文本的语言类别相同。比如,采用中文文本对神经网络训练得到的统计语言模型,用于对中文的所述待评分的候选替换句进行候选替换句评分,在此举例不做具体限定。
对于S6,从所述多个候选替换句评分结果中提取评分值最大的候选替换句评分结果对应的候选替换句作为目标候选替换句。比如,所述多个候选替换句评分结果为:候选替换句B的评分为80、候选替换句A的评分为70、候选替换句D的评分为60,候选替换句B的评分80分为最大值,则80分对应的候选替换句B作为目标候选替换句,在此举例不做具体限定。
在一个实施例中,上述获取目标词典的步骤之前,包括:
S021:获取多个业务场景文本样本;
S022:对所述多个业务场景文本样本进行分词,得到待统计的词语集合;
S023:对所述待统计的词语集合中每个词语进行词频统计,得到多个待分析词语词频;
S024:获取词频阈值;
S025:判断所述多个待分析词语词频是否大于所述词频阈值;
S026:当所述待分析词语词频大于所述词频阈值时,将所述待分析词语词频对应的词语作为业务场景常用词数据;
S027:采用点间互信息和左右熵的新词发现算法对所述多个业务场景文本样本进行新词挖掘,得到业务场景新词数据;
S028:获取业务场景特定词数据和通用场景常用词数据;
S029:根据所述业务场景常用词数据、所述业务场景新词数据、所述业务场景特定词数据和所述通用场景常用词数据,确定所述目标词典。
本实施例实现了根据所述业务场景常用词数据、所述业务场景新词数据、所述业务场景特定词数据和所述通用场景常用词数据确定所述目标词典,使目标词典覆盖了通用场景、业务场景的各种相关术语及专业术语,从而在错误检测阶段通过目标词典提高了错误位置识别的可能性,从而提高了覆盖率。
对于S021,可以从数据库中获取多个业务场景文本样本,也可以是用户输入的多个业务场景文本样本,还可以是其他应用系统发送的多个业务场景文本样本。
业务场景文本样本,是业务场景使用的文本数据。
对于S022,对所述多个业务场景文本样本进行分词,将分词得到的词语放在一个集合中,得到待统计的词语集合。
对于S023,分别计算所述待统计的词语集合中每个词语出现的次数,得到多个目标出现次数;获取所述待统计的词语集合中词语的总数,得到目标词语总数;分别将每一个所述目标出现次数除以所述目标词语总数,得到多个待分析词语词频。也就是说,所述待统计的词语集合中每个词语对应一个待分析词语词频。
待分析词语词频,是需要进行分析的词语词频。
对于S024,可以从数据库中获取词频阈值,也可以是用户输入的词频阈值,还可以是其他应用系统发送的词频阈值。
词频阈值,是一个0到1的具体数值。
对于S025,依次判断所述多个待分析词语词频中每个所述待分析词语词频是否大于所述词频阈值。
对于S026,当所述待分析词语词频大于所述词频阈值时,意味着所述待分析词语词频对应的词语是业务场景的常用词的概率比较大,此时将所述待分析词语词频对应的词语作为业务场景常用词数据,有利于提高业务场景常用词数据的准确性。
对于S027,所述采用点间互信息和左右熵的新词发现算法对所述多个业务场景文本样本进行新词挖掘,得到业务场景新词数据的步骤,包括:
S0271:根据所述多个业务场景文本样本,生成n_ gram(基于概率的判别模型)词典;
其中,根据所述多个业务场景文本样本生成n_ gram词典的方法可以从现有技术中选择,在此不做赘述。
S0272:采用点间互信息方法从所述n_ gram词典中筛选出备选的新词,得到待选择的新词数据;
其中,采用点间互信息方法从所述n_ gram词典中筛选出备选的新词方法可以从现有技术中选择,在此不做赘述。
S0273:采用左右熵方法从所述待选择的新词数据中进行新词选择,得到业务场景新词数据。
其中,采用左右熵方法从所述待选择的新词数据中进行新词选择方法可以从现有技术中选择,在此不做赘述。
对于S028,可以从数据库中获取业务场景特定词数据,也可以是用户输入的业务场景特定词数据,还可以是其他应用系统发送的业务场景特定词数据。
可以从数据库中获取通用场景常用词数据,也可以是用户输入的通用场景常用词数据,还可以是其他应用系统发送的和通用场景常用词数据。
业务场景特定词数据是业务场景的特性形成的词语。比如,组织内部的愿景“先知、先觉、先行”,可以将“先知、先觉、先行”作为业务场景特定词,在此举例不做具体限定。
通用场景常用词数据,是大部分场景经常用到的词语。
对于S029,将所述业务场景常用词数据、所述业务场景新词数据、所述业务场景特定词数据和所述通用场景常用词数据放到一个集合,将得到的集合作为所述目标词典。也就是说,目标词典覆盖了通用场景、业务场景的各种相关术语及专业术语。
在一个实施例中,上述根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据的步骤,包括:
S21:对所述引擎纠错后的文本进行分词,得到多个待判定词语;
S22:判断所述多个待判定词语在所述目标词典中是否存在;
S23:当所述待判定词语在所述目标词典中不存在时,将多个所述待判定词作为所述第一潜在错误用词数据。
本实施例实现了根据目标词典进行错误用词判断,因目标词典覆盖了通用场景、业务场景的各种相关术语及专业术语,从而提高了错误位置识别的可能性,从而提高了第一潜在错误用词数据的覆盖率。
对于S21,对所述引擎纠错后的文本进行分词,将分词得到的词语作为待判定词语。
待判定词语,是指需要判定是否错误用词的词语。
对于S22,分别将所述多个待判定词语中每一个待判定词语在所述目标词典中进行查找,当在所述目标词典中查找到相同词语时意味着该待判定词语是正确用词,当在所述目标词典中查找不到相同词语时意味着该待判定词语是错误用词,此时确定所述待判定词语在所述目标词典中不存在。
对于S23,当所述待判定词语在所述目标词典中不存在时,意味着该待判定词语是错误用词,将所有在所述目标词典中不存在的所述待判定词语作为所述第一潜在错误用词数据。
在一个实施例中,上述将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果的步骤之前,包括:
S031:获取多个训练样本,所述训练样本包括:训练文本样本数据、训练文本样本标定数据;
S032:将所述训练文本样本数据输入待训练的生成器进行词语替换,得到替换样本句;
S033:将所述替换样本句输入待训练的判别器进行替换概率预测,得到替换概率样本预测值,其中,所述待训练的判别器采用Electra的Discriminator;
S034:根据所述替换概率样本预测值和所述训练文本样本标定数据对所述待训练的生成器和所述待训练的判别器进行训练,并将训练后的所述待训练的判别器作为所述预训练模型。
本实施例待训练的判别器采用Electra(Efficiently
Learning an Encoder that Classifies Token Replacement Accurately)的Discriminator,Electra相对于Bert(Bidirectional Encoder Representations
from Transformers,预训练语言表示模型)的去预测Mask的正确值,Electra则是去预测Token是不是被替换了,从而提升了训练效率;通过将训练后的所述待训练的判别器作为所述预训练模型,使预训练模型可以预测每个被替换的概率。
S031,可以从数据库中获取多个训练样本,也可以是用户输入的多个训练样本,还可以是其他应用系统发送的多个训练样本。
每个所述训练样本包括一个训练文本样本数据和一个训练文本样本标定数据,训练文本样本标定数据是对训练文本样本数据中每个字被替换的标定值。
训练文本样本数据,是文本数据。
训练文本样本标定数据,是一个一维向量,每个向量元素代表训练文本样本数据中一个字被替换的标定值。
S032,将所述训练文本样本数据输入待训练的生成器进行词语替换,得到替换样本句,也就是说,每个所述训练文本样本数据对应一个替换样本句。
优选的,待训练的生成器采用Generator模型。
其中,将所述训练文本样本数据经过随机选择设置[MASK],然后输入给Generator模型,Generator模型负责把[MASK]变成替换过的词。Generator模型并不像对抗神经网络那样需要等待训练的判别器中传回来的梯度,而是像Bert一样去尝试预测正确的词语。
S033,将所述替换样本句输入待训练的判别器进行替换概率预测,得到替换概率样本预测值,也就是说,每个所述替换样本句对应一个替换概率样本预测值。
Discriminator预测所述替换样本句中每个位置上的词语是不是被替换过。
S034,所述根据所述替换概率样本预测值和所述训练文本样本标定数据对所述待训练的生成器和所述待训练的判别器进行训练,并将训练后的所述待训练的判别器作为所述预训练模型的步骤,包括:
S0341:将所述替换概率样本预测值和所述训练文本样本标定数据输入损失函数进行计算,得到目标损失值,根据所述目标损失值更新所述待训练的生成器的参数和所述待训练的判别器的参数,更新后的所述待训练的生成器和所述待训练的判别器被用于下一次计算所述替换概率样本预测值;
S0342:重复执行上述方法步骤直至所述损失值达到第一收敛条件或迭代次数达到第二收敛条件,将所述目标损失值达到第一收敛条件或迭代次数达到第二收敛条件的所述待训练的判别器,确定为所述预训练模型。
所述第一收敛条件是指相邻两次计算的目标损失值的大小满足lipschitz条件(利普希茨连续条件)。
所述迭代次数是指所述待训练的生成器和所述待训练的判别器被用于计算所述替换概率样本预测值的次数,也就是说,计算一次,迭代次数增加1。第二收敛条件,是预设次数值。
所述损失函数可以从现有技术中选择,在此不做赘述。
在一个实施例中,上述根据所述替换概率预测结果,确定第二潜在错误用词数据的步骤,包括:
S31:获取替换概率阈值;
S32:从所述替换概率预测结果中提取大于所述替换概率阈值的值,得到目标替换概率预测数据;
S33:将所述目标替换概率预测数据对应的词语作为所述第二潜在错误用词数据。
本实施例通过将所述替换概率预测结果中大于所述替换概率阈值的值对应的词语作为所述第二潜在错误用词数据,从而减少了误判,提高了第二潜在错误用词数据的准确性。
对于S31,可以从数据库中获取替换概率阈值,也可以是用户输入的替换概率阈值,还可以是其他应用系统发送的替换概率阈值。
替换概率阈值,是一个0到1的具体数值。
对于S32,从所述替换概率预测结果的所有替换概率预测值中提取大于所述替换概率阈值的替换概率预测值,将找到的替换概率预测值作为目标替换概率预测数据。也就是说目标替换概率预测数据可以有一个值,也可以有多个值,还可以有零个值。通过将大于所述替换概率阈值的替换概率预测值作为目标替换概率预测数据,删除了小于或等于所述替换概率阈值的替换概率预测值,有利于减少噪音数据,从而减少了误判,提高了第二潜在错误用词数据的准确性。
对于S33,将所述目标替换概率预测数据对应的词语放在一个集合中,得到所述第二潜在错误用词数据。
在一个实施例中,上述根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句的步骤,包括:
S41:获取同音字同形字字典;
S42:在所述同音字同形字字典中选取与所述第一潜在错误用词数据和所述第二潜在错误用词数据匹配的词作为候选词,得到候选词集合;
S43:对所述候选词集合中的候选词进行随机选择,得到多个候选词分组;
S44:分别将每一个所述候选词分组对所述引擎纠错后的文本进行替换,得到所述多个待评分的候选替换句。
本实施例通过所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,从而为候选替换句评分提供了数据基础。
对于S41,可以从数据库中获取同音字同形字字典,也可以是用户输入的同音字同形字字典,还可以是其他应用系统发送的同音字同形字字典。
同音字同形字字典包括:同音字子字典、同形字子字典。同音字子字典包括:第一替换前的词语、第一替换后的词语,第一替换前的词语和第一替换后的词语的读音相同。同形字子字典包括:第二替换前的词语、第二替换后的词语,第二替换前的词语和第二替换后的词语的字形相似。
对于S42,将所述第一潜在错误用词数据中每个词语在所述同音字同形字字典中进行匹配,将在所述同音字同形字字典中匹配到的词语作为第一候选词;将所述第二潜在错误用词数据中每个词语在所述同音字同形字字典中进行匹配,将在所述同音字同形字字典中匹配到的词语作为第二候选词;将所有第一候选词和所有第二候选词放入集合,得到候选词集合。
对于S43,对所述候选词集合中的候选词进行随机组合,将每一个组合作为一个候选词分组。可以理解的是,多个候选词分组涵盖了对所述候选词集合中的候选词所有可能的分组。
对于S44,分别将每一个所述候选词分组对所述引擎纠错后的文本进行替换,得到待评分的候选替换句。也就是说,每个所述候选词分组对应一个待评分的候选替换句。
待评分的候选替换句,是指需要进行评分的候选替换句。
在另一个实施例中,可以采用同音字同形字字典和同音字同形字字典以外的字典进行候选词匹配确定候选词集合,在此不做具体限定。
在一个实施例中,上述根据所述多个候选替换句评分结果,确定目标候选替换句的步骤,包括:
S61:从所述多个候选替换句评分结果中提取评分值最大的候选替换句评分结果作为目标候选替换句评分结果;
S62:将所述目标候选替换句评分结果对应的候选替换句作为所述目标候选替换句。
本实施例实现了将所述多个候选替换句评分结果中最大值对应的所述候选替换句评分结果作为目标候选替换句评分结果,将所述目标候选替换句评分结果对应的候选替换句作为所述目标候选替换句,从而进一步提高了确定的目标候选替换句的准确性。
对于S61,从所述多个候选替换句评分结果提取最大的候选替换句评分结果,将提取的最大的候选替换句评分结果作为目标候选替换句评分结果。
参照图2,本申请还提出了一种文本纠错装置,所述装置包括:
引擎纠错模块100,用于获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;
第一潜在错误用词数据确定模块200,用于获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;
第二潜在错误用词数据确定模块300,用于将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;
待评分的候选替换句确定模块400,用于根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;
候选替换句评分结果确定模块500,用于分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;
目标候选替换句确定模块600,用于根据所述多个候选替换句评分结果,确定目标候选替换句。
本实施例通过在错误检测阶段使用规则引擎、目标词典及预训练模型提高错误位置识别的可能性,实现了对规则以内和规则以外的错误情况的识别,从而提高了覆盖率;在错误纠正阶段,根据引擎纠错后的文本、第一潜在错误用词数据和第二潜在错误用词数据确定候选替换句得到多个待评分的候选替换句,然后再结合统计语言模型判断替换词在候选替换句中存在的合理程度,减少了错误检测阶段带来的误判,从而提高了文本纠错的准确性。
参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于储存文本纠错方法等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种文本纠错方法。所述文本纠错方法,包括:获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;根据所述多个候选替换句评分结果,确定目标候选替换句。
本实施例通过在错误检测阶段使用规则引擎、目标词典及预训练模型提高错误位置识别的可能性,实现了对规则以内和规则以外的错误情况的识别,从而提高了覆盖率;在错误纠正阶段,根据引擎纠错后的文本、第一潜在错误用词数据和第二潜在错误用词数据确定候选替换句得到多个待评分的候选替换句,然后再结合统计语言模型判断替换词在候选替换句中存在的合理程度,减少了错误检测阶段带来的误判,从而提高了文本纠错的准确性。
本申请一实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现一种文本纠错方法,包括步骤:获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;根据所述多个候选替换句评分结果,确定目标候选替换句。
上述执行的文本纠错方法,通过在错误检测阶段使用规则引擎、目标词典及预训练模型提高错误位置识别的可能性,实现了对规则以内和规则以外的错误情况的识别,从而提高了覆盖率;在错误纠正阶段,根据引擎纠错后的文本、第一潜在错误用词数据和第二潜在错误用词数据确定候选替换句得到多个待评分的候选替换句,然后再结合统计语言模型判断替换词在候选替换句中存在的合理程度,减少了错误检测阶段带来的误判,从而提高了文本纠错的准确性。
所述计算机可读存储介质可以是非易失性,也可以是易失性。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。
以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。
Claims (20)
- 一种文本纠错方法,其中,所述方法包括:获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;根据所述多个候选替换句评分结果,确定目标候选替换句。
- 根据权利要求1所述的文本纠错方法,其中,所述获取目标词典的步骤之前,包括:获取多个业务场景文本样本;对所述多个业务场景文本样本进行分词,得到待统计的词语集合;对所述待统计的词语集合中每个词语进行词频统计,得到多个待分析词语词频;获取词频阈值;判断所述多个待分析词语词频是否大于所述词频阈值;当所述待分析词语词频大于所述词频阈值时,将所述待分析词语词频对应的词语作为业务场景常用词数据;采用点间互信息和左右熵的新词发现算法对所述多个业务场景文本样本进行新词挖掘,得到业务场景新词数据;获取业务场景特定词数据和通用场景常用词数据;根据所述业务场景常用词数据、所述业务场景新词数据、所述业务场景特定词数据和所述通用场景常用词数据,确定所述目标词典。
- 根据权利要求1所述的文本纠错方法,其中,所述根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据的步骤,包括:对所述引擎纠错后的文本进行分词,得到多个待判定词语;判断所述多个待判定词语在所述目标词典中是否存在;当所述待判定词语在所述目标词典中不存在时,将多个所述待判定词作为所述第一潜在错误用词数据。
- 根据权利要求1所述的文本纠错方法,其中,所述将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果的步骤之前,包括:获取多个训练样本,所述训练样本包括:训练文本样本数据、训练文本样本标定数据;将所述训练文本样本数据输入待训练的生成器进行词语替换,得到替换样本句;将所述替换样本句输入待训练的判别器进行替换概率预测,得到替换概率样本预测值,其中,所述待训练的判别器采用Electra的Discriminator;根据所述替换概率样本预测值和所述训练文本样本标定数据对所述待训练的生成器和所述待训练的判别器进行训练,并将训练后的所述待训练的判别器作为所述预训练模型。
- 根据权利要求1所述的文本纠错方法,其中,所述根据所述替换概率预测结果,确定第二潜在错误用词数据的步骤,包括:获取替换概率阈值;从所述替换概率预测结果中提取大于所述替换概率阈值的值,得到目标替换概率预测数据;将所述目标替换概率预测数据对应的词语作为所述第二潜在错误用词数据。
- 根据权利要求1所述的文本纠错方法,其中,所述根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句的步骤,包括:获取同音字同形字字典;在所述同音字同形字字典中选取与所述第一潜在错误用词数据和所述第二潜在错误用词数据匹配的词作为候选词,得到候选词集合;对所述候选词集合中的候选词进行随机选择,得到多个候选词分组;分别将每一个所述候选词分组对所述引擎纠错后的文本进行替换,得到所述多个待评分的候选替换句。
- 根据权利要求1所述的文本纠错方法,其中,所述根据所述多个候选替换句评分结果,确定目标候选替换句的步骤,包括:从所述多个候选替换句评分结果中提取评分值最大的候选替换句评分结果作为目标候选替换句评分结果;将所述目标候选替换句评分结果对应的候选替换句作为所述目标候选替换句。
- 一种文本纠错装置,其中,所述装置包括:引擎纠错模块,用于获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;第一潜在错误用词数据确定模块,用于获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;第二潜在错误用词数据确定模块,用于将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;待评分的候选替换句确定模块,用于根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;候选替换句评分结果确定模块,用于分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;目标候选替换句确定模块,用于根据所述多个候选替换句评分结果,确定目标候选替换句。
- 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现如下方法步骤:获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;根据所述多个候选替换句评分结果,确定目标候选替换句。
- 根据权利要求9所述的计算机设备,其中,所述获取目标词典的步骤之前,包括:获取多个业务场景文本样本;对所述多个业务场景文本样本进行分词,得到待统计的词语集合;对所述待统计的词语集合中每个词语进行词频统计,得到多个待分析词语词频;获取词频阈值;判断所述多个待分析词语词频是否大于所述词频阈值;当所述待分析词语词频大于所述词频阈值时,将所述待分析词语词频对应的词语作为业务场景常用词数据;采用点间互信息和左右熵的新词发现算法对所述多个业务场景文本样本进行新词挖掘,得到业务场景新词数据;获取业务场景特定词数据和通用场景常用词数据;根据所述业务场景常用词数据、所述业务场景新词数据、所述业务场景特定词数据和所述通用场景常用词数据,确定所述目标词典。
- 根据权利要求9所述的计算机设备,其中,所述根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据的步骤,包括:对所述引擎纠错后的文本进行分词,得到多个待判定词语;判断所述多个待判定词语在所述目标词典中是否存在;当所述待判定词语在所述目标词典中不存在时,将多个所述待判定词作为所述第一潜在错误用词数据。
- 根据权利要求9所述的计算机设备,其中,所述将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果的步骤之前,包括:获取多个训练样本,所述训练样本包括:训练文本样本数据、训练文本样本标定数据;将所述训练文本样本数据输入待训练的生成器进行词语替换,得到替换样本句;将所述替换样本句输入待训练的判别器进行替换概率预测,得到替换概率样本预测值,其中,所述待训练的判别器采用Electra的Discriminator;根据所述替换概率样本预测值和所述训练文本样本标定数据对所述待训练的生成器和所述待训练的判别器进行训练,并将训练后的所述待训练的判别器作为所述预训练模型。
- 根据权利要求9所述的计算机设备,其中,所述根据所述替换概率预测结果,确定第二潜在错误用词数据的步骤,包括:获取替换概率阈值;从所述替换概率预测结果中提取大于所述替换概率阈值的值,得到目标替换概率预测数据;将所述目标替换概率预测数据对应的词语作为所述第二潜在错误用词数据。
- 根据权利要求9所述的计算机设备,其中,所述根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句的步骤,包括:获取同音字同形字字典;在所述同音字同形字字典中选取与所述第一潜在错误用词数据和所述第二潜在错误用词数据匹配的词作为候选词,得到候选词集合;对所述候选词集合中的候选词进行随机选择,得到多个候选词分组;分别将每一个所述候选词分组对所述引擎纠错后的文本进行替换,得到所述多个待评分的候选替换句。
- 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现如下方法步骤:获取待纠错文本,将所述待纠错文本输入纠错规则引擎进行纠错处理,得到引擎纠错后的文本;获取目标词典,根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据;将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果,根据所述替换概率预测结果,确定第二潜在错误用词数据;根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句;分别将每一个所述待评分的候选替换句输入统计语言模型进行候选替换句评分,得到多个候选替换句评分结果;根据所述多个候选替换句评分结果,确定目标候选替换句。
- 根据权利要求15所述的计算机可读存储介质,其中,所述获取目标词典的步骤之前,包括:获取多个业务场景文本样本;对所述多个业务场景文本样本进行分词,得到待统计的词语集合;对所述待统计的词语集合中每个词语进行词频统计,得到多个待分析词语词频;获取词频阈值;判断所述多个待分析词语词频是否大于所述词频阈值;当所述待分析词语词频大于所述词频阈值时,将所述待分析词语词频对应的词语作为业务场景常用词数据;采用点间互信息和左右熵的新词发现算法对所述多个业务场景文本样本进行新词挖掘,得到业务场景新词数据;获取业务场景特定词数据和通用场景常用词数据;根据所述业务场景常用词数据、所述业务场景新词数据、所述业务场景特定词数据和所述通用场景常用词数据,确定所述目标词典。
- 根据权利要求15所述的计算机可读存储介质,其中,所述根据所述目标词典对所述引擎纠错后的文本进行分词及错误用词判断,得到第一潜在错误用词数据的步骤,包括:对所述引擎纠错后的文本进行分词,得到多个待判定词语;判断所述多个待判定词语在所述目标词典中是否存在;当所述待判定词语在所述目标词典中不存在时,将多个所述待判定词作为所述第一潜在错误用词数据。
- 根据权利要求15所述的计算机可读存储介质,其中,所述将所述引擎纠错后的文本输入预训练模型进行替换概率预测,得到替换概率预测结果的步骤之前,包括:获取多个训练样本,所述训练样本包括:训练文本样本数据、训练文本样本标定数据;将所述训练文本样本数据输入待训练的生成器进行词语替换,得到替换样本句;将所述替换样本句输入待训练的判别器进行替换概率预测,得到替换概率样本预测值,其中,所述待训练的判别器采用Electra的Discriminator;根据所述替换概率样本预测值和所述训练文本样本标定数据对所述待训练的生成器和所述待训练的判别器进行训练,并将训练后的所述待训练的判别器作为所述预训练模型。
- 根据权利要求15所述的计算机可读存储介质,其中,所述根据所述替换概率预测结果,确定第二潜在错误用词数据的步骤,包括:获取替换概率阈值;从所述替换概率预测结果中提取大于所述替换概率阈值的值,得到目标替换概率预测数据;将所述目标替换概率预测数据对应的词语作为所述第二潜在错误用词数据。
- 根据权利要求15所述的计算机可读存储介质,其中,所述根据所述引擎纠错后的文本、所述第一潜在错误用词数据和所述第二潜在错误用词数据确定候选替换句,得到多个待评分的候选替换句的步骤,包括:获取同音字同形字字典;在所述同音字同形字字典中选取与所述第一潜在错误用词数据和所述第二潜在错误用词数据匹配的词作为候选词,得到候选词集合;对所述候选词集合中的候选词进行随机选择,得到多个候选词分组;分别将每一个所述候选词分组对所述引擎纠错后的文本进行替换,得到所述多个待评分的候选替换句。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202011302530.3A CN112380840B (zh) | 2020-11-19 | 2020-11-19 | 文本纠错方法、装置、设备及介质 |
| CN202011302530.3 | 2020-11-19 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2022105083A1 true WO2022105083A1 (zh) | 2022-05-27 |
Family
ID=74584580
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2021/084546 Ceased WO2022105083A1 (zh) | 2020-11-19 | 2021-03-31 | 文本纠错方法、装置、设备及介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112380840B (zh) |
| WO (1) | WO2022105083A1 (zh) |
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115204182A (zh) * | 2022-09-09 | 2022-10-18 | 山东天成书业有限公司 | 一种待校对电子书数据的识别方法及系统 |
| CN115309899A (zh) * | 2022-08-09 | 2022-11-08 | 烟台中科网络技术研究所 | 一种文本中特定内容识别存储方法及系统 |
| CN115688703A (zh) * | 2022-10-31 | 2023-02-03 | 国网山东省电力公司烟台供电公司 | 一种特定领域文本纠错方法、存储介质和装置 |
| CN115881108A (zh) * | 2022-09-02 | 2023-03-31 | 北京中关村科金技术有限公司 | 语音识别方法、装置、设备及存储介质 |
| CN116306598A (zh) * | 2023-05-22 | 2023-06-23 | 上海蜜度信息技术有限公司 | 针对不同领域字词的定制化纠错方法、系统、设备及介质 |
| CN116842140A (zh) * | 2023-08-25 | 2023-10-03 | 北京知呱呱科技有限公司 | 一种机器生成文本的检测方法及系统 |
| CN117350283A (zh) * | 2023-10-11 | 2024-01-05 | 西安栗子互娱网络科技有限公司 | 文本缺陷检测方法、装置、设备和存储介质 |
| CN119808763A (zh) * | 2024-12-18 | 2025-04-11 | 福建亿榕信息技术有限公司 | 一种电力文本智能纠错方法及系统 |
| CN120373292A (zh) * | 2025-04-21 | 2025-07-25 | 语风文化科技(南通)有限公司 | 文本纠错方法、系统及存储介质 |
| CN120578765A (zh) * | 2025-08-01 | 2025-09-02 | 山东浪潮智能生产技术有限公司 | 一种基于大模型的文本处理方法、系统、终端及存储介质 |
| CN120706434A (zh) * | 2025-06-30 | 2025-09-26 | 广东奔潮科技发展有限公司 | 一种法律文本小样本增强训练的智能处理系统 |
| CN120808760A (zh) * | 2025-07-31 | 2025-10-17 | 北京文聿科技有限公司 | 一种语音识别模型的自进化方法及系统 |
Families Citing this family (15)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112380840B (zh) * | 2020-11-19 | 2024-05-07 | 平安科技(深圳)有限公司 | 文本纠错方法、装置、设备及介质 |
| CN113011149B (zh) * | 2021-03-04 | 2024-05-14 | 中国科学院自动化研究所 | 一种文本纠错方法及系统 |
| CN112965890B (zh) * | 2021-03-10 | 2024-06-07 | 中国民航信息网络股份有限公司 | 一种数据处理方法及相关设备 |
| CN113094482B (zh) * | 2021-03-29 | 2023-10-17 | 中国地质大学(北京) | 轻量化语义智能服务适配训练演化方法及系统 |
| CN113627159B (zh) * | 2021-08-18 | 2024-05-17 | 北京北大方正电子有限公司 | 纠错模型的训练数据确定方法、装置、介质及产品 |
| CN113705230B (zh) * | 2021-08-31 | 2023-08-25 | 中国平安财产保险股份有限公司 | 基于人工智能的保单特约的评估方法、装置、设备及介质 |
| CN113705203B (zh) * | 2021-09-02 | 2024-07-26 | 上海极链科技发展集团有限公司 | 文本纠错方法、装置、电子设备及计算机可读存储介质 |
| CN114328798B (zh) * | 2021-11-09 | 2024-02-23 | 腾讯科技(深圳)有限公司 | 搜索文本的处理方法、装置、设备、存储介质和程序产品 |
| CN114282523A (zh) * | 2021-11-22 | 2022-04-05 | 北京方寸无忧科技发展有限公司 | 一种基于bert模型与ngram模型的语句修正方法及装置 |
| CN114528824B (zh) * | 2021-12-24 | 2024-11-29 | 深圳云天励飞技术股份有限公司 | 文本纠错方法、装置、电子设备及存储介质 |
| CN114757166B (zh) * | 2022-04-01 | 2025-09-16 | 合众新能源汽车股份有限公司 | 自然语言理解系统的评估方法、装置及网络设备 |
| CN114742050B (zh) * | 2022-04-19 | 2025-02-28 | 北京金山数字娱乐科技有限公司 | 文本处理方法及装置 |
| CN115271434A (zh) * | 2022-07-26 | 2022-11-01 | 广东电网有限责任公司 | 一种基于云计算的智慧党建工作流引擎设计方法和系统 |
| CN117376632B (zh) * | 2023-12-06 | 2024-02-06 | 中国信息通信研究院 | 基于智能深度合成的数据恢复方法和系统 |
| CN119670732B (zh) * | 2024-11-18 | 2026-01-02 | 中山大学 | 一种基于知识增强的文本纠错方法 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111382260A (zh) * | 2020-03-16 | 2020-07-07 | 腾讯音乐娱乐科技(深圳)有限公司 | 一种检索文本纠错方法、装置和存储介质 |
| CN111460793A (zh) * | 2020-03-10 | 2020-07-28 | 平安科技(深圳)有限公司 | 纠错方法、装置、设备及存储介质 |
| CN111753529A (zh) * | 2020-06-03 | 2020-10-09 | 杭州云嘉云计算有限公司 | 一种基于拼音相同或相似的中文文本纠错方法 |
| CN111797614A (zh) * | 2019-04-03 | 2020-10-20 | 阿里巴巴集团控股有限公司 | 文本处理方法及装置 |
| CN112380840A (zh) * | 2020-11-19 | 2021-02-19 | 平安科技(深圳)有限公司 | 文本纠错方法、装置、设备及介质 |
-
2020
- 2020-11-19 CN CN202011302530.3A patent/CN112380840B/zh active Active
-
2021
- 2021-03-31 WO PCT/CN2021/084546 patent/WO2022105083A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111797614A (zh) * | 2019-04-03 | 2020-10-20 | 阿里巴巴集团控股有限公司 | 文本处理方法及装置 |
| CN111460793A (zh) * | 2020-03-10 | 2020-07-28 | 平安科技(深圳)有限公司 | 纠错方法、装置、设备及存储介质 |
| CN111382260A (zh) * | 2020-03-16 | 2020-07-07 | 腾讯音乐娱乐科技(深圳)有限公司 | 一种检索文本纠错方法、装置和存储介质 |
| CN111753529A (zh) * | 2020-06-03 | 2020-10-09 | 杭州云嘉云计算有限公司 | 一种基于拼音相同或相似的中文文本纠错方法 |
| CN112380840A (zh) * | 2020-11-19 | 2021-02-19 | 平安科技(深圳)有限公司 | 文本纠错方法、装置、设备及介质 |
Cited By (18)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115309899A (zh) * | 2022-08-09 | 2022-11-08 | 烟台中科网络技术研究所 | 一种文本中特定内容识别存储方法及系统 |
| CN115309899B (zh) * | 2022-08-09 | 2023-05-16 | 烟台中科网络技术研究所 | 一种文本中特定内容识别存储方法及系统 |
| CN115881108A (zh) * | 2022-09-02 | 2023-03-31 | 北京中关村科金技术有限公司 | 语音识别方法、装置、设备及存储介质 |
| CN115204182B (zh) * | 2022-09-09 | 2022-11-25 | 山东天成书业有限公司 | 一种待校对电子书数据的识别方法及系统 |
| CN115204182A (zh) * | 2022-09-09 | 2022-10-18 | 山东天成书业有限公司 | 一种待校对电子书数据的识别方法及系统 |
| CN115688703B (zh) * | 2022-10-31 | 2024-03-12 | 国网山东省电力公司烟台供电公司 | 一种特定领域文本纠错方法、存储介质和装置 |
| CN115688703A (zh) * | 2022-10-31 | 2023-02-03 | 国网山东省电力公司烟台供电公司 | 一种特定领域文本纠错方法、存储介质和装置 |
| CN116306598A (zh) * | 2023-05-22 | 2023-06-23 | 上海蜜度信息技术有限公司 | 针对不同领域字词的定制化纠错方法、系统、设备及介质 |
| CN116306598B (zh) * | 2023-05-22 | 2023-09-08 | 上海蜜度信息技术有限公司 | 针对不同领域字词的定制化纠错方法、系统、设备及介质 |
| CN116842140A (zh) * | 2023-08-25 | 2023-10-03 | 北京知呱呱科技有限公司 | 一种机器生成文本的检测方法及系统 |
| CN116842140B (zh) * | 2023-08-25 | 2024-01-26 | 北京知呱呱科技有限公司 | 一种机器生成文本的检测方法及系统 |
| CN117350283A (zh) * | 2023-10-11 | 2024-01-05 | 西安栗子互娱网络科技有限公司 | 文本缺陷检测方法、装置、设备和存储介质 |
| CN119808763A (zh) * | 2024-12-18 | 2025-04-11 | 福建亿榕信息技术有限公司 | 一种电力文本智能纠错方法及系统 |
| CN120373292A (zh) * | 2025-04-21 | 2025-07-25 | 语风文化科技(南通)有限公司 | 文本纠错方法、系统及存储介质 |
| CN120706434A (zh) * | 2025-06-30 | 2025-09-26 | 广东奔潮科技发展有限公司 | 一种法律文本小样本增强训练的智能处理系统 |
| CN120706434B (zh) * | 2025-06-30 | 2026-01-02 | 广东奔潮科技发展有限公司 | 一种法律文本小样本增强训练的智能处理系统 |
| CN120808760A (zh) * | 2025-07-31 | 2025-10-17 | 北京文聿科技有限公司 | 一种语音识别模型的自进化方法及系统 |
| CN120578765A (zh) * | 2025-08-01 | 2025-09-02 | 山东浪潮智能生产技术有限公司 | 一种基于大模型的文本处理方法、系统、终端及存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112380840B (zh) | 2024-05-07 |
| CN112380840A (zh) | 2021-02-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2022105083A1 (zh) | 文本纠错方法、装置、设备及介质 | |
| CN112668313B (zh) | 句子智能纠错方法、装置、计算机设备及存储介质 | |
| CN112528637B (zh) | 文本处理模型训练方法、装置、计算机设备和存储介质 | |
| CN111310443A (zh) | 一种文本纠错方法和系统 | |
| CN109992664B (zh) | 争议焦点的标注分类方法、装置、计算机设备和存储介质 | |
| CN114416984A (zh) | 基于人工智能的文本分类方法、装置、设备及存储介质 | |
| WO2020238553A1 (zh) | 测试语料生成方法、装置、计算机设备和存储介质 | |
| CN111737979B (zh) | 语音文本的关键词修正方法、装置、修正设备及存储介质 | |
| CN112395861A (zh) | 中文文本的纠错方法、装置和计算机设备 | |
| CN113268564B (zh) | 相似问题的生成方法、装置、设备及存储介质 | |
| CN113270103A (zh) | 基于语义增强的智能语音对话方法、装置、设备及介质 | |
| CN111651978A (zh) | 基于实体的词法检查方法与装置和计算机设备及存储介质 | |
| CN114510925A (zh) | 一种中文文本纠错方法、系统、终端设备及存储介质 | |
| CN113948066A (zh) | 一种实时转译文本的纠错方法、系统、存储介质和装置 | |
| CN116484843A (zh) | 一种文本纠错方法、装置、计算机设备及存储介质 | |
| CN119580739A (zh) | 语音识别纠错方法、装置、设备及介质 | |
| CN114595158A (zh) | 基于人工智能的测试用例生成方法、装置、设备及介质 | |
| CN114416925B (zh) | 敏感词识别方法、装置、设备、存储介质及程序产品 | |
| CN112231556A (zh) | 基于对话场景的用户画像方法、装置、设备及介质 | |
| CN120297267B (zh) | 文本纠错方法、装置、电子设备及存储介质 | |
| CN112329391A (zh) | 目标编码器生成方法、装置、电子设备和计算机可读介质 | |
| CN114254706B (zh) | 一种序列识别模型训练方法、装置、电子设备及存储介质 | |
| CN112000767B (zh) | 一种基于文本的信息抽取方法和电子设备 | |
| CN120234354A (zh) | 基于自然语言的数据统计方法、装置、设备和存储介质 | |
| HK40040480B (zh) | 文本纠错方法、装置、设备及介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21893241 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 21893241 Country of ref document: EP Kind code of ref document: A1 |