WO2021135444A1 - 一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质 - Google Patents

一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021135444A1
WO2021135444A1 PCT/CN2020/117577 CN2020117577W WO2021135444A1 WO 2021135444 A1 WO2021135444 A1 WO 2021135444A1 CN 2020117577 W CN2020117577 W CN 2020117577W WO 2021135444 A1 WO2021135444 A1 WO 2021135444A1
Authority
WO
WIPO (PCT)
Prior art keywords
phrase
text
character
corrected
word
Prior art date
Application number
PCT/CN2020/117577
Other languages
English (en)
French (fr)
Inventor
郑立颖
徐亮
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021135444A1 publication Critical patent/WO2021135444A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/232Orthographic correction, e.g. spell checking or vowelisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N7/00Computing arrangements based on specific mathematical models
    • G06N7/01Probabilistic graphical models, e.g. probabilistic networks

Definitions

  • This application relates to big data processing, and in particular to an artificial intelligence-based text error correction method, device, computer equipment and storage medium.
  • Text error correction is one of the difficult problems in natural language processing. Text errors mainly include word errors, substitution errors, legal errors, word errors, multi-character errors, and missing characters. There are widespread phonological substitution errors in text data. For example, “short board” is incorrectly written as “short class”, and “assisted decision-making” is incorrectly written as “assisted decision-making”. The existence of the wrong word usually directly leads to the word segmentation error, and the word segmentation error makes the semantics of the text confused and brings difficulties to the text processing. There are many application scenarios for text error correction, including input method error correction, ASR (speech-to-text) error correction, and official document writing error correction.
  • ASR speech-to-text
  • this error correction method has high requirements on the training data set, and requires a large amount of incorrectly labeled corpus to be collected in the early stage to train a usable text error correction model.
  • the inventor realizes that in special scenarios, for example, there are many expression terms in specific scenarios in the official document scenario, and it is easy to misclassify or fail to identify the phenomenon using the existing word tool, and it is easy to be unrecognized due to the general error correction model.
  • This application provides an artificial intelligence-based text error correction method, device, computer equipment and storage medium to solve the problem of text error correction.
  • An artificial intelligence-based text error correction method includes: acquiring historical official document data, wherein the historical official document data includes official document text; performing new word discovery processing on the official document text to obtain new words; Added to the original dictionary database to obtain the target dictionary database after adding the new word; obtain the original text to be corrected; determine the original text to be corrected according to the original text to be corrected and the target dictionary database Candidate error words; determine the homophone set of each candidate error word according to each candidate error word; respectively replace the candidate error words of the original text to be corrected with the corresponding homophone words in the homophone set to obtain The error-corrected text collection selects the error-corrected text that exceeds a preset text smoothness from the error-corrected text collection as the final error-corrected text.
  • An artificial intelligence-based text error correction device includes: a first acquisition module for acquiring historical official document data, wherein the historical official document data includes a document text new word discovery module, which performs new word discovery processing on the official document text, Obtain new words; new word adding module, adding the new words to the original dictionary database, and obtaining the target dictionary database after adding the new words; the second acquiring module, acquiring the original text to be corrected; the first determining module, Determine the candidate error word in the original text to be corrected according to the original text to be corrected and the target dictionary database; the second determining module determines the error word candidate in each of the candidate error words according to each candidate error word Homophone collection; a replacement module, which replaces the candidate error words of the original text to be corrected with corresponding homophones in the homophone collection to obtain a collection of error-corrected texts; a selection module, which selects from the collection of error-corrected texts The corrected text that exceeds the preset text smoothness is regarded as the final corrected text.
  • a computer device includes a memory, a processor, and computer-readable instructions stored in the memory and capable of running on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions: Get history Official document data, wherein the historical official document data includes official document text; new word discovery processing is performed on the official document text to obtain a new word; the new word is added to the original dictionary database, and the new word is obtained after adding the new word
  • the target dictionary library obtain the original text to be corrected; determine the candidate error words in the original text to be corrected according to the original text to be corrected and the target dictionary library; determine each error word according to each candidate The homophone set of the candidate error words; respectively replacing the candidate error words of the original text to be corrected with the corresponding homophone words in the homophone word set to obtain the error-corrected text set and select more than one from the error-corrected text set
  • the error-corrected text of the preset text smoothness is used as the final error-corrected text. .
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps: obtaining historical official document data, Wherein, the historical official document data includes official document text; performing new word discovery processing on the official document text to obtain new words; adding the new words to the original dictionary database to obtain the target dictionary database after adding the new words Obtain the original text to be corrected; determine the candidate error words in the original text to be corrected according to the original text to be corrected and the target dictionary library; determine each candidate according to each candidate error word Homophone set of wrong words; respectively replacing the candidate wrong words of the original text to be corrected with corresponding homophone words in the set of homophones to obtain the set of error-corrected texts selecting more than a preset from the set of error-corrected texts
  • the corrected text of the text smoothness is regarded as the final corrected text.
  • FIG. 1 is a flowchart of a method for text error correction based on artificial intelligence in an embodiment of the present application
  • FIG. 2 is another flowchart of a text error correction method based on artificial intelligence in an embodiment of the present application
  • FIG. 3 is another flowchart of a text error correction method based on artificial intelligence in an embodiment of the present application
  • FIG. 4 is another flowchart of a text error correction method based on artificial intelligence in an embodiment of the present application
  • FIG. 5 is a functional block diagram of a text error correction device based on artificial intelligence in an embodiment of the present application
  • Fig. 6 is a schematic diagram of a computer device in an embodiment of the present application.
  • a method for text error correction based on artificial intelligence is provided.
  • the method is applied to a server as an example for description, including the following steps:
  • the historical official document data in the official document writing scene is obtained, and the official document text refers to the sentence, paragraph, word, etc. in the official document writing scene.
  • the artificial intelligence-based text error correction method of this application refers to a method of automatically identifying and correcting problems that occur during the use of natural language.
  • the characters of the official document text are sequentially divided into multiple groups in order, and the obtained multiple groups are used as a candidate phrase set;
  • the word segmentation toolkit is used to segment the official document text to obtain the word segmentation set corresponding to the official document text Delete the word segmentation set corresponding to the official document text from the candidate phrase set to obtain a target candidate phrase set; for the phrase of the target candidate phrase set, calculate according to the probability of each word in each phrase to obtain the target The score corresponding to each phrase in the candidate phrase set; sort the score corresponding to each phrase in the target candidate phrase set to obtain the ranking result; according to the ranking result and a preset threshold, the scores in the target candidate phrase set are sorted The phrase is filtered and new words are obtained.
  • the original dictionary library is the Jieba dictionary library.
  • developers can specify their own custom dictionary to include words that are not in the Jieba dictionary library, and understandably add the new words to the Jieba dictionary
  • a target dictionary database after adding the new words is obtained, and the target dictionary database is used to determine candidate error words for the subsequent original text to be corrected.
  • the target dictionary database may also be stored in a node of a blockchain.
  • S50 Determine candidate error words in the original text to be corrected based on the original text to be corrected and the target dictionary library.
  • step S50 that is, determining the candidate error words in the original text to be corrected according to the original text to be corrected and the target dictionary library specifically includes The following steps:
  • S51 Perform word segmentation processing on the original text to be corrected according to the word segmentation tool to obtain the word segmentation of the original text to be corrected.
  • the jieba toolkit is used to perform word segmentation processing on the original text to be corrected to obtain the word segmentation of the original text to be corrected. Understandably, the jieba toolkit combines rule-based and statistics-based methods.
  • the prefix dictionary means that the words in the dictionary are arranged in the order in which the prefixes are included. For example, "buy” appears in the dictionary, and then words starting with “buy” will appear in this part, such as "Buy” Water” and then “buy fruits", thus forming a hierarchical containment structure.
  • a word segmentation scheme corresponds to a word segmentation path from the first character to the last character, forming a directed acyclic ring of all possible word segmentation results Figure.
  • S52 Use the statistical language analysis toolkit to analyze the phrases in the word segmentation set corresponding to the original text to be corrected to obtain the analysis result of whether the phrase in the word segmentation set corresponding to the original text to be corrected exists in the existing dictionary database .
  • the statistical language analysis toolkit can be the kenlm tool.
  • the statistical language model trained by the kenlm tool is a statistical language model trained based on the People’s Daily corpus.
  • the kenlm tool has faster training speed and supports single-machine big data training;
  • the common words extracted by the statistical language model from the corpus of the People’s Daily are used as the existing dictionary database; determine whether the phrase in the word segmentation set corresponding to the original text to be corrected exists in the existing dictionary database, and the word segmentation corresponding to the original text to be corrected is obtained The analysis result of whether the phrase in the collection exists in the existing dictionary database.
  • the analysis result is that the phrase in the word segmentation set corresponding to the error correction original text does not exist in the existing dictionary database, then it is determined whether the word segmentation of the original text to be corrected exists in the target dictionary database. If the analysis result is that the phrase in the word segmentation set corresponding to the error correction original text exists in the existing dictionary database, there is no need to perform error correction on the phrase in the word segmentation set.
  • the word segmentation of the original text to be corrected exists in the target dictionary database, and if the word segmentation of the original text to be corrected does not exist in the target dictionary database, it is determined that the word segmentation of the original text to be corrected does not exist in the target dictionary database.
  • the word segmentation of the wrong original text is a candidate error word; if the word segmentation of the original text to be corrected is stored in the target dictionary database, there is no need to correct the phrase in the word segmentation set.
  • the statistical language analysis toolkit is used to analyze the original text to be corrected.
  • the phrase in the word segmentation set is analyzed, so as to realize unsupervised typo recognition for the phrase in the word segmentation set corresponding to the original text to be corrected.
  • Python provides a library for converting Chinese characters into pinyin, named PyPinyin, which can be used for Chinese character pinyin, sorting, retrieval, etc.
  • PyPinyin toolkit is used to find each of the original texts to be corrected. Several homophones corresponding to the wrong candidate words are assembled, and then several homophones corresponding to the wrong candidate words are assembled to form a homophone set.
  • the candidate erroneous words are replaced with several homophones corresponding to them to obtain the error-corrected text set.
  • S80 Select the corrected text that exceeds a preset text smoothness from the set of corrected texts as the final corrected text.
  • step S80 that is, selecting an error-corrected text that exceeds a preset text smoothness from the error-corrected text set as the final error-corrected text, specifically includes the following steps:
  • p(w1w2...wn) p(w1)*p(w2
  • p(w1w2...wn) is the sentence fluency score of the corrected text after the homophones are replaced; w1 is the first word in the corrected text; p(w1) is the corrected text The probability of the first word in the text; wn is the nth word in the corrected text; p(wn) is the probability of the nth word in the corrected text; p(wn
  • the statistical language model trained by the kenlm tool is used to calculate the sentence fluency scores after replacing the candidate wrong words with homophones, and obtain the sentence fluency scores of the corrected text after using different homophones for replacement, and select more than
  • the error-corrected text of the preset text smoothness is used as the final error-corrected text.
  • the preset text smoothness refers to a preset value, for example, the preset text smoothness is 0.5, 0.6, 0.7, and so on.
  • p(w1w2...wn) is the sentence fluency score of the corrected text after the homophones are replaced; w1 is the first word; p(w1) is the probability of the first word; wn is the nth Words; p(wn) is the probability of the nth word; p(wn
  • the probability distribution calculated by the language model is different from the "ideal" probability distribution. Therefore, it is necessary to evaluate the ideal probability distribution of the model.
  • the common way to evaluate the language model is perplexity. Degree is also called complexity, confusion, etc. The greater the probability of a sentence, the smaller the perplexity.
  • S82 Select the corrected text that exceeds the preset text smoothness as the final corrected text.
  • the preset text smoothness refers to the degree of reasonableness of the text language, and the preset text smoothness can be 0.6, 0.7, 0.8, etc., which is not specifically limited by this application.
  • the candidate wrong word is "fascinated by the authorities”
  • the different homophones are “fascinated by the authorities”
  • the authorities are intimid by the authorities”
  • the corrected text after using different homophones to replace them is "now in the era of fans of the authorities.
  • Now we are in the era of obsessive documents” has a smoothness score of 0.9, which has been corrected.
  • the smoothness score of the sentence with the wrong text "Now in the era of the authority Zemi” is 0.5
  • the sentence with the corrected text "Now in the era of document obsession” has a smoothness score of 0.6
  • the default text is smooth
  • the degree is 0.8
  • the corrected text "now in the era of the authority Zemi” that exceeds the preset text smoothness "0.8” is selected as the final corrected text.
  • the Bayesian formula in the statistical language model is used to calculate the sentence fluency score of the error-corrected text, which can improve the accuracy of the fluency score calculation and further improve the accuracy of the selection of the error-corrected text.
  • the historical official document data is acquired, the new word discovery process is performed on the official document text, and then the new word is added to the dictionary database, so that it can be mined
  • the words in the official document scene are used as a supplement to the dictionary library, and the obtained target dictionary library contains new words of specific terms in the official document scene; then the to-be-corrected original text and the target dictionary library are determined according to the original text to be corrected and the target dictionary library.
  • Candidate error words in the original text avoid the problem that the general error correction model will not recognize specific terms and correct the correct content; then replace the candidate error words with homophones; select more than expected from the set of corrected texts.
  • the corrected text of the text smoothness is the final corrected text, and the final error correction result is filtered by calculating the smoothness score, so as to improve the accuracy of the text error correction based on artificial intelligence.
  • step S20 that is, performing new word discovery processing on the official document text to obtain new words, specifically includes the following steps:
  • the characters of the official document text are sequentially divided into two-tuples and triples in order, and the obtained two-tuples and triples are used as candidate phrase sets.
  • the characters "new”, “word”, “fa”, and “present” of the official document "new word found” are divided into two-tuples and triples in sequence, and the corresponding two-tuples are " “New words”, “cifa”, “discovery”, the triples have “newwords", “words found”, will get the two-tuples "new words”, “cifa”, “discover” and ternary
  • the group new word generation", "word discovery” as a set of candidate phrases.
  • the characters of the official document text are sequentially divided into two-tuples and triples in order, and the obtained two-tuples and triples are used as candidate phrase sets, so as to realize that each group in the official document text is divided into two-tuples and three-tuples. Phrases that may become new words are split into independent words.
  • S22 Use a word segmentation toolkit to segment the official document text to obtain a word segmentation set corresponding to the official document text.
  • the word segmentation toolkit may be a jieba toolkit.
  • the jieba toolkit to analyze the official document text "new word discovery”, and obtain the word segmentation sets "new word” and "discovery” corresponding to the official document text.
  • step S24 that is, the phrase for the target candidate phrase set is calculated according to the probability of each word in each of the phrase, to obtain the target candidate phrase set
  • the score corresponding to each phrase includes the following steps:
  • the two-tuples in the target candidate phrase set include “cifa” and the triples include “new wordfa” and "word discovery”. If the phrase in the target candidate phrase set is the two-tuple "cifa” , The word “cifa” in the target candidate phrase set is divided into the first character "word” and the second character “fa” in order; if the phrase in the target candidate phrase set is the triple "new wordfa” , The word “Xin Ci Fa" in the target candidate phrase set will be split into the first character “ ⁇ ” and the second character “Fa” in order, or the word “Xin Ci Fa” will be split into the first character “Word Send" and the second character "new”.
  • the step of dividing the phrase in the target candidate phrase set into a first character and a second character in sequence includes the following steps :
  • step S244 that is, for each phrase in the target candidate phrase set, the probability of the first character corresponding to each phrase, the probability of the second character, and the phrase
  • the probability of occurrence, the information entropy on the left side of the phrase, and the information entropy on the right side of the phrase to obtain the score corresponding to each phrase specifically includes the following steps:
  • p(x,y) is the probability that the first character x and the second character y appear together
  • p(x) is the probability of the first character x
  • p(y) is the probability of the second character y
  • LE is the phrase The information entropy on the left
  • RE is the information entropy on the right of the phrase.
  • the calculated information entropy of each word can be used as the weight of the word.
  • the score calculation formula is adopted, based on the probability of the first character of the phrase in the two-tuple, the probability of the second character in the two-tuple, and the phrase of the two-tuple.
  • the probability of occurrence, the information entropy on the left side of the phrase of the two-tuple, and the information entropy on the right side of the two-tuple are obtained, and the score corresponding to each phrase in the two-tuple is obtained, and the score is calculated according to the above calculation parameters Further improve the accuracy of the score corresponding to each phrase, and determine the probability of each phrase as a new word according to the score corresponding to each phrase.
  • the sequence of dividing the phrases in the target candidate phrase set into the first character and the second character in sequence includes:
  • the method also includes:
  • p(x,y) is the probability that the first character x and the second character y appear together
  • p(x) is the probability of the first character x
  • p(y) is the probability of the second character y
  • LE is the phrase The information entropy on the left
  • RE is the information entropy on the right of the phrase.
  • a double character refers to a character string, a double character includes two single characters, and a single character only includes one character.
  • the phrase in the target candidate phrase set is the triple "Xin Ci Fa", then the words "Xin Ci Fa" in the target candidate phrase set are divided into the first character " ⁇ " and the second character "Fa” in order.
  • the score calculation formula is adopted, according to the probability of the first character of the phrase in the triplet, the probability of the second character in the triplet, and the occurrence of the phrase of the triplet. Probability, the information entropy on the left side of the phrase of the triple and the information entropy on the right side of the triple, obtain multiple scores corresponding to the phrase of the triple, and calculate the scores according to the above calculation parameters to further increase the three The accuracy of the score corresponding to the phrase of the tuple, and the probability of each phrase as a new word according to the score corresponding to each phrase.
  • the probability of the first character corresponding to each phrase, the probability of the second character appearing, and the phrase are corresponding to the score corresponding to each phrase, and the score is calculated according to the above calculation parameters to improve the score corresponding to each phrase Accuracy, and judge the probability of each phrase as a new word according to the score corresponding to each phrase.
  • S25 Sort the scores corresponding to each phrase in the target candidate phrase set to obtain a ranking result.
  • each phrase in the target candidate phrase set is sorted according to the score value to obtain the sorting result.
  • S26 Screen the phrases in the target candidate phrase set according to the sorting result and the preset threshold to obtain new words.
  • the preset threshold value is a preset value, for example, the preset threshold value may be 0.6, 0.7, 0.8, etc., scores less than the preset threshold value are eliminated, and the target corresponding to the score that exceeds the preset threshold value is selected
  • the phrase in the candidate phrase set is used as a new word.
  • the new word discovery is performed in the official document scene, the characters of the official document text are sequentially divided into multiple groups, the obtained multiple groups are used as a candidate phrase set, and then the word segmentation toolkit is removed and used After the word segmentation is performed, the word segmentation set is obtained to obtain the target candidate phrase set; then for the phrase of the target candidate phrase set, the probability of each word in the phrase is calculated to obtain the score corresponding to each phrase in the target candidate phrase set, Finally, according to the sorting results and preset thresholds, the phrases in the target candidate phrase set are screened to obtain new words. This process can automatically mine new words in the scene as a supplement to the dictionary.
  • an artificial intelligence-based text error correction device corresponds to the artificial intelligence-based text error correction method in the above-mentioned embodiment in a one-to-one correspondence.
  • the artificial intelligence-based text error correction device includes a first acquisition module 10, a new word discovery module 20, a new word addition module 30, a second acquisition module 40, a first determination module 50, and a second determination module. 60.
  • each functional module acquires historical official document data, wherein the historical official document data includes official document text;
  • the new word discovery module 20 performs new word discovery processing on the official document text to obtain new words New word adding module 30, adding the new word to the original dictionary database, and obtaining the target dictionary database after adding the new word;
  • the target dictionary library can also be stored in a node of a blockchain.
  • the second obtaining module 40 obtains the original text to be corrected; the first determining module 50 determines the candidate error words in the original text to be corrected based on the original text to be corrected and the target dictionary library; second determination The module 60 determines the homophone set of each candidate error word according to each of the candidate error words; the replacement module 70 replaces the candidate error words of the original text to be corrected with corresponding homophones in the homophone set , Obtain an error-corrected text collection; the selection module 80 selects an error-corrected text that exceeds a preset text smoothness from the error-corrected text collection as the final error-corrected text.
  • each module in the above-mentioned artificial intelligence-based text error correction device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor.
  • the processor executes the computer-readable instructions, The following steps are achieved: acquiring historical official document data, where the historical official document data includes official document text; performing new word discovery processing on the official document text to obtain new words; adding the new words to the original dictionary database to obtain the addition
  • the target dictionary database after the new words; it should be emphasized that, in order to further ensure the privacy and security of the target dictionary database, the target dictionary database may also be stored in a node of a blockchain.
  • the corrected text of the text smoothness is regarded as the final corrected text.
  • one or more readable storage media storing computer readable instructions are provided.
  • the readable storage medium stores computer readable instructions.
  • the readable storage media provided in this embodiment include non-transitory A volatile readable storage medium and a volatile readable storage medium.
  • the one or more processors implement the following steps: obtain historical official document data, wherein the The historical official document data includes the official document text; the new word discovery process is performed on the official document text to obtain the new word; the new word is added to the original dictionary database to obtain the target dictionary database after adding the new word; to obtain the pending correction Error original text; determine the candidate error words in the original text to be corrected according to the original text to be corrected and the target dictionary library; determine the homophone of each candidate error word according to each of the candidate error words Set; respectively replace the candidate error words of the original text to be corrected with corresponding homophone words in the homophone word set to obtain an error-corrected text set; select a text smoothness that exceeds a preset from the
  • Non-volatile 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 many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (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)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Optimization (AREA)
  • Computing Systems (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Mathematical Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Mathematics (AREA)
  • Algebra (AREA)
  • Machine Translation (AREA)

Abstract

一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质,涉及大数据处理,该方法部分包括:将新词加入到词典库中;确定出待纠错原文本中的候选错误词;确定出同音词集合;分别将候选错误词对应替换为同音词;选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。考虑到公文书场景下特有的术语表达,对公文文本进行新词发现处理,再将新词加入到词典库中,这样能够挖掘公文书场景下的词作为词典库的补充,目标词典库就含有公文场景下特有的术语的新词;再确定待纠错原文本的候选错误词,避免通用的纠错模型将未识别出特定术语而给将正确的内容改错的问题。该方法还涉及区块链技术,目标词典库存储于区块链中。

Description

一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质
本申请要求于 2020628日提交中国专利局、申请号为 202010598449.8,发明名称为“ 一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及大数据处理,尤其涉及一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质。
背景技术
文本纠错是自然语言处理中的难题之一。文本错误主要有用字错误、替换错误、法错误、用词错误、多字错误和缺字错误等。文本数据中广泛存在音似词替换错误,例如,“短板”被误写为“短班”、“辅助决策”被误写为“扶助决策”等。错词的存在通常直接导致分词错误,而分词错误又使得文本的语义混乱,给文本处理带来困难。文本纠错的应用场景很多,包括输入法纠错、ASR(语音转文字)纠错、公文书写纠错。
目前已有的纠错方法:使用端到端的深度学习方法同时完成错误识别和错误修正步骤,输出修正后的句子结果。
技术问题
但是,这种纠错方法对训练数据集的要求较高,需要前期收集较多的错误标注语料才能训练出可用的文本纠错模型。
发明人意识到,在特殊的场景下,例如,公文书场景下存在很多特定场景的表达术语,使用现成分词工具很容易误分或者无法识别的现象,容易出现由于通用的纠错模型将未识别出特定术语而给将正确的内容改错的问题。
技术解决方案
本申请提供一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质,以解决文本纠错问题。
一种基于人工智能的文本纠错方法,包括:获取历史公文数据,其中,所述历史公文数据中包括公文文本;对所述公文文本进行新词发现处理,得到新词;将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;获取待纠错原文本;根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;根据每个所述候选错误词确定每个所述候选错误词的同音词集合;分别将所述待纠错原文本的候选错误词替换为所 述同音词集合中对应的同音词,得到已纠错文本集合从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
一种基于人工智能的文本纠错装置,包括:第一获取模块,获取历史公文数据,其中,所述历史公文数据中包括公文文本新词发现模块,对所述公文文本进行新词发现处理,得到新词;新词加入模块,将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;第二获取模块,获取待纠错原文本;第一确定模块,根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;第二确定模块,根据每个所述候选错误词确定每个所述候选错误词的同音词集合;替换模块,分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;选取模块,从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:获取历史公文数据,其中,所述历史公文数据中包括公文文本;对所述公文文本进行新词发现处理,得到新词;将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;获取待纠错原文本;根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;根据每个所述候选错误词确定每个所述候选错误词的同音词集合;分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:获取历史公文数据,其中,所述历史公文数据中包括公文文本;对所述公文文本进行新词发现处理,得到新词;将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;获取待纠错原文本;根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;根据每个所述候选错误词确定每个所述候选错误词的同音词集合;分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
有益效果
上述基于人工智能的文本纠错方法、装置、计算机设备及存储介质,所实现的其中一个方案中,考虑到公文书场景下特有的术语表达,获取历史公文数据,对所述公文文本进行新词发现处理,再将新词加入到词典库中,这样,能够挖掘公文书场景下的词作为词典库的补充,得到的目标词典库就含有公文场景下特有的术语的新词;再根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本的候选错误词,避免了通用的纠错模型将未识别出特定术语而给将正确的内容改错的问题;接着将候选错误词替换为同音词,从已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本,通过计算 通顺度分值来筛选出最终的纠错结果,以提高基于人工智能的文本纠错的准确性。
本申请的一个或多个实施例的细节在下面的附图和描述中提出,本申请的其他特征和优点将从说明书、附图以及权利要求变得明显。
附图说明
为了更清楚地说明本申请的技术方案,下面将对本申请的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中基于人工智能的文本纠错方法的一流程图;
图2是本申请一实施例中基于人工智能的文本纠错方法的另一流程图;
图3是本申请一实施例中基于人工智能的文本纠错方法的另一流程图;
图4是本申请一实施例中基于人工智能的文本纠错方法的另一流程图;
图5是本申请一实施例中基于人工智能的文本纠错装置的一原理框图;
图6是本申请一实施例中计算机设备的一示意图。
具体实施方式
下面将结合本申请中的附图,对本申请中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在一实施例中,如图1所示,提供一种基于人工智能的文本纠错方法,以该方法应用在服务器为例进行说明,包括如下步骤:
S10:获取历史公文数据,其中,所述历史公文数据中包括公文文本。
可理解地,获取公文书写场景下的历史公文数据,公文文本是指公文书写场景下的句子、段落、词语等。需要强调的是,本申请的基于人工智能的文本纠错方法指的是对于自然语言在使用过程中出现的问题自动进行识别和纠正的方法。
S20:对所述公文文本进行新词发现处理,得到新词。
可理解地,按顺序依次对所述公文文本的字符拆成多元组,将得到的多元组作为候选词组集合;采用分词工具包对所述公文文本进行分词,得到所述公文文本对应的分词集合;从所述候选词组集合中删除所述公文文本对应的分词集合,得到目标候选词组集合;针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值;对所述目标候选词组集合中每个词组对应的分值进行排序,得到排序结果;根据所述排序结果和预设阈值对目标候选词组集合中的词组进行筛选,得到新词。
S30:将所述新词加入到原词典库中,得到加入所述新词后的目标词典库。
示例性地,原词典库为jieba词典库,在jieba词典库中开发者可以指定自己自定义的词典,以便包含jieba词典库里没有的词,可理解地,将所述新词加入到jieba词典库中,得到加入所述新词后的目标词典库,所述目标词典库用于对后续待纠错原文本进行候选错误词进行确定的。需要强调的是,为进一步保证上述目标词典库的私密和安全性,上述目标词典库还可以存储于一区块链的节点中。
S40:获取待纠错原文本。
可理解地,获取可能需要进行纠错的待纠错原文本。
S50:根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词。
在一实施例中,如图4所示,步骤S50中,也即所述根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词,具体包括如下步骤:
S51:根据分词工具对所述待纠错原文本进行分词处理,得到待纠错原文本的分词。
示例性地,采用jieba工具包对所述待纠错原文本进行分词处理得到待纠错原文本的分词。可理解地,jieba工具包结合了基于规则和基于统计这两类方法。首先基于前缀词典进行词图扫描,前缀词典是指词典中的词按照前缀包含的顺序排列,例如词典中出现了“买”,之后以“买”开头的词都会出现在这一部分,例如“买水”,进而“买水果”,从而形成一种层级包含结构。若将词看成节点,词与词之间的分词符看成边,则一种分词方案对应着从第一个字到最后一个字的一条分词路径,形成全部可能分词结果的有向无环图。
S52:采用统计语言分析工具包对所述待纠错原文本对应的分词集合中的词组进行分析,得到待纠错原文本对应的分词集合中的词组是否存在于现有词典库中的分析结果。
示例性地,统计语言分析工具包可以为kenlm工具,kenlm工具训练的统计语言模型是基于人民日报语料训练出的统计语言模型,kenlm工具训练速度也更快,而且支持单机大数据的训练;基于统计语言模型从人民日报语料中提取的常用词作为现有词典库;判断所述待纠错原文本对应的分词集合中的词组是否存在现有词典库中,得到待纠错原文本对应的分词集合中的词组是否存在于现有词典库中的分析结果。
可理解地,若分析结果为所述纠错原文本对应的分词集合中的词组不存在于现有词典库中,则判断所述待纠错原文本的分词是否存在于所述目标词典库中,若分析结果为所述纠错原文本对应的分词集合中的词组存在现有词典库中,则不需要对分词集合中的词组进行纠错。
S53:若所述分析结果为所述纠错原文本对应的分词集合中的词组不存在于现有词典库中,则判断所述待纠错原文本的分词是否存在于所述目标词典库中。
S54:若所述待纠错原文本的分词不存在于所述目标词典库中,则确定所述待纠错原文本的分词为候选错误词。
可理解地,判断所述待纠错原文本的分词是否存在于所述目标词典库中,若所述待纠 错原文本的分词不存在于所述目标词典库中,则确定所述待纠错原文本的分词为候选错误词;若所述待纠错原文本的分词存在所述目标词典库中,则不需要对分词集合中的词组进行纠错。
在图4对应的实施例中,在基于人工智能的文本纠错的过程中,考虑到公文场景错别字标注语料较少的情况下,采用统计语言分析工具包对所述待纠错原文本对应的分词集合中的词组进行分析,从而实现对所述待纠错原文本对应的分词集合中的词组进行无监督的错别字识别。
S60:根据每个所述候选错误词确定每个所述候选错误词的同音词集合。
示例性地,Python中提供了汉字转拼音的库,名字叫做PyPinyin,可以用于汉字注音、排序、检索等等场合,在本实施例中采用PyPinyin工具包找出待纠错原文本的每个候选错误词对应的若干个同音词,再将该候选错误词对应的若干同音词集合起来组成同音词集合。
S70:分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合。
可理解地,考虑到错误音似词和与其对应的正确词的上下文语境相同,将候选错误词替换为与其对应的若干个同音词,得到已纠错文本集合。
S80:从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
在一实施例中,步骤S80中,也即所述从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本,具体包括如下步骤:
S81:采用统计语言模型中的贝叶斯公式计算所述已纠错文本集合中同音词替换后的已纠错文本的句子通顺度分值,得到已纠错文本的句子通顺度分值,其中贝叶斯公式如下,
p(w1w2...wn)=p(w1)*p(w2|w1)*p(w3|w1w2)....p(wn|w1w2w3...wn-1);
其中,p(w1w2...wn)为同音词进行替换后的已纠错文本的句子通顺度分值;w1为已纠错文本中的第一个词;p(w1)为已纠错文本中的第一个词的概率;wn为已纠错文本中的第n个词;p(wn)为已纠错文本中第n个词的概率;p(wn|w1w2w3...wn-1)为给定前面的词为w1w2w3...wn-1,求后面的词wn出现的条件概率;
示例性地,使用kenlm工具训练的统计语言模型计算将候选错误词替换为同音词后的句子通顺度分值,得到采用不同的同音词进行替换后的已纠错文本的句子通顺度分值,选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。可理解地,预设的文本通顺度是指预先设定的数值,例如,预设的文本通顺度为0.5、0.6、0.7等。
可理解地,采用如下统计语言模型中的贝叶斯公式进行计算:
p(w1w2...wn)=p(w1)*p(w2|w1)*p(w3|w1w2)....p(wn|w1w2w3...wn-1)
其中,p(w1w2...wn)为同音词进行替换后的已纠错文本的句子通顺度分值;w1为第一个词;p(w1)为第一个词的概率;wn为第n个词;p(wn)为第n个词的概率; p(wn|w1w2w3...wn-1)为给定前面的词为w1w2w3...wn-1,求后面的词wn出现的条件概率;
同时,语言模型计算出的概率分布与“理想”的概率分布是有差别的,因此需要对模型理想的概率分布进行评价,而评价语言模型的常见的方式就是困混度(perplexity),困混度也被称为复杂度、混淆度等,句子出现的概率越大,那么perplexity就越小。
S82:选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
可理解地,预设的文本通顺度是指文本语言的通顺合理的程度,预设的文本通顺度可以为0.6、0.7、0.8等,具体本申请不做限定。例如,候选错误词为“当局着迷”,不同的同音词为“当局者迷”、“当局则米”、“单据着迷”,采用不同的同音词进行替换后的已纠错文本为“如今正处于当局者迷的时代”、“如今正处于当局则米的时代”、“如今正处于单据着迷的时代”;其中,,已纠错文本为“如今正处于当局者迷的时代”的句子通顺度分值为0.9,已纠错文本为“如今正处于当局则米的时代”的句子通顺度分值为0.5、已纠错文本为“如今正处于单据着迷的时代”的句子通顺度分值为0.6,预设的文本通顺度为0.8,最终选取超过预设的文本通顺度“0.8”的已纠错文本“如今正处于当局则米的时代”作为最终的已纠错文本。
在本实施例中,采用统计语言模型中的贝叶斯公式计算已纠错文本的句子通顺度分值,能够提高通顺度分值计算的准确度,进一步提高已纠错文本选取的准确性。
在图1对应的实施例中,考虑到公文书场景下特有的术语表达,获取历史公文数据,对所述公文文本进行新词发现处理,再将新词加入到词典库中,这样,能够挖掘公文书场景下的词作为词典库的补充,得到的目标词典库就含有公文场景下特有的术语的新词;再根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本的候选错误词,避免了通用的纠错模型将未识别出特定术语而给将正确的内容改错的问题;接着将候选错误词替换为同音词;从已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本,通过计算通顺度分值来筛选出最终的纠错结果,以提高基于人工智能的文本纠错的准确性。
在一实施例中,如图2所示,步骤S20中,也即所述对所述公文文本进行新词发现处理,得到新词,具体包括如下步骤:
S21:按顺序依次对所述公文文本的字符拆成多元组,将得到的多元组作为候选词组集合。
示例性地,按顺序依次对所述公文文本的字符拆成二元组和三元组,将得到的二元组和三元组作为候选词组集合。例如,按顺序依次对所述公文文本“新词发现”的字符“新”、“词”、“发”、“现”拆成二元组和三元组,得到对应的二元组有“新词”,“词发”,“发现”,三元组有“新词发”,“词发现”,将得到的二元组“新词”,“词发”,“发现”和三元组“新词发”,“词发现”作为候选词组集合。
本方案的实施例中,按顺序依次对所述公文文本的字符拆成二元组和三元组,将得到的二元组和三元组作为候选词组集合,以实现将公文文本中每组可能成为新词的词组拆分 成独立的词。
S22:采用分词工具包对所述公文文本进行分词,得到所述公文文本对应的分词集合。
示例性地,所述分词工具包可以为jieba工具包。例如,采用jieba工具包对公文文本“新词发现”进行分析,得到公文文本对应的分词集合“新词”和“发现”。
S23:从所述候选词组集合中删除所述公文文本对应的分词集合,得到目标候选词组集合。
例如,从候选词组集合的二元组“新词”,“词发”,“发现”和三元组“新词发”,“词发现”中删除公文文本对应的分词集合的“新词”和“发现”,得到目标候选词组集合二元组“词发”和三元组“新词发”,“词发现”。
S24:针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值。
在一实施例中,如图3所示,步骤S24中,也即所述针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值,具体包括如下步骤:
S241:按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符。
可理解地,目标候选词组集合中的二元组包括“词发”和三元组包括“新词发”,“词发现”,若目标候选词组集合中的词组为二元组“词发”,则按顺序依次将目标候选词组集合中的词语“词发”拆成第一字符“词”和第二字符“发”;若目标候选词组集合中的词组为三元组“新词发”,则按顺序依次将目标候选词组集合中的词语“新词发”拆成第一字符“新词”和第二字符“发”,或者将词语“新词发”拆成第一字符“词发”和第二字符“新”。
S242:获取所述第一字符出现的概率、所述第二字符出现的概率以及所述目标候选词组集合的词组出现的概率。
S243:获取所述目标候选词组集合的词组的左侧的信息熵以及所述目标候选词组集合的词组的右侧的信息熵。
S244:针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值。
在一实施例中,当所述目标候选词组集合中的词组为二元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,具体包括如下步骤:
按顺序依次将所述二元组拆分成第一字符和第二字符,其中,所述第一字符和所述第二字符均为单字符;
在步骤S244中,也即所述针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值,具体包括 如下步骤:
采用如下分值计算公式,根据所述二元组中的词组的第一字符出现的概率、所述二元组中的第二字符出现的概率、所述二元组的词组出现的概率、所述二元组的词组左侧的信息熵以及所述二元组右侧的信息熵,得到二元组中的每个词组对应的分值;
Figure PCTCN2020117577-appb-000001
其中,
Figure PCTCN2020117577-appb-000002
p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
可理解地,计算出每个词的信息熵可以用来作为词的权重,信息熵公式如下:H(w)=-∑plog(p),其中w为该词,p为该词左右出现的不同词的数目,例如某篇文章中分别出现了两次A、W、C,一次B、W、D,那么W的左侧信息熵为:
Figure PCTCN2020117577-appb-000003
2/3表示词组A在3次中出现了2次,B只出现了一次,故为1/3;同理W右侧的信息熵也是一样的;如果某个词的左右信息熵都很大,那这个词就很可能是关键词。
在本实施例中,采用分值计算公式,根据所述二元组中的词组的第一字符出现的概率、所述二元组中的第二字符出现的概率、所述二元组的词组出现的概率、所述二元组的词组左侧的信息熵以及所述二元组右侧的信息熵,得到二元组中的每个词组对应的分值,根据上述计算参数进行分值计算进一步提高每个词组对应的分值的准确性,并根据每个词组对应的分值来判断每个词组的作为新词的概率。
在一实施例中,当所述目标候选词组集合中的词组为三元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,包括:
按顺序依次将所述二元组拆分成第一字符和第二字符,其中,所述第一字符为双字符,所述第二字符均为单字符;
所述方法还包括:
采用如下分值计算公式,根据三元组中的词组的第一字符出现的概率、所述三元组中的第二字符出现的概率、所述三元组的词组出现的概率、所述三元组的词组左侧的信息熵以及所述三元组右侧的信息熵,得到三元组的词组对应的多个分值;
Figure PCTCN2020117577-appb-000004
其中,
Figure PCTCN2020117577-appb-000005
p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
可理解地,双字符是指字符串,双字符包括两个单字符,单字符只包括一个字符。目标候选词组集合中的词组为三元组“新词发”,则按顺序依次将目标候选词组集合中的词语“新词发”拆成第一字符“新词”和第二字符“发”,或者将词语“新词发”拆成第一字符“词发”和第二字符“新”;若按顺序依次将目标候选词组集合中的词语“新词发”拆成第一字符“新词”和第二字符“发”,得到的分值为0.3;若按顺序依次将目标候选词组集合中的词语““新词发”拆成第一字符“新”和第二字符“词发”,得到的分值为0.5。
在本实施例中,采用分值计算公式,根据三元组中的词组的第一字符出现的概率、所述三元组中的第二字符出现的概率、所述三元组的词组出现的概率、所述三元组的词组左侧的信息熵以及所述三元组右侧的信息熵,得到三元组的词组对应的多个分值,根据上述计算参数进行分值计算进一步提高三元组的词组对应的分值的准确性,并根据每个词组对应的分值来判断每个词组的作为新词的概率。
在图3对应的实施例中,针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,对应得到每个词组对应的分值,根据上述计算参数进行分值计算以提高每个词组对应的分值的准确性,并根据每个词组对应的分值来判断每个词组的作为新词的概率。
S25:对所述目标候选词组集合中每个词组对应的分值进行排序,得到排序结果。
可理解地,按照score分值的高低对目标候选词组集合中每个词组进行排序,得到排序结果。
S26:根据所述排序结果和预设阈值对目标候选词组集合中的词组进行筛选,得到新词。
示例性地,预设阈值为预先设定的数值,例如,预设阈值可以为0.6、0.7、0.8等,对小于所述预设阈值的score进行剔除,选取超过预设阈值的score对应的目标候选词组集合中的词组作为新词。
在图2对应的实施例中,对公文书场景下进行新词发现,按顺序依次对所述公文文本的字符拆成多元组,将得到的多元组作为候选词组集合,再去除利用分词工具包进行分词后得到的分词集合,得到目标候选词组集合;再针对所述目标候选词组集合的词组,根据词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值,最后根据排序结果和预设阈值对目标候选词组集合中的词组进行筛选,得到新词,这个过程能够自动挖掘该场景下的新词作为词典的补充。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施过程构成任何限定。
在一实施例中,提供一种基于人工智能的文本纠错装置,该基于人工智能的文本纠错装置与上述实施例中基于人工智能的文本纠错方法一一对应。如图5所示,该基于人工智能的文本纠错装置包括第一获取模块10、新词发现模块20、新词加入模块30、第二获取模块40、第一确定模块50、第二确定模块60、替换模块70和选取模块80。各功能模块详细说明如下:第一获取模块10,获取历史公文数据,其中,所述历史公文数据中包括公文文本;新词发现模块20,对所述公文文本进行新词发现处理,得到新词;新词加入模块30,将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;需要强调的是,为进一步保证上述目标词典库的私密和安全性,上述目标词典库还可以存储于一区块链的节点中。第二获取模块40,获取待纠错原文本;第一确定模块50,根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;第二确定模块60,根据每个所述候选错误词确定每个所述候选错误词的同音词集合;替换模块70,分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;选取模块80,从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
关于基于人工智能的文本纠错装置的具体限定可以参见上文中对于基于人工智能的文本纠错方法的限定,在此不再赘述。上述基于人工智能的文本纠错装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,如图6所示,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现以下步骤:获取历史公文数据,其中,所述历史公文数据中包括公文文本;对所述公文文本进行新词发现处理,得到新词;将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;需要强调的是,为进一步保证上述目标词典库的私密和安全性,上述目标词典库还可以存储于一区块链的节点中。获取待纠错原文本;根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;根据每个所述候选错误词确定每个所述候选错误词的同音词集合;分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
在一个实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,该可读存储介质上存储有计算机可读指令,本实施例所提供的可读存储介质包括非易失性可读存储介质和易失性可读存储介质,该计算机可读指令被一个或多个处理器执行时,使得一个 或多个处理器实现以下步骤:获取历史公文数据,其中,所述历史公文数据中包括公文文本;对所述公文文本进行新词发现处理,得到新词;将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;获取待纠错原文本;根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;根据每个所述候选错误词确定每个所述候选错误词的同音词集合;分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。

Claims (20)

  1. 一种基于人工智能的文本纠错方法,其中,包括:
    获取历史公文数据,其中,所述历史公文数据中包括公文文本;
    对所述公文文本进行新词发现处理,得到新词;
    将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;
    获取待纠错原文本;
    根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;
    根据每个所述候选错误词确定每个所述候选错误词的同音词集合;
    分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;
    从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
  2. 如权利要求1所述的基于人工智能的文本纠错方法,其中,所述对所述公文文本进行新词发现处理,得到新词,包括:
    按顺序依次对所述公文文本的字符拆成多元组,将得到的多元组作为候选词组集合;
    采用分词工具包对所述公文文本进行分词,得到所述公文文本对应的分词集合;
    从所述候选词组集合中删除所述公文文本对应的分词集合,得到目标候选词组集合;
    针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值;
    对所述目标候选词组集合中每个词组对应的分值进行排序,得到排序结果;
    根据所述排序结果和预设阈值对目标候选词组集合中的词组进行筛选,得到新词。
  3. 如权利要求2所述的基于人工智能的文本纠错方法,其中,所述针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值,包括:
    按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符;
    获取所述第一字符出现的概率、所述第二字符出现的概率以及所述词组出现的概率;
    获取所述词组的左侧的信息熵以及所述词组的右侧的信息熵;
    针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值。
  4. 如权利要求3所述的基于人工智能的文本纠错方法,其中,当所述目标候选词组集合中的词组为二元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,包括:
    按顺序依次将所述二元组拆分成第一字符和第二字符,其中,所述第一字符和所述第二字符均为单字符;
    所述针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值,包括:
    采用如下分值计算公式得到每个词组对应的分值;
    Figure PCTCN2020117577-appb-100001
    其中,
    Figure PCTCN2020117577-appb-100002
    p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
  5. 如权利要求3所述的基于人工智能的文本纠错方法,其中,当所述目标候选词组集合中的词组为三元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,包括:
    按顺序依次将所述三元组拆分成第一字符和第二字符,其中,所述第一字符为双字符,所述第二字符均为单字符;
    所述针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值,包括:
    采用如下分值计算公式得到每个词组对应的分值;
    Figure PCTCN2020117577-appb-100003
    其中,
    Figure PCTCN2020117577-appb-100004
    p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
  6. 如权利要求1所述的基于人工智能的文本纠错方法,其中,所述根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词,包括:
    根据分词工具对所述待纠错原文本进行分词处理,得到待纠错原文本的分词;
    采用统计语言分析工具包对所述待纠错原文本对应的分词集合中的词组进行分析,得到待纠错原文本对应的分词集合中的词组是否存在于现有词典库中的分析结果;
    若所述纠错原文本对应的分词集合中的词组不存在于现有词典库中,则判断所述待纠错原文本的分词是否存在于所述目标词典库中;
    若所述待纠错原文本的分词不存在于所述目标词典库中,则确定所述待纠错原文本的分词为候选错误词。
  7. 如权利要求1所述的基于人工智能的文本纠错方法,其中,所述从所述已纠错文 本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本,包括:
    采用统计语言模型中的贝叶斯公式计算所述已纠错文本集合中同音词替换后的已纠错文本的句子通顺度分值,得到已纠错文本的句子通顺度分值,其中贝叶斯公式如下,
    p(w1w2...wn)=p(w1)*p(w2|w1)*p(w3|w1w2)....p(wn|w1w2w3...wn-1);
    其中,p(w1w2...wn)为同音词进行替换后的已纠错文本的句子通顺度分值;w1为已纠错文本中的第一个词;p(w1)为已纠错文本中的第一个词的概率;wn为已纠错文本中的第n个词;p(wn)为已纠错文本中的第n个词的概率;p(wn|w1w2w3...wn-1)为给定前面的词为w1w2w3...wn-1,求后面的词wn出现的条件概率;
    选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
  8. 一种基于人工智能的文本纠错装置,其中,包括:
    第一获取模块,获取历史公文数据,其中,所述历史公文数据中包括公文文本;
    新词发现模块,对所述公文文本进行新词发现处理,得到新词;
    新词加入模块,将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;
    第二获取模块,获取待纠错原文本;
    第一确定模块,根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;
    第二确定模块,根据每个所述候选错误词确定每个所述候选错误词的同音词集合;
    替换模块,分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;
    选取模块,从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取历史公文数据,其中,所述历史公文数据中包括公文文本;
    对所述公文文本进行新词发现处理,得到新词;
    将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;
    获取待纠错原文本;
    根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;
    根据每个所述候选错误词确定每个所述候选错误词的同音词集合;
    分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;
    从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
  10. 如权利要求9所述的计算机设备,其中,所述对所述公文文本进行新词发现处理,得到新词,包括:
    按顺序依次对所述公文文本的字符拆成多元组,将得到的多元组作为候选词组集合;
    采用分词工具包对所述公文文本进行分词,得到所述公文文本对应的分词集合;
    从所述候选词组集合中删除所述公文文本对应的分词集合,得到目标候选词组集合;
    针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值;
    对所述目标候选词组集合中每个词组对应的分值进行排序,得到排序结果;
    根据所述排序结果和预设阈值对目标候选词组集合中的词组进行筛选,得到新词。
  11. 如权利要求10所述的计算机设备,其中,所述针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值,包括:
    按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符;
    获取所述第一字符出现的概率、所述第二字符出现的概率以及所述词组出现的概率;
    获取所述词组的左侧的信息熵以及所述词组的右侧的信息熵;
    针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值。
  12. 如权利要求11所述的计算机设备,其中,当所述目标候选词组集合中的词组为二元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,包括:
    按顺序依次将所述二元组拆分成第一字符和第二字符,其中,所述第一字符和所述第二字符均为单字符;
    所述针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值,包括:
    采用如下分值计算公式得到每个词组对应的分值;
    Figure PCTCN2020117577-appb-100005
    其中,
    Figure PCTCN2020117577-appb-100006
    p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
  13. 如权利要求11所述的计算机设备,其中,当所述目标候选词组集合中的词组为三元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,包括:
    按顺序依次将所述三元组拆分成第一字符和第二字符,其中,所述第一字符为双字符,所述第二字符均为单字符;
    所述针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字 符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值,包括:
    采用如下分值计算公式得到每个词组对应的分值;
    Figure PCTCN2020117577-appb-100007
    其中,
    Figure PCTCN2020117577-appb-100008
    p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
  14. 如权利要求9所述的计算机设备,其中,所述根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词,包括:
    根据分词工具对所述待纠错原文本进行分词处理,得到待纠错原文本的分词;
    采用统计语言分析工具包对所述待纠错原文本对应的分词集合中的词组进行分析,得到待纠错原文本对应的分词集合中的词组是否存在于现有词典库中的分析结果;
    若所述纠错原文本对应的分词集合中的词组不存在于现有词典库中,则判断所述待纠错原文本的分词是否存在于所述目标词典库中;
    若所述待纠错原文本的分词不存在于所述目标词典库中,则确定所述待纠错原文本的分词为候选错误词。
  15. 一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    获取历史公文数据,其中,所述历史公文数据中包括公文文本;
    对所述公文文本进行新词发现处理,得到新词;
    将所述新词加入到原词典库中,得到加入所述新词后的目标词典库;
    获取待纠错原文本;
    根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词;
    根据每个所述候选错误词确定每个所述候选错误词的同音词集合;
    分别将所述待纠错原文本的候选错误词替换为所述同音词集合中对应的同音词,得到已纠错文本集合;
    从所述已纠错文本集合中选取超过预设的文本通顺度的已纠错文本作为最终的已纠错文本。
  16. 如权利要求15所述的可读存储介质,其中,所述对所述公文文本进行新词发现处理,得到新词,包括:
    按顺序依次对所述公文文本的字符拆成多元组,将得到的多元组作为候选词组集合;
    采用分词工具包对所述公文文本进行分词,得到所述公文文本对应的分词集合;
    从所述候选词组集合中删除所述公文文本对应的分词集合,得到目标候选词组集合;
    针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值;
    对所述目标候选词组集合中每个词组对应的分值进行排序,得到排序结果;
    根据所述排序结果和预设阈值对目标候选词组集合中的词组进行筛选,得到新词
  17. 如权利要求16所述的可读存储介质,其中,所述针对所述目标候选词组集合的词组,根据各所述词组中每个词出现的概率计算,得到目标候选词组集合中每个词组对应的分值,包括:
    按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符;
    获取所述第一字符出现的概率、所述第二字符出现的概率以及所述词组出现的概率;
    获取所述词组的左侧的信息熵以及所述词组的右侧的信息熵;
    针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值。
  18. 如权利要求17所述的可读存储介质,其中,当所述目标候选词组集合中的词组为二元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,包括:
    按顺序依次将所述二元组拆分成第一字符和第二字符,其中,所述第一字符和所述第二字符均为单字符;
    所述针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵以及所述词组右侧的信息熵,得到每个词组对应的分值,包括:
    采用如下分值计算公式得到每个词组对应的分值;
    Figure PCTCN2020117577-appb-100009
    其中,
    Figure PCTCN2020117577-appb-100010
    p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
  19. 如权利要求17所述的可读存储介质,其中,当所述目标候选词组集合中的词组为三元组时,所述按顺序依次将所述目标候选词组集合的词组拆成第一字符和第二字符,包括:
    按顺序依次将所述三元组拆分成第一字符和第二字符,其中,所述第一字符为双字符,所述第二字符均为单字符;
    所述针对所述目标候选词组集合中的每个词组,分别根据每个词组对应的所述第一字符出现的概率、所述第二字符出现的概率、所述词组出现的概率、所述词组左侧的信息熵 以及所述词组右侧的信息熵,得到每个词组对应的分值,包括:
    采用如下分值计算公式得到每个词组对应的分值;
    Figure PCTCN2020117577-appb-100011
    其中,
    Figure PCTCN2020117577-appb-100012
    p(x,y)为第一字符x和第二字符y共同出现的概率,p(x)为第一字符x出现的概率,p(y)为第二字符y出现的概率,LE为词组左侧的信息熵,RE为词组右侧的信息熵。
  20. 如权利要求15所述的可读存储介质,其中,所述根据所述待纠错原文本和所述目标词典库确定所述待纠错原文本中的候选错误词,包括:
    根据分词工具对所述待纠错原文本进行分词处理,得到待纠错原文本的分词;
    采用统计语言分析工具包对所述待纠错原文本对应的分词集合中的词组进行分析,得到待纠错原文本对应的分词集合中的词组是否存在于现有词典库中的分析结果;
    若所述纠错原文本对应的分词集合中的词组不存在于现有词典库中,则判断所述待纠错原文本的分词是否存在于所述目标词典库中;
    若所述待纠错原文本的分词不存在于所述目标词典库中,则确定所述待纠错原文本的分词为候选错误词。
PCT/CN2020/117577 2020-06-28 2020-09-25 一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质 WO2021135444A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010598449.8A CN111753531B (zh) 2020-06-28 2020-06-28 基于人工智能的文本纠错方法、装置、设备及存储介质
CN202010598449.8 2020-06-28

Publications (1)

Publication Number Publication Date
WO2021135444A1 true WO2021135444A1 (zh) 2021-07-08

Family

ID=72677602

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117577 WO2021135444A1 (zh) 2020-06-28 2020-09-25 一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN111753531B (zh)
WO (1) WO2021135444A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113673228A (zh) * 2021-09-01 2021-11-19 阿里巴巴达摩院(杭州)科技有限公司 文本纠错方法、装置、计算机存储介质及计算机程序产品
CN114595681A (zh) * 2022-02-08 2022-06-07 清华大学 文本切分方法及装置
CN116137149A (zh) * 2023-04-18 2023-05-19 杰创智能科技股份有限公司 语音识别方法、装置和设备
CN116306620A (zh) * 2023-05-24 2023-06-23 上海蜜度信息技术有限公司 文本处理方法、训练方法、存储介质及电子设备
CN117093464A (zh) * 2023-10-17 2023-11-21 青岛海尔乐信云科技有限公司 一种用户进线实时监控预警方法及系统
CN117523590A (zh) * 2023-11-10 2024-02-06 广州方舟信息科技有限公司 一种校验生产厂商名称的方法、装置、设备及存储介质
CN114595681B (zh) * 2022-02-08 2024-05-28 清华大学 文本切分方法及装置

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112784581B (zh) * 2020-11-20 2024-02-13 网易(杭州)网络有限公司 文本纠错方法、装置、介质及电子设备
CN112528882B (zh) * 2020-12-15 2024-05-10 平安科技(深圳)有限公司 基于ocr识别房产证信息确定方法、装置、设备及介质
CN112580324B (zh) * 2020-12-24 2023-07-25 北京百度网讯科技有限公司 文本纠错方法、装置、电子设备以及存储介质
CN113033185B (zh) * 2021-05-28 2021-08-10 中国电子技术标准化研究院 标准文本纠错方法、装置、电子设备和存储介质
CN114822527A (zh) * 2021-10-11 2022-07-29 北京中电慧声科技有限公司 一种语音转文本的纠错方法、装置及电子设备和存储介质
CN114742040A (zh) * 2022-06-09 2022-07-12 北京沃丰时代数据科技有限公司 文本纠错方法、文本纠错装置及电子设备
CN115146636A (zh) * 2022-09-05 2022-10-04 华东交通大学 一种中文错别字纠错处理方法、系统及存储介质
CN115440333B (zh) * 2022-11-08 2023-02-24 深圳达实旗云健康科技有限公司 数据采集过程中的数据处理方法、装置、终端设备及介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9037967B1 (en) * 2014-02-18 2015-05-19 King Fahd University Of Petroleum And Minerals Arabic spell checking technique
CN108304385A (zh) * 2018-02-09 2018-07-20 叶伟 一种语音识别文本纠错方法及装置
CN110210029A (zh) * 2019-05-30 2019-09-06 浙江远传信息技术股份有限公司 基于垂直领域的语音文本纠错方法、系统、设备及介质
CN110276077A (zh) * 2019-06-25 2019-09-24 上海应用技术大学 中文纠错的方法、装置及设备
CN110826322A (zh) * 2019-10-22 2020-02-21 中电科大数据研究院有限公司 一种新词发现和词性预测及标注的方法
CN111090986A (zh) * 2019-11-29 2020-05-01 福建亿榕信息技术有限公司 一种公文文档纠错的方法

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105955950A (zh) * 2016-04-29 2016-09-21 乐视控股(北京)有限公司 新词发现方法及装置
CN108091328B (zh) * 2017-11-20 2021-04-16 北京百度网讯科技有限公司 基于人工智能的语音识别纠错方法、装置及可读介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9037967B1 (en) * 2014-02-18 2015-05-19 King Fahd University Of Petroleum And Minerals Arabic spell checking technique
CN108304385A (zh) * 2018-02-09 2018-07-20 叶伟 一种语音识别文本纠错方法及装置
CN110210029A (zh) * 2019-05-30 2019-09-06 浙江远传信息技术股份有限公司 基于垂直领域的语音文本纠错方法、系统、设备及介质
CN110276077A (zh) * 2019-06-25 2019-09-24 上海应用技术大学 中文纠错的方法、装置及设备
CN110826322A (zh) * 2019-10-22 2020-02-21 中电科大数据研究院有限公司 一种新词发现和词性预测及标注的方法
CN111090986A (zh) * 2019-11-29 2020-05-01 福建亿榕信息技术有限公司 一种公文文档纠错的方法

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113673228A (zh) * 2021-09-01 2021-11-19 阿里巴巴达摩院(杭州)科技有限公司 文本纠错方法、装置、计算机存储介质及计算机程序产品
CN114595681A (zh) * 2022-02-08 2022-06-07 清华大学 文本切分方法及装置
CN114595681B (zh) * 2022-02-08 2024-05-28 清华大学 文本切分方法及装置
CN116137149A (zh) * 2023-04-18 2023-05-19 杰创智能科技股份有限公司 语音识别方法、装置和设备
CN116306620A (zh) * 2023-05-24 2023-06-23 上海蜜度信息技术有限公司 文本处理方法、训练方法、存储介质及电子设备
CN116306620B (zh) * 2023-05-24 2023-09-05 上海蜜度信息技术有限公司 文本处理方法、训练方法、存储介质及电子设备
CN117093464A (zh) * 2023-10-17 2023-11-21 青岛海尔乐信云科技有限公司 一种用户进线实时监控预警方法及系统
CN117093464B (zh) * 2023-10-17 2024-01-26 青岛海尔乐信云科技有限公司 一种用户进线实时监控预警方法及系统
CN117523590A (zh) * 2023-11-10 2024-02-06 广州方舟信息科技有限公司 一种校验生产厂商名称的方法、装置、设备及存储介质
CN117523590B (zh) * 2023-11-10 2024-05-28 广州方舟信息科技有限公司 一种校验生产厂商名称的方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN111753531A (zh) 2020-10-09
CN111753531B (zh) 2024-03-12

Similar Documents

Publication Publication Date Title
WO2021135444A1 (zh) 一种基于人工智能的文本纠错方法、装置、计算机设备及存储介质
WO2022142613A1 (zh) 训练语料扩充方法及装置、意图识别模型训练方法及装置
US10303761B2 (en) Method, non-transitory computer-readable recording medium storing a program, apparatus, and system for creating similar sentence from original sentences to be translated
Wilkinson et al. Neural Ctrl-F: segmentation-free query-by-string word spotting in handwritten manuscript collections
CN110853625B (zh) 语音识别模型分词训练方法、系统、移动终端及存储介质
CN111428474A (zh) 基于语言模型的纠错方法、装置、设备及存储介质
CN108021545B (zh) 一种司法文书的案由提取方法及装置
CN111859921A (zh) 文本纠错方法、装置、计算机设备和存储介质
CN103678271B (zh) 一种文本校正方法及用户设备
TWI567569B (zh) Natural language processing systems, natural language processing methods, and natural language processing programs
CN105808528A (zh) 一种文档文字的处理方法
WO2022052484A1 (zh) 文本情绪识别方法、装置、终端设备和存储介质
CN109858025B (zh) 一种地址标准化语料的分词方法及系统
CN109885641B (zh) 一种数据库中文全文检索的方法及系统
CN112016319A (zh) 预训练模型获取、疾病实体标注方法、装置及存储介质
CN110532569B (zh) 一种基于中文分词的数据碰撞方法及系统
CN112989806A (zh) 一种智能化文本纠错模型训练方法
CN113221542A (zh) 一种基于多粒度融合与Bert筛选的中文文本自动校对方法
CN113420766B (zh) 一种融合语言信息的低资源语种ocr方法
US20220019737A1 (en) Language correction system, method therefor, and language correction model learning method of system
CN112287657B (zh) 基于文本相似度的信息匹配系统
US11645474B2 (en) Computer-implemented method for text conversion, computer device, and non-transitory computer readable storage medium
CN110929514B (zh) 文本校对方法、装置、计算机可读存储介质及电子设备
CN112559725A (zh) 文本匹配方法、装置、终端和存储介质
CN112765976A (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: 20910938

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: 20910938

Country of ref document: EP

Kind code of ref document: A1