WO2018120889A1 - 输入语句的纠错方法、装置、电子设备及介质 - Google Patents

输入语句的纠错方法、装置、电子设备及介质 Download PDF

Info

Publication number
WO2018120889A1
WO2018120889A1 PCT/CN2017/099706 CN2017099706W WO2018120889A1 WO 2018120889 A1 WO2018120889 A1 WO 2018120889A1 CN 2017099706 W CN2017099706 W CN 2017099706W WO 2018120889 A1 WO2018120889 A1 WO 2018120889A1
Authority
WO
WIPO (PCT)
Prior art keywords
statement
word
error
language model
correct
Prior art date
Application number
PCT/CN2017/099706
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 WO2018120889A1 publication Critical patent/WO2018120889A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • 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

Definitions

  • the present application belongs to the field of information processing, and in particular, to an error correction method, device, electronic device and medium for inputting a sentence.
  • the input method refers to an encoding method used to input various symbols into a computer or other intelligent terminal. According to different input devices, the input method can be divided into keyboard input method, voice input method and handwriting input method. Since the technology of the keyboard input method is difficult to implement and the input text accuracy is high, the range of the use group is wider than the other two input methods.
  • the Chinese Pinyin input method has become one of the most commonly used keyboard input methods for users.
  • the user inputs the wrong pinyin letters or selects the wrong candidate words, resulting in the final input result not being the Chinese character actually needed by the user.
  • the problem sentences input by the user are relatively short, if the sentence entered at this time contains the wrong words, the intelligent question answering system cannot correctly understand the actual problem of the user, thus giving The wrong answer to the question reduces the success rate of the automatic question and answer, which seriously restricts the development of the intelligent question answering system.
  • the embodiment of the present invention provides an error correction method, device, electronic device and medium for an input sentence, so as to solve the problem that the automatic question and answer success rate is low when the user inputs an incorrect sentence in the intelligent question answering system. .
  • a first aspect of the embodiments of the present invention provides an error correction method for an input statement, including:
  • the to-be-identified statement When the correct probability of the to-be-identified statement is lower than the error-checking threshold, it is determined that the to-be-identified statement is an error statement and performs error correction processing on the to-be-identified statement.
  • a second aspect of the embodiments of the present invention provides an error correction apparatus for an input sentence, including:
  • An obtaining module configured to obtain an error threshold of the language model, where the error threshold indicates that the input sentence is a critical probability value of the error statement;
  • a calculation module configured to input a statement to be recognized into the language model to calculate a correct outline of the statement to be recognized rate
  • an error correction module configured to determine that the to-be-identified statement is an error statement and perform error correction processing on the to-be-identified statement when a correct probability of the to-be-identified statement is lower than the error-determining threshold.
  • a third aspect of the embodiments of the present invention provides an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor executing the computer program The following steps are implemented:
  • the to-be-identified statement When the correct probability of the to-be-identified statement is lower than the error-checking threshold, it is determined that the to-be-identified statement is an error statement and performs error correction processing on the to-be-identified statement.
  • a computer readable storage medium storing a computer program, the computer program being executed by at least one processor, implements the following steps:
  • the to-be-identified statement When the correct probability of the to-be-identified statement is lower than the error-checking threshold, it is determined that the to-be-identified statement is an error statement and performs error correction processing on the to-be-identified statement.
  • the correct probability of the sentence to be recognized is output according to the language model, to determine whether the statement input by the user has an error, and the automatic detection of the correctness of the statement is realized, and the error to be recognized by the sentence to be recognized as the error statement is corrected.
  • the processing ensures that the user can automatically adjust the statement containing the incorrect word to the statement that meets the user's actual intention even if the wrong word is input in the intelligent question answering system, so that the intelligent question answering system can accurately understand the user's problem. Improve the success rate of automatic question and answer, which further promotes the development of intelligent question and answer technology.
  • FIG. 1 is a flowchart of an implementation of an error correction method for an input sentence according to an embodiment of the present invention
  • FIG. 3 is a specific implementation flowchart of an error correction method S12 of an input sentence according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a specific implementation of an error correction method S401 of an input sentence according to an embodiment of the present invention
  • FIG. 6 is a structural block diagram of an error correction apparatus for an input sentence according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of an electronic device according to an embodiment of the present invention.
  • the correct probability of the sentence to be recognized is output according to the language model, to determine whether the statement input by the user has an error, and the automatic detection of the correctness of the statement is realized, and the error to be recognized by the sentence to be recognized as the error statement is corrected.
  • the processing ensures that the user can automatically adjust the statement containing the incorrect word to the statement that meets the user's actual intention even if the wrong word is input in the intelligent question answering system, so that the intelligent question answering system can accurately understand the user's problem. Improve the success rate of automatic question and answer, which further promotes the development of intelligent question and answer technology.
  • FIG. 1 is a flowchart showing an implementation process of an error correction method for an input sentence according to an embodiment of the present invention, which is described in detail as follows:
  • a language model is constructed and trained based on the training corpus.
  • the training corpus is a language material that has actually appeared in actual use. According to different corpus collection units, the training corpus can be divided into three categories: discourse, sentence, and phrase.
  • the training corpus is used as the basic information for analysis and processing. According to the objective facts expressed by the corpus, the language abstraction mathematical modeling can be performed on the training corpus to obtain the final language model.
  • the training corpus in this embodiment is a normative text data in the field of intelligent question and answer and related fields, and a real user problem record text, and can train all training according to the difference between the real recorded text and the canonical text.
  • FIG. 2 shows a specific implementation flow of an error correction method S11 of an input sentence according to an embodiment of the present invention, which is described in detail as follows:
  • the original model of the language model is made with the N-Gram model, for the kth word in an input sentence (k is an integer greater than zero), since the occurrence of the kth word is only with the front k-1
  • the words are related and are not related to any other words, so the correct probability of the input sentence is known as the joint probability of all words in the sentence.
  • a word segmentation operation is performed on each of the training corpora to obtain a plurality of words.
  • the Chinese word segmentation method can be adopted. To get multiple words in the corpus.
  • the calculation process of the conditional probability includes:
  • first and second are used for distinguishing purposes only, and do not represent a specific numerical meaning.
  • each word in each training corpus is extracted, and for each of the words, the following operations are respectively performed:
  • the currently extracted words are used as comparison samples, and the words are matched and matched with all the words in all current training corpora. Once the same words are found in any training corpus, the first time is about the words. Add one to the number.
  • a certain word A in a training corpus and a subsequent adjacent word B of the word may appear simultaneously or separately in other training corpora.
  • the subsequent adjacent word B appear in the posterior position of the word A, the following three conditions must be met:
  • Condition 1 The word A and its subsequent adjacent word B need to appear simultaneously in a training corpus. That is, a training corpus contains both the word A and the subsequent adjacent word B.
  • Condition 2 The word A and its subsequent adjacent word B need to be in adjacent positions. If there are other words between the word A and the subsequent adjacent word B, then the adjacent word B is not adjacent to the word A.
  • Condition 3 The word A is located in front of the adjacent word B. That is, the word A needs to appear before the subsequent adjacent word B in a training corpus.
  • the number of subsequent adjoining words of the term appearing in the subsequent adjacent position of the term in all training corpora is increased by one.
  • n(w j ) of a certain word w i appearing in all training corpora and the number of subsequent adjacent words w j of the word appearing in the subsequent adjacent position of the word in all training corpora can be determined.
  • w j ) between the words w i , w j is estimated by the following formula:
  • conditional probabilities corresponding to the plurality of words are multiplied, and the language model is constructed and trained according to the obtained result after multiplication.
  • This embodiment calculates the correct probability of a training corpus according to the following principle: whether a word may appear in a sentence, and only relates to a word appearing in front of it.
  • w p-1 ) can pass the conditional probability in S102
  • the calculation method obtains a value indicating the conditional probability between each word in the training corpus and the subsequent contiguous word of each word.
  • the correct probability of the training corpus is obtained by multiplying the conditional probability between each word in the training corpus and the subsequent adjacent words of each word, and training according to the correct probability of each training corpus.
  • the language model is such that the language model can be used to calculate the correct probability of an unknown statement entered by the user.
  • an error threshold of the language model is obtained, and the error threshold indicates that the input sentence is a critical probability value of the error statement.
  • the normative text and the real user problem record text are also used as the test corpus. Therefore, the test corpus contains a plurality of input error sentence samples and input correct sentence samples. Using the language model to test each test corpus one by one, it can be judged whether each test corpus belongs to the correct statement or the wrong statement. The judgment result may be different from the real category of the test corpus. In order to reduce the possibility of occurrence of the difference, the accuracy of the judgment of the correctness of the sentence of the language model is improved, and the judgment threshold of whether a statement is correct or not is obtained by a statistical method.
  • the determining the error threshold of the language model includes:
  • M error sentences and N correct sentences are respectively input as the test corpus into the language model, and the correct probability of each of the erroneous sentences and the correct probability of each of the correct sentences are obtained.
  • each error sentence and each correct sentence are respectively input into the language model as an input parameter, and the output parameters of the correct probability of each test corpus are obtained through automatic operation processing of the language model.
  • the correct probability of each of the erroneous sentences and the correct probability of each of the correct sentences are statistically processed by a preset algorithm to obtain an error threshold of the language model.
  • the correct probability of the statement output by the language model is the theoretical calculation value, which may deviate from the actual correct probability.
  • the specific expression is: a common norm statement has a correct probability of 10% after being processed by the language model, and one obviously does not conform to the semantics.
  • the correct probability that the error statement is processed by the language model is 80%. Therefore, by counting the correct probability of multiple categories of test corpora, an optimal threshold of the correct probability can be selected as the error threshold of the language model, thereby improving the degree of association between the correct probability of the input sentence and the correctness of the input sentence.
  • the sentence to be recognized is input to the language model to calculate the correct probability of the sentence to be recognized.
  • the correct probability that the language model outputs the statement to be recognized is the same as the processing flow and the principle of the correct probability of outputting the test corpus in the above embodiment, and details are not described herein.
  • the sentence to be recognized is judged as a correct statement and directly input into the intelligent question answering system for use.
  • the correct probability of the statement to be recognized is lower than the error threshold, it indicates that the current statement to be recognized is less likely to appear in real life, and it is highly likely that the user inputs the wrong sentence. Therefore, the statement to be recognized is judged as an error statement.
  • the error correction processing is automatically performed, so that the to-be-identified statement can be adjusted to the correct statement that is most likely to express the user's real problem, and then input into the intelligent question answering system for use. .
  • the correct rate of the output parameters of the language model can be improved, and the correct probability of the sentence to be recognized is output according to the language model, so as to determine whether there is an error in the statement input by the user.
  • the automatic detection of the correctness of the statement through the error correction processing of the statement to be recognized as the error statement, ensures that the user can automatically insert the statement containing the incorrect word even if the wrong word is input in the intelligent question answering system. Adjusted to the statement that meets the user's actual wishes, so that the intelligent question answering system can accurately understand the user's problems and improve the success rate of the automatic question and answer, thereby further promoting the development of intelligent question and answer technology.
  • FIG. 4 shows a specific implementation flow of the error correction method S14 of the input sentence provided by the embodiment of the present invention, which is described in detail as follows:
  • the error word that may appear in the sentence to be recognized is obtained by a preset algorithm, and the error word is replaced to obtain a plurality of candidate sentences.
  • the multiple candidate statements for generating the to-be-identified statement include:
  • the reason why the word is wrong during the input process is that the candidate word selection error and the pinyin input error are the most likely, and each word has the possibility of error. Therefore, in the embodiment of the present invention, for each word in the sentence to be recognized, all words that are the same as or similar to the Chinese pronunciation of the word are obtained, that is, all homophones or similar words of the word are used as the corresponding words. Candidates.
  • homonyms of "invisible” include words such as “recessive”, “ginkgo”, “negative”, and the likes include words such as "information” and “welcome”. “Recessive”, “Ginkgo”, “negative”, “sound” and “welcome” all constitute candidates for the word “invisible” in the sentence to be identified.
  • At least one of the words to be recognized is replaced with the sound like word or the homophone corresponding to the word.
  • each of the to-be-identified sentences includes a plurality of words, and each word corresponds to a plurality of candidate words, and at least one of the words to be recognized is replaced with a sound-like word or a homophone corresponding to the word.
  • the expression is: replacing one word in the sentence to be recognized with one candidate word in the candidate word set corresponding to the word, or replacing a plurality of words in the to-be-identified sentence with one candidate word corresponding to each word.
  • the word “Blessed” in the sentence can be replaced with the homonym "package” corresponding to the word, or the word “good” can be replaced with the word corresponding to the word.
  • the homonym "living things”, or the words “goods” and “blessings” are replaced by their corresponding homophones "live” and "package”.
  • each of the to-be-identified statements after the completion of the replacement is respectively output as the candidate statement of the to-be-identified statement.
  • Each replacement action performed on the recognition statement can obtain a statement containing the candidate words after the replacement. After the execution of the multiple replacement actions, multiple statements different from each other are obtained, and each statement is output as one candidate statement. .
  • the first candidate statement is "This goods are ⁇ ?”; the word “goods” is replaced by the word corresponding to the word After the homonym "living things”, the second candidate sentence is "Blessed by this living thing”; when the words “goods” and “blessing” are simultaneously replaced with their corresponding homonyms "living things” and "packages", The third candidate statement is "This live thing?"
  • the correct probability of each of the candidate sentences is outputted using the language model.
  • each candidate sentence is input into the language model one by one, the correct probability of each candidate sentence is output through the analysis and processing of the language model.
  • the language model calculates the correct probability of each candidate sentence and the calculation of the test corpus in the above embodiment.
  • the flow and principle of the correct probability and the correct probability of the statement to be recognized are the same, and will not be repeated here.
  • one of the candidate statements with the highest correct probability is determined among all the candidate sentences, and the to-be-identified statement is corrected to the candidate statement.
  • the candidate statement By comparing the size of the correct probability of each candidate statement obtained in S402 to obtain a candidate statement in which the correct probability is the largest, the candidate statement has the greatest possibility of containing the original intention of the sentence to be recognized. Therefore, the statement to be recognized is corrected to the candidate statement with the highest probability of the correctness.
  • the correct rate of the output parameters of the language model can be improved, and the correct probability of the sentence to be recognized is output according to the language model, so as to determine whether there is an error in the statement input by the user
  • the automatic detection of the correctness of the statement through the error correction processing of the statement to be recognized as the error statement, ensures that the user can automatically adjust the wrong word to the wrong question when the wrong word is entered in the intelligent question answering system.
  • FIG. 6 is a structural block diagram of an error correction apparatus for an input sentence according to an embodiment of the present invention.
  • the apparatus may be located in a terminal such as a mobile phone, a computer, a tablet computer, a notebook computer, etc., for operating the embodiment of FIG. 1 to FIG. 5 of the present invention.
  • the error correction method of the input sentence For the convenience of explanation, only the parts related to the present embodiment are shown.
  • the apparatus includes:
  • the building module 61 is configured to construct and train the language model based on the training corpus.
  • the obtaining module 62 is configured to obtain an error threshold of the language model, where the error threshold indicates that the input sentence is a critical probability value of the error statement.
  • the calculating module 63 is configured to input a statement to be recognized into the language model to calculate a correct probability of the statement to be recognized.
  • the error correction module 64 is configured to determine that the to-be-identified statement is an error statement and perform error correction processing on the to-be-identified sentence when the correct probability of the to-be-identified statement is lower than the error-determining threshold.
  • the building module 61 includes:
  • the word segmentation module is configured to perform a word segmentation operation on each of the training corpora to obtain a plurality of words.
  • the conditional probability calculation module is configured to separately calculate a conditional probability between each of the words in the training corpus and the subsequent adjacent words.
  • a multiplication module configured to multiply the conditional probabilities corresponding to the plurality of words, and according to the result obtained by multiplying, Build and train the language model.
  • the conditional probability calculation module is specifically configured to:
  • the obtaining module 62 includes:
  • An input submodule configured to respectively input M error statements and N correct sentences as test corpus into the language model, to obtain the correct probability of each of the error statements and the correct probability of each of the correct sentences .
  • a statistic sub-module configured to perform statistical processing on the correct probability of each of the erroneous sentences and the correct probability of each of the correct sentences by a preset algorithm, to obtain an error threshold of the language model
  • M and N are integers greater than one.
  • the error correction module 64 includes:
  • a correction submodule configured to determine, in all of the candidate statements, the one of the candidate statements with the highest probability of correctness, and correct the statement to be recognized as the candidate statement.
  • the generating submodule is specifically configured to:
  • Each of the to-be-identified statements after the replacement is completed is output as the candidate statement of the to-be-identified statement.
  • the correct probability of the sentence to be recognized is output according to the language model, to determine whether the statement input by the user has an error, and the automatic detection of the correctness of the statement is realized, and the error to be recognized by the sentence to be recognized as the error statement is corrected.
  • the processing ensures that the user can automatically adjust the wrong word to a statement that conforms to the user's actual intention even if the wrong word is input in the intelligent question answering system, so that the intelligent question answering system can accurately understand the user's problem and improve the automatic The success rate of question and answer, which further promotes the development of intelligent question and answer technology.
  • FIG. 7 is a schematic diagram of an electronic device according to an embodiment of the present invention.
  • the electronic device 7 of this embodiment includes a processor 70, a memory 71, and a meter stored in the memory 71 and operable on the processor 70.
  • a computer program 72 such as a voiceprint recognition program.
  • the processor 70 executes the computer program 72 to implement the steps in the embodiment of the error correction method of each of the input statements described above, such as steps 11 through 14 shown in FIG.
  • the processor 70 when executing the computer program 72, implements the functions of the modules/units in the various apparatus embodiments described above, such as the functions of the modules 61-64 shown in FIG.
  • the computer program 72 can be partitioned into one or more modules/units that are stored in the memory 71 and executed by the processor 70 to complete this invention.
  • the one or more modules/units may be a series of computer program instructions that are capable of performing a particular function, the instruction segments being used to describe the execution of the computer program 72 in the electronic device 7.
  • the electronic device 7 can be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the electronic device 7 may include, but is not limited to, a processor 70, a memory 71. It will be understood by those skilled in the art that FIG. 7 is merely an example of the electronic device 7, and does not constitute a limitation on the electronic device 7, and may include more or less components than those illustrated, or combine some components, or different components.
  • the electronic device 7 may further include an input and output device, a network access device, a bus, and the like.
  • the processor 70 may be a central processing unit (CPU), or may be other general-purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the memory 71 may be an internal storage unit of the electronic device 7, such as a hard disk or memory of the electronic device 7.
  • the memory 71 may also be an external storage device of the electronic device 7, such as a plug-in hard disk equipped on the electronic device 7, a smart memory card (SMC), and a secure digital (SD). Card, flash card, etc. Further, the memory 71 may also include both an internal storage unit of the electronic device 7 and an external storage device.
  • the memory 71 is used to store the computer program and other programs and data required by the electronic device 7.
  • the memory 71 can also be used to temporarily store data that has been output or is about to be output.
  • each functional module and module described above is exemplified. In practical applications, the above functions may be assigned to different functional modules according to needs.
  • the module is completed by dividing the internal structure of the device into different functional modules or modules to perform all or part of the functions described above.
  • Each functional module and module in the embodiment may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module, and the integrated module may be implemented by hardware.
  • Formal implementation can also be implemented in the form of software functional modules.
  • each functional module, module The specific names are also for convenience of distinguishing from each other and are not intended to limit the scope of protection of the present application.
  • For the specific working process of the modules and modules in the foregoing system reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described herein again.
  • modules and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods for implementing the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the present invention.
  • the disclosed apparatus and method may be implemented in other manners.
  • the system embodiment described above is merely illustrative.
  • the division of the module or module is only a logical function division.
  • there may be another division manner for example, multiple modules or components may be used. Combinations can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be in electrical, mechanical or other form.
  • the modules described as separate components may or may not be physically separated.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
  • the integrated modules if implemented in the form of software functional modules and sold or used as separate products, may be stored in a computer readable storage medium.
  • the medium includes a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the embodiments of the present invention.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Machine Translation (AREA)

Abstract

本方案适用于信息处理领域,提供了输入语句的纠错方法、装置、电子设备及介质。该方法包括:基于训练语料构建并训练语言模型;获取语言模型的判错阈值,判错阈值表示输入语句为错误语句的临界概率值;将待识别语句输入语言模型,以计算出待识别语句的正确概率;当待识别语句的正确概率低于判错阈值时,判定待识别语句为错误语句并对待识别语句执行纠错处理。本方案实现了对语句正确性的自动检测,通过对判断为错误语句的待识别语句进行纠错处理,保证了用户在智能问答系统中即使输入了错误字词,也能将该错误的字词自动调整为符合用户实际意愿的语句,使得智能问答系统能准确理解用户的问题,提高自动问答的成功率,由此促进了智能问答技术发展。

Description

输入语句的纠错方法、装置、电子设备及介质 技术领域
本申请属于信息处理领域,尤其涉及一种输入语句的纠错方法、装置、电子设备及介质。
背景技术
输入法是指为将各种符号输入计算机或其他智能终端而使用的编码方法。依照输入设备的不同,输入法可分为键盘输入法、语音输入法以及手写输入法。由于键盘输入法的技术实现难度低且输入的文字准确率高,因此,相比于其他两种输入法来说,使用群体的范围更广。
目前,汉语拼音输入法已经成为用户最常使用的键盘输入法之一。但是,用户在使用拼音输入法的过程中,由于输入了错误的拼音字母或者选择了错误的候选词语,导致了最终输入的结果并非为用户实际所需的汉字。在机器智能问答领域中,由于用户输入的问题语句都比较短,因此,若此时输入的语句中包含有错误的字词,则会导致智能问答系统无法正确理解用户实际的问题,从而给出了错误的问题答案,降低了自动问答的成功率,严重制约了智能问答系统的发展。
技术问题
有鉴于此,本发明实施例提供了一种输入语句的纠错方法、装置、电子设备及介质,以解决目前当用户在智能问答系统中输入了错误的语句时,自动问答成功率低的问题。
技术解决方案
本发明实施例的第一方面,提供了一种输入语句的纠错方法,包括:
基于训练语料构建并训练语言模型;
获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率;
当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
本发明实施例的第二方面,提供了一种输入语句的纠错装置,包括:
构建模块,用于基于训练语料构建并训练语言模型;
获取模块,用于获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
计算模块,用于将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概 率;
纠错模块,用于当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
本发明实施例的第三方面,提供了一种电子设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机序时实现如下步骤:
基于训练语料构建并训练语言模型;
获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率;
当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
本发明实施例的第四方面,提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被至少一个处理器执行时实现如下步骤:
基于训练语料构建并训练语言模型;
获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率;
当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
有益效果
本发明实施例中,根据语言模型输出待识别语句的正确概率,以判断用户输入的语句是否存在错误,实现了对语句正确性的自动检测,通过对判断为错误语句的待识别语句进行纠错处理,保证了用户在智能问答系统中即使输入了错误的字词,也能将包含该错误字词的语句自动调整为符合用户实际意愿的语句,从而使智能问答系统能够准确理解用户的问题,提高自动问答的成功率,由此进一步促进了智能问答技术的发展。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例提供的输入语句的纠错方法的实现流程图;
图2是本发明实施例提供的输入语句的纠错方法S11的具体实现流程图;
图3是本发明实施例提供的输入语句的纠错方法S12的具体实现流程图;
图4是本发明实施例提供的输入语句的纠错方法S14的具体实现流程图;
图5是本发明实施例提供的输入语句的纠错方法S401的具体实现流程图;
图6是本发明实施例提供的输入语句的纠错装置的结构框图;
图7是本发明实施例提供的电子设备的示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本发明实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本发明。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本发明的描述。
本发明实施例中,根据语言模型输出待识别语句的正确概率,以判断用户输入的语句是否存在错误,实现了对语句正确性的自动检测,通过对判断为错误语句的待识别语句进行纠错处理,保证了用户在智能问答系统中即使输入了错误的字词,也能将包含该错误字词的语句自动调整为符合用户实际意愿的语句,从而使智能问答系统能够准确理解用户的问题,提高自动问答的成功率,由此进一步促进了智能问答技术的发展。
图1示出了本发明实施例提供的输入语句的纠错方法的实现流程,详述如下:
在S11中,基于训练语料构建并训练语言模型。
在本实施例中,训练语料是在实际使用中真实出现过的语言材料,按照语料采集单位的不同,训练语料可以分为语篇、语句、短语等三大类。将训练语料作为基础信息来进行分析及处理,根据语料所表达的客观事实,可对训练语料进行语言抽象数学建模,从而得到最终的语言模型。
特别地,本实施例中的训练语料为智能问答领域及其相关领域内的规范文本数据以及真实的用户问题记录文本,根据真实记录文本与规范文本之间的特征差异,能够训练出对所有训练语料拟合程度较高的语言模型。
作为本发明的一个实施例,图2示出了本发明实施例提供的输入语句的纠错方法S11的具体实现流程,详述如下:
在本实施例中,以N-Gram模型作出语言模型的原始模型,对于一条输入语句中的第k个词(k为大于零的整数),由于第k个词的出现只与前面k-1个词相关,而与其它任何词都不相关,因此可得知出该条输入语句的正确概率为该句子中所有词语的联合概率。
在S101中,对每条所述训练语料执行分词操作,得到多个词语。
本实施例中存在多条训练语料,对于其中任意一条训练语料,可通过中文分词等方法 来获取该条语料中的多个词语。
在S102中,分别计算每个所述词语在该条训练语料中与其后邻接词之间的条件概率。
其中,所述条件概率的计算过程包括:
获取所述词语在所有所述训练语料中出现的第一次数,及获取所述词语的后邻接词在所有所述训练语料中出现在所述词语的后邻接位置的第二次数;
根据所述第一次数以及所述第二次数,计算所述词语与对应的所述后邻接词之间的条件概率。
本实施例中,“第一”与“第二”仅作区分之用,并不表示具体的数字含义。
具体地,在本实施例中,提取每条训练语料中的每个词语,并且对于所述每个词语,分别执行如下操作:
以当前提取出的词语作为对比样本,并将该词语与当前所有训练语料中的所有字词依次进行匹配对比,一旦匹配到任一训练语料中存在相同的词语时,关于该词语的第一次数加一。
对每条训练语料中的每个词语重复执行上述操作,可获得每个词语在所有训练语料中出现的第一次数。
优选地,若训练语料中的任一词语已经在前面执行操作的训练语料中出现,则无需重复计算该相同词语在所有训练语料中出现的第一次数,从而提高系统的运作效率。
在本实施例中,一条训练语料中的某个词语A以及该词语的后邻接词B,在其他训练语料中可能同时出现或者分别出现。若要使该后邻接词B出现在词语A的后邻接位置,则需要满足以下三个条件:
条件一:词语A与其后邻接词B需要在一条训练语料中同时出现。即,一条训练语料中同时包含该词语A及该后邻接词B。
条件二:词语A与其后邻接词B需要处于相邻的位置。若该词语A与该后邻接词B之间还存在其他字词,则此时后邻接词B并未与词语A相邻。
条件三:词语A位于其后邻接词B的前方位置。即,词语A在一条训练语料中需要先于该后邻接词B出现。
对于训练语料中的任意一个词语,当其他任意一条训练语料满足以上三个条件时,将关于该词语的后邻接词在所有训练语料中出现在该词语的后邻接位置的次数加一。
通过上述统计操作,可以确定出某个词语wi在所有训练语料中出现的次数n(wj)以及该词语的后邻接词wj在所有训练语料中出现在该词语的后邻接位置的次数n(wjwi)。
通过以下公式估算出词语wi、wj之间的条件概率p(wi|wj):
Figure PCTCN2017099706-appb-000001
在S103中,将所述多个词语对应的所述条件概率相乘,并根据相乘后得到的结果,构建并训练所述语言模型。
本实施例依照以下原理来计算某条训练语料的正确概率:某个词是否可能出现在句子中,仅与它前面出现的一个词相关。
因此,假设一条训练语料s由p个词语组成,即s={w1,w2,…,wp},则该条训练语料的正确概率为:
p(s)=p(w1w2…wp)=p(w2|w1)p(w3|w2)p(w4|w3)…p(wp|wp-1)
其中,p(w2|w1)、p(w3|w2)、p(w4|w3)、…及p(wp|wp-1)的值可通过S102中条件概率的计算方法获得,该值表示该条训练语料中每个词语与每个词语的后邻接词之间的条件概率。
本实施例通过将训练语料中每个词语与每个词语的后邻接词之间的条件概率相乘,得出关于该条训练语料的正确概率,并根据每条训练语料的正确概率来训练出所述语言模型,以使所述语言模型能够用于计算用户输入的未知语句的正确概率。
在S12中,获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值。
在本实施例中,同样利用规范文本及真实的用户问题记录文本作为测试语料,因此,测试语料中包含有多条输入错误的语句样本及输入正确的语句样本。利用语言模型来对每条测试语料进行逐一测试,能够判断出每条测试语料属于正确语句还是错误语句。该判断结果可能与测试语料的真实类别存在差异,为了降低该差异出现的可能性,提高语言模型对语句正确性的判断准确率,通过统计的方法来获得一个语句正确与否的判断临界值。
作为本发明的一个实施例,如图3所示,S12中,所述获取所述语言模型的判错阈值包括:
在S201中,分别将M条错误语句与N条正确语句作为测试语料输入所述语言模型,得到所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率。
本实施例中,分别将每条错误语句与每条正确语句作为一个输入参数输入所述语言模型,经过语言模型的自动运行处理,得到关于每条测试语料的正确概率的输出参数。
在S202中,通过预设算法对所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率进行统计处理,得到所述语言模型的判错阈值。
通过输出某条错误语句的正确概率,能够获知对于某条错误语句来说,其被用户真实所需的可能性有多大。例如,若某条错误语句A的正确概率为30%,则表明在实际使用中, 用户只有30%的可能性是真实想要输入此条语句。
语言模型输出的语句的正确概率为理论计算值,其与实际正确概率可能存在偏差,具体表现为:一条常用的规范语句经过语言模型处理后得到的正确概率为10%,而一条明显不符合语义的错误语句经过语言模型处理后得到的正确概率为80%。因此,通过统计多种类别测试语料的正确概率,能够选出一个所述正确概率的最优临界值作为语言模型的判错阈值,从而提高输入语句正确概率与输入语句正确性的关联程度。
在S13中,将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率。
本实施例中,语言模型输出待识别语句的正确概率与上述实施例中输出测试语料的正确概率的处理流程及原理均相同,在此不一一赘述。
在S14中,当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
当待识别语句的正确概率高于判错阈值时,表明当前待识别的语句出现在真实生活中的可能性比较高,极大可能为用户输入正确的语句。因此,将该待识别语句判断为正确语句,并直接输入至智能问答系统中使用。
当待识别语句的正确概率低于判错阈值时,表明当前待识别的语句出现在真实生活中的可能性比较低,极大可能为用户输入错误的语句。因此,将该待识别语句判断为错误语句。
同时,当识别到当前用户输入的语句为错误语句时,自动执行纠错处理,以使该待识别语句能够调整为最有可能表达用户真实问题的正确语句后,再输入至智能问答系统中使用。
本发明实施例中,利用多种类型的训练语料训练语言模型,能够提高语言模型输出参数的正确率,根据语言模型输出待识别语句的正确概率,以判断用户输入的语句是否存在错误,实现了对语句正确性的自动检测,通过对判断为错误语句的待识别语句进行纠错处理,保证了用户在智能问答系统中即使输入了错误的字词,也能将包含该错误字词的语句自动调整为符合用户实际意愿的语句,从而使智能问答系统能够准确理解用户的问题,提高自动问答的成功率,由此进一步促进了智能问答技术的发展。
作为本发明的一个实施例,图4示出了本发明实施例提供的输入语句的纠错方法S14的具体实现流程,详述如下:
在S401中,生成所述待识别语句的多条候选语句。
对于判定为错误语句的待识别语句,存在一条或多条与该待识别语句在形式上相似、但有可能表达了该待识别语句本身正确语义的语句,这些语句称为候选语句。
通过预设算法获取待识别语句中可能出现的错误字词,并将该错误字词进行替换,得到多条候选语句。
具体地,作为本发明的一个实施例,如图5所示,S401中,所述生成所述待识别语句的多条候选语句包括:
在S501中,获取所述待识别语句中每个词语对应的音似词及同音词。
根据拼音输入法的出错特性,词语在输入过程中出错的原因为候选词选择出错以及拼音输入出错的可能性最大,且每个词语均有出错的可能。因此,在本发明实施例中,对于待识别语句中的每个词语,获取与该词语中文发音相同或相近的所有词语,即,以该词语的所有同音词或音似词来作为该词语对应的候选词。
例如,“隐形”的同音词包括“隐性”、“银杏”、“阴性”等词语,音似词包括“音信”、“迎新”等词语。“隐性”、“银杏”、“阴性”、“音信”、“迎新”均构成待识别语句中“隐形”一词的候选词。
在S502中,将所述待识别语句中的至少一个所述词语替换为所述词语对应的所述音似词或所述同音词。
在本实施例中,每条待识别语句中包含有多个词语,每个词语对应有多个候选词,将待识别语句中的至少一个词语替换为该词语对应的音似词或同音词可具体表现为:将待识别语句中的一个词语替换为该词语对应的候选词集合中的一个候选词,或者将待识别语句中的多个词语同时替换为各个词语分别对应的一个候选词。
例如,若待识别语句为“这个货物保佑吗”,则可以将该句子中的词语“保佑”替换成该词对应的同音词“包邮”,或者将词语“货物”替换成该词所对应的同音词“活物”,或者将词语“货物”及“保佑”一并替换,分别替换为各自对应的同音词“活物”及“包邮”。
在S503中,将完成替换后的每一条所述待识别语句分别输出为一条所述待识别语句的所述候选语句。
对待识别语句执行的每一次替换动作,均可以得到一条包含替换后的候选词的语句,多次替换动作执行完毕后,得到相互不同的多条语句,每条语句均输出为一条所述候选语句。
例如,上述例子中,将“保佑”替换成该词对应的同音词“包邮”后,得到第一条候选语句为“这个货物包邮吗”;将词语“货物”替换成该词所对应的同音词“活物”后,得到第二条候选语句为“这个活物保佑吗”;将词语“货物”及“保佑”同时替换为各自对应的同音词“活物”及“包邮”时,得到第三条候选语句为“这个活物包邮吗”。
在S402中,利用所述语言模型,分别输出每条所述候选语句的所述正确概率。
将每条候选语句逐一输入所述语言模型后,经过语言模型的分析处理,输出每条候选语句的正确概率。
本实施例中,语言模型计算每条候选语句的正确概率与上述实施例中计算测试语料的 正确概率及待识别语句的正确概率的流程及原理均相同,在此不一一赘述。
在S403中,在所有所述候选语句中确定出所述正确概率最大的一条所述候选语句,并将所述待识别语句纠正为该候选语句。
通过将S402中得到的每条候选语句的正确概率的大小进行比较,获取其中正确概率最大的一条候选语句,则该条候选语句包含待识别语句原意的可能性最大。因此,将待识别语句纠正为所述正确概率最大的候选语句。
本发明实施例中,利用多种类型的训练语料训练语言模型,能够提高语言模型输出参数的正确率,根据语言模型输出待识别语句的正确概率,以判断用户输入的语句是否存在错误,实现了对语句正确性的自动检测,通过对判断为错误语句的待识别语句进行纠错处理,保证了用户在智能问答系统中即使输入了错误的字词,也能将该错误的字词自动调整为符合用户实际意愿的语句,从而使智能问答系统能够准确理解用户的问题,提高自动问答的成功率,由此进一步促进了智能问答技术的发展。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
图6示出了本发明实施例提供的输入语句的纠错装置的结构框图,该装置可以位于手机、计算机、平板电脑、笔记本电脑等终端中,用于运行本发明图1至图5实施例所述的输入语句的纠错方法。为了便于说明,仅示出了与本实施例相关的部分。
参照图6,该装置包括:
构建模块61,用于基于训练语料构建并训练语言模型。
获取模块62,用于获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值。
计算模块63,用于将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率。
纠错模块64,用于当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
可选地,所述构建模块61包括:
分词模块,用于对每条所述训练语料执行分词操作,得到多个词语。
条件概率计算模块,用于分别计算每个所述词语在该条训练语料中与其后邻接词之间的条件概率。
乘法模块,用于将所述多个词语对应的所述条件概率相乘,并根据相乘后得到的结果, 构建并训练所述语言模型。
其中,所述条件概率计算模块具体用于:
获取所述词语在所有所述训练语料中出现的第一次数,及获取所述词语的后邻接词在所有所述训练语料中出现在所述词语的后邻接位置的第二次数;
根据所述第一次数以及所述第二次数,计算所述词语与对应的所述后邻接词之间的条件概率。
可选地,所述获取模块62包括:
输入子模块,用于分别将M条错误语句与N条正确语句作为测试语料输入所述语言模型,得到所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率。
统计子模块,用于通过预设算法对所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率进行统计处理,得到所述语言模型的判错阈值;
其中,所述M和N为大于1的整数。
可选地,所述纠错模块64包括:
生成子模块,用于生成所述待识别语句的多条候选语句。
输出子模块,用于利用所述语言模型,分别输出每条所述候选语句的所述正确概率。
纠正子模块,用于在所有所述候选语句中确定出所述正确概率最大的一条所述候选语句,并将所述待识别语句纠正为为该候选语句。
可选地,所述生成子模块具体用于:
获取所述待识别语句中每个词语对应的音似词及同音词;
将所述待识别语句中的至少一个所述词语替换为所述词语对应的所述音似词或所述同音词;
将替换完成后的每一条所述待识别语句分别输出为一条所述待识别语句的所述候选语句。
本发明实施例中,根据语言模型输出待识别语句的正确概率,以判断用户输入的语句是否存在错误,实现了对语句正确性的自动检测,通过对判断为错误语句的待识别语句进行纠错处理,保证了用户在智能问答系统中即使输入了错误的字词,也能将该错误的字词自动调整为符合用户实际意愿的语句,从而使智能问答系统能够准确理解用户的问题,提高自动问答的成功率,由此进一步促进了智能问答技术的发展。
图7是本发明实施例提供的电子设备的示意图。如图7所示,该实施例的电子设备7包括:处理器70、存储器71以及存储在所述存储器71中并可在所述处理器70上运行的计 算机程序72,例如声纹识别程序。所述处理器70执行所述计算机程序72时实现上述各个输入语句的纠错方法实施例中的步骤,例如图1所示的步骤11至14。或者,所述处理器70执行所述计算机程序72时实现上述各装置实施例中各模块/单元的功能,例如图6所示模块61至64的功能。
示例性的,所述计算机程序72可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器71中,并由所述处理器70执行,以完成本发明。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序72在所述电子设备7中的执行过程。
所述电子设备7可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述电子设备7可包括,但不仅限于,处理器70、存储器71。本领域技术人员可以理解,图7仅仅是电子设备7的示例,并不构成对电子设备7的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述电子设备7还可以包括输入输出设备、网络接入设备、总线等。
所称处理器70可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器71可以是所述电子设备7的内部存储单元,例如电子设备7的硬盘或内存。所述存储器71也可以是所述电子设备7的外部存储设备,例如所述电子设备7上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器71还可以既包括所述电子设备7的内部存储单元也包括外部存储设备。所述存储器71用于存储所述计算机程序以及所述电子设备7所需的其他程序和数据。所述存储器71还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能模块、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块、模块完成,即将所述装置的内部结构划分成不同的功能模块或模块,以完成以上描述的全部或者部分功能。实施例中的各功能模块、模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中,上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。另外,各功能模块、模块 的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中模块、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的模块及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。
在本发明所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的系统实施例仅仅是示意性的,例如,所述模块或模块的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或模块的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明实施例各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围,均应包含在本发明 的保护范围之内。

Claims (20)

  1. 一种输入语句的纠错方法,其特征在于,包括:
    基于训练语料构建并训练语言模型;
    获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
    将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率;
    当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
  2. 根据权利要求1所述的输入语句的纠错方法,其特征在于,所述基于训练语料训练并构建语言模型包括:
    对每条所述训练语料执行分词操作,得到多个词语;
    分别计算每个所述词语在该条训练语料中与其后邻接词之间的条件概率;
    将所述多个词语对应的所述条件概率相乘,并根据相乘后得到的结果,构建并训练所述语言模型;
    其中,所述条件概率的计算过程包括:
    获取所述词语在所有所述训练语料中出现的第一次数,及获取所述词语的后邻接词在所有所述训练语料中出现在所述词语的后邻接位置的第二次数;
    根据所述第一次数以及所述第二次数,计算所述词语与对应的所述后邻接词之间的条件概率。
  3. 根据权利要求1所述的输入语句的纠错方法,其特征在于,所述获取所述语言模型的判错阈值包括:
    分别将M条错误语句与N条正确语句作为测试语料输入所述语言模型,得到所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率;
    通过预设算法对所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率进行统计处理,得到所述语言模型的判错阈值;
    其中,所述M和N为大于1的整数。
  4. 根据权利要求1-3任一项所述的输入语句的纠错方法,其特征在于,所述判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理包括:
    生成所述待识别语句的多条候选语句;
    利用所述语言模型,分别输出每条所述候选语句的所述正确概率;
    在所有所述候选语句中确定出所述正确概率最大的一条所述候选语句,并将所述待识 别语句纠正为该候选语句。
  5. 根据权利要求4所述的输入语句的纠错方法,其特征在于,所述生成所述待识别语句的多条候选语句包括:
    获取所述待识别语句中每个词语对应的音似词及同音词;
    将所述待识别语句中的至少一个所述词语替换为所述词语对应的所述音似词或所述同音词;
    将完成替换后的每一条所述待识别语句分别输出为一条所述待识别语句的所述候选语句。
  6. 一种输入语句的纠错装置,其特征在于,包括:
    构建模块,用于基于训练语料构建并训练语言模型;
    获取模块,用于获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
    计算模块,用于将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率;
    纠错模块,用于当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
  7. 根据权利要求6所述的输入语句的纠错装置,其特征在于,所述构建模块包括:
    分词模块,用于对每条所述训练语料执行分词操作,得到多个词语;
    条件概率计算模块,用于分别计算每个所述词语在该条训练语料中与其后邻接词之间的条件概率;
    乘法模块,用于将所述多个词语对应的所述条件概率相乘,并根据相乘后得到的结果,
    构建并训练所述语言模型;
    其中,所述条件概率计算模块具体用于:
    获取所述词语在所有所述训练语料中出现的第一次数,及获取所述词语的后邻接词在所有所述训练语料中出现在所述词语的后邻接位置的第二次数;
    根据所述第一次数以及所述第二次数,计算所述词语与对应的所述后邻接词之间的条件概率。
  8. 根据权利要求6所述的输入语句的纠错装置,其特征在于,所述获取模块包括:
    输入子模块,用于分别将M条错误语句与N条正确语句作为测试语料输入所述语言模型,得到所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率;
    统计子模块,用于通过预设算法对所述每条错误语句的所述正确概率与所述每条正确 语句的所述正确概率进行统计处理,得到所述语言模型的判错阈值;
    其中,所述M和N为大于1的整数。
  9. 根据权利要求6-8任一项所述的输入语句的纠错装置,其特征在于,所述纠错模块包括:
    生成子模块,用于生成所述待识别语句的多条候选语句;
    输出子模块,用于利用所述语言模型,分别输出每条所述候选语句的所述正确概率;
    纠正子模块,用于在所有所述候选语句中确定出所述正确概率最大的一条所述候选语句,并将所述待识别语句纠正为为该候选语句。
  10. 根据权利要求9所述的输入语句的纠错装置,其特征在于,所述生成子模块具体用于:
    获取所述待识别语句中每个词语对应的音似词及同音词;
    将所述待识别语句中的至少一个所述词语替换为所述词语对应的所述音似词或所述同音词;
    将替换完成后的每一条所述待识别语句分别输出为一条所述待识别语句的所述候选语句。
  11. 一种电子设备,其特征在于,包括存储器、处理器,所述存储器上存储有可在所述处理器上运行的计算机程序,所述处理器执行所述计算机序时实现如下步骤:
    基于训练语料构建并训练语言模型;
    获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
    将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率;
    当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
  12. 根据权利要求11所述的电子设备,其特征在于,所述基于训练语料训练并构建语言模型包括:
    对每条所述训练语料执行分词操作,得到多个词语;
    分别计算每个所述词语在该条训练语料中与其后邻接词之间的条件概率;
    将所述多个词语对应的所述条件概率相乘,并根据相乘后得到的结果,构建并训练所述语言模型;
    其中,所述条件概率的计算过程包括:
    获取所述词语在所有所述训练语料中出现的第一次数,及获取所述词语的后邻接词在所有所述训练语料中出现在所述词语的后邻接位置的第二次数;
    根据所述第一次数以及所述第二次数,计算所述词语与对应的所述后邻接词之间的条件概率。
  13. 根据权利要求12所述的电子设备,其特征在于,所述获取所述语言模型的判错阈值包括:
    分别将M条错误语句与N条正确语句作为测试语料输入所述语言模型,得到所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率;
    通过预设算法对所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率进行统计处理,得到所述语言模型的判错阈值;
    其中,所述M和N为大于1的整数。
  14. 根据权利要求11-13任一项所述的电子设备,其特征在于,所述判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理包括:
    生成所述待识别语句的多条候选语句;
    利用所述语言模型,分别输出每条所述候选语句的所述正确概率;
    在所有所述候选语句中确定出所述正确概率最大的一条所述候选语句,并将所述待识别语句纠正为该候选语句。
  15. 根据权利要求14所述的电子设备,其特征在于,所述生成所述待识别语句的多条候选语句包括:
    获取所述待识别语句中每个词语对应的音似词及同音词;
    将所述待识别语句中的至少一个所述词语替换为所述词语对应的所述音似词或所述同音词;
    将完成替换后的每一条所述待识别语句分别输出为一条所述待识别语句的所述候选语句。
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被至少一个处理器执行时实现如下步骤:
    基于训练语料构建并训练语言模型;
    获取所述语言模型的判错阈值,所述判错阈值表示输入语句为错误语句的临界概率值;
    将待识别语句输入所述语言模型,以计算出所述待识别语句的正确概率;
    当所述待识别语句的正确概率低于所述判错阈值时,判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述基于训练语料训练并构建语言模型包括:
    对每条所述训练语料执行分词操作,得到多个词语;
    分别计算每个所述词语在该条训练语料中与其后邻接词之间的条件概率;
    将所述多个词语对应的所述条件概率相乘,并根据相乘后得到的结果,构建并训练所述语言模型;
    其中,所述条件概率的计算过程包括:
    获取所述词语在所有所述训练语料中出现的第一次数,及获取所述词语的后邻接词在所有所述训练语料中出现在所述词语的后邻接位置的第二次数;
    根据所述第一次数以及所述第二次数,计算所述词语与对应的所述后邻接词之间的条件概率。
  18. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述获取所述语言模型的判错阈值包括:
    分别将M条错误语句与N条正确语句作为测试语料输入所述语言模型,得到所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率;
    通过预设算法对所述每条错误语句的所述正确概率与所述每条正确语句的所述正确概率进行统计处理,得到所述语言模型的判错阈值;
    其中,所述M和N为大于1的整数。
  19. 根据权利要求16-18任一项所述的计算机可读存储介质,其特征在于,所述判定所述待识别语句为错误语句并对所述待识别语句执行纠错处理包括:
    生成所述待识别语句的多条候选语句;
    利用所述语言模型,分别输出每条所述候选语句的所述正确概率;
    在所有所述候选语句中确定出所述正确概率最大的一条所述候选语句,并将所述待识别语句纠正为该候选语句。
  20. 根据权利要求19所述的计算机可读存储介质,其特征在于,所述生成所述待识别语句的多条候选语句包括:
    获取所述待识别语句中每个词语对应的音似词及同音词;
    将所述待识别语句中的至少一个所述词语替换为所述词语对应的所述音似词或所述同音词;
    将完成替换后的每一条所述待识别语句分别输出为一条所述待识别语句的所述候选语句。
PCT/CN2017/099706 2016-12-28 2017-08-30 输入语句的纠错方法、装置、电子设备及介质 WO2018120889A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611233791.8A CN107122346B (zh) 2016-12-28 2016-12-28 一种输入语句的纠错方法及装置
CN201611233791.8 2016-12-28

Publications (1)

Publication Number Publication Date
WO2018120889A1 true WO2018120889A1 (zh) 2018-07-05

Family

ID=59718246

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/099706 WO2018120889A1 (zh) 2016-12-28 2017-08-30 输入语句的纠错方法、装置、电子设备及介质

Country Status (2)

Country Link
CN (1) CN107122346B (zh)
WO (1) WO2018120889A1 (zh)

Cited By (48)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109522542A (zh) * 2018-09-17 2019-03-26 深圳市元征科技股份有限公司 一种识别汽车故障语句的方法及装置
CN109542247A (zh) * 2018-11-14 2019-03-29 腾讯科技(深圳)有限公司 句式推荐方法及装置、电子设备、存储介质
CN109558584A (zh) * 2018-10-26 2019-04-02 平安科技(深圳)有限公司 企业关系预测方法、装置、计算机设备和存储介质
CN109558596A (zh) * 2018-12-14 2019-04-02 平安城市建设科技(深圳)有限公司 识别方法、装置、终端及计算机可读存储介质
CN109670040A (zh) * 2018-11-27 2019-04-23 平安科技(深圳)有限公司 写作辅助方法、装置及存储介质、计算机设备
CN109800306A (zh) * 2019-01-10 2019-05-24 深圳Tcl新技术有限公司 意图分析方法、装置、显示终端及计算机可读存储介质
CN110110334A (zh) * 2019-05-08 2019-08-09 郑州大学 一种基于自然语言处理的远程会诊记录文本纠错方法
CN110309515A (zh) * 2019-07-10 2019-10-08 北京奇艺世纪科技有限公司 实体识别方法及装置
CN110442864A (zh) * 2019-07-24 2019-11-12 新华智云科技有限公司 语句通顺度确定方法、装置、电子设备及存储介质
CN110457695A (zh) * 2019-07-30 2019-11-15 海南省火蓝数据有限公司 一种在线文字纠错方法及系统
CN110764647A (zh) * 2019-10-21 2020-02-07 科大讯飞股份有限公司 输入纠错方法、装置、电子设备和存储介质
CN110780749A (zh) * 2018-07-11 2020-02-11 北京搜狗科技发展有限公司 一种字符串纠错方法和装置
CN110796153A (zh) * 2018-08-01 2020-02-14 阿里巴巴集团控股有限公司 一种训练样本的处理方法、装置
CN110889118A (zh) * 2018-09-07 2020-03-17 广州视源电子科技股份有限公司 异常sql语句检测方法、装置、计算机设备和存储介质
CN111126036A (zh) * 2019-12-13 2020-05-08 智慧神州(北京)科技有限公司 Nlp领域固定搭配使用错误的识别方法、装置与处理器
CN111312209A (zh) * 2020-02-21 2020-06-19 北京声智科技有限公司 文本到语音的转换处理方法、装置及电子设备
CN111324214A (zh) * 2018-12-17 2020-06-23 北京搜狗科技发展有限公司 一种语句纠错方法和装置
CN111460795A (zh) * 2020-03-26 2020-07-28 云知声智能科技股份有限公司 一种文本纠错方法及系统
CN111460804A (zh) * 2019-01-02 2020-07-28 阿里巴巴集团控股有限公司 文本处理方法、装置和系统
CN111507085A (zh) * 2019-11-25 2020-08-07 江苏艾佳家居用品有限公司 句型识别方法
CN111539199A (zh) * 2020-04-17 2020-08-14 中移(杭州)信息技术有限公司 文本的纠错方法、装置、终端、及存储介质
CN111541904A (zh) * 2020-04-15 2020-08-14 腾讯科技(深圳)有限公司 直播过程中的信息提示方法、装置、设备及存储介质
CN111639217A (zh) * 2020-05-12 2020-09-08 广东小天才科技有限公司 一种口语评级方法、终端设备及存储介质
CN111651978A (zh) * 2020-07-13 2020-09-11 深圳市智搜信息技术有限公司 基于实体的词法检查方法与装置和计算机设备及存储介质
CN111753530A (zh) * 2020-06-24 2020-10-09 上海依图网络科技有限公司 一种语句处理方法、装置、设备及介质
CN111768765A (zh) * 2020-07-30 2020-10-13 华为技术有限公司 语言模型生成方法和电子设备
CN111949793A (zh) * 2020-08-13 2020-11-17 深圳市欢太科技有限公司 用户意图识别方法、装置及终端设备
CN112001182A (zh) * 2020-07-20 2020-11-27 北京百度网讯科技有限公司 多语言语义表示模型的训练方法、装置、设备及存储介质
CN112015279A (zh) * 2019-05-28 2020-12-01 北京搜狗科技发展有限公司 按键误触纠错方法及装置
CN112364641A (zh) * 2020-11-12 2021-02-12 北京中科闻歌科技股份有限公司 一种面向文本审核的中文对抗样本生成方法及装置
CN112434141A (zh) * 2020-11-11 2021-03-02 北京沃东天骏信息技术有限公司 信息处理方法、装置、电子设备及存储介质
CN112509565A (zh) * 2020-11-13 2021-03-16 中信银行股份有限公司 语音识别方法、装置、电子设备及可读存储介质
CN112560450A (zh) * 2020-12-11 2021-03-26 科大讯飞股份有限公司 一种文本纠错方法及装置
CN112652325A (zh) * 2020-12-15 2021-04-13 平安科技(深圳)有限公司 基于人工智能的远程语音调整方法及相关设备
CN112685550A (zh) * 2021-01-12 2021-04-20 腾讯科技(深圳)有限公司 智能问答方法、装置、服务器及计算机可读存储介质
CN112765953A (zh) * 2020-12-31 2021-05-07 维沃移动通信有限公司 中文语句的显示方法及装置、电子设备和可读存储介质
CN112836495A (zh) * 2019-11-22 2021-05-25 Tcl集团股份有限公司 一种语句的纠错方法及设备
CN112905775A (zh) * 2021-02-24 2021-06-04 北京三快在线科技有限公司 文本处理方法、装置、电子设备及可读存储介质
CN112926306A (zh) * 2021-03-08 2021-06-08 北京百度网讯科技有限公司 文本纠错方法、装置、设备以及存储介质
CN113065354A (zh) * 2021-03-19 2021-07-02 平安普惠企业管理有限公司 语料中地理位置的识别方法及其相关设备
CN113096667A (zh) * 2021-04-19 2021-07-09 上海云绅智能科技有限公司 一种错别字识别检测方法和系统
CN113435500A (zh) * 2021-06-25 2021-09-24 竹间智能科技(上海)有限公司 一种语言模型构建方法及设备
CN113553398A (zh) * 2021-07-15 2021-10-26 杭州网易云音乐科技有限公司 搜索词纠正方法、装置、电子设备及计算机存储介质
CN113836919A (zh) * 2021-09-30 2021-12-24 中国建筑第七工程局有限公司 一种基于迁移学习的建筑行业文本纠错方法
CN114444514A (zh) * 2022-02-08 2022-05-06 北京百度网讯科技有限公司 语义匹配模型训练、语义匹配方法及相关装置
CN115438650A (zh) * 2022-11-08 2022-12-06 深圳擎盾信息科技有限公司 融合多源特征的合同文本纠错方法、系统、设备及介质
WO2023193542A1 (zh) * 2022-04-07 2023-10-12 联通(广东)产业互联网有限公司 文本纠错方法、系统、设备及存储介质
CN111324214B (zh) * 2018-12-17 2024-05-24 北京搜狗科技发展有限公司 一种语句纠错方法和装置

Families Citing this family (41)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107608963B (zh) * 2017-09-12 2021-04-16 马上消费金融股份有限公司 一种基于互信息的中文纠错方法、装置、设备及存储介质
CN109753636A (zh) * 2017-11-01 2019-05-14 阿里巴巴集团控股有限公司 机器处理及文本纠错方法和装置、计算设备以及存储介质
CN110083819B (zh) * 2018-01-26 2024-02-09 北京京东尚科信息技术有限公司 拼写纠错方法、装置、介质及电子设备
CN108491392A (zh) * 2018-03-29 2018-09-04 广州视源电子科技股份有限公司 文字拼写错误的修正方法、系统、计算机设备及存储介质
CN108563632A (zh) * 2018-03-29 2018-09-21 广州视源电子科技股份有限公司 文字拼写错误的修正方法、系统、计算机设备及存储介质
CN108519973A (zh) * 2018-03-29 2018-09-11 广州视源电子科技股份有限公司 文字拼写的检测方法、系统、计算机设备及存储介质
CN108563634A (zh) * 2018-03-29 2018-09-21 广州视源电子科技股份有限公司 文字拼写错误的识别方法、系统、计算机设备及存储介质
CN108694166B (zh) * 2018-04-11 2022-06-28 广州视源电子科技股份有限公司 候选词评估方法、装置、计算机设备和存储介质
CN108647207B (zh) * 2018-05-08 2022-04-05 上海携程国际旅行社有限公司 自然语言修正方法、系统、设备及存储介质
CN108647346B (zh) * 2018-05-15 2021-10-29 苏州东巍网络科技有限公司 一种用于可穿戴电子设备的老年人语音交互方法和系统
CN109062888B (zh) * 2018-06-04 2023-03-31 昆明理工大学 一种出现错误文本输入时的自纠正方法
CN108829674A (zh) * 2018-06-08 2018-11-16 Oppo(重庆)智能科技有限公司 内容纠错方法及相关装置
CN110600005B (zh) * 2018-06-13 2023-09-19 蔚来(安徽)控股有限公司 语音识别纠错方法及装置、计算机设备和记录介质
CN109146610B (zh) * 2018-07-16 2022-08-09 众安在线财产保险股份有限公司 一种智能保险推荐方法、装置及智能保险机器人设备
CN109344830A (zh) * 2018-08-17 2019-02-15 平安科技(深圳)有限公司 语句输出、模型训练方法、装置、计算机设备及存储介质
CN109147146B (zh) * 2018-08-21 2022-04-12 平安科技(深圳)有限公司 语音取号的方法及终端设备
CN110929504B (zh) * 2018-09-20 2023-05-30 阿里巴巴集团控股有限公司 语句诊断方法、装置和系统
CN111079412B (zh) * 2018-10-18 2024-01-23 北京嘀嘀无限科技发展有限公司 文本纠错方法及装置
CN109376360B (zh) * 2018-10-29 2023-10-20 广东小天才科技有限公司 一种辅助学习语言的方法和装置
CN109558600B (zh) * 2018-11-14 2023-06-30 抖音视界有限公司 翻译处理方法及装置
CN109766538B (zh) * 2018-11-21 2023-12-15 北京捷通华声科技股份有限公司 一种文本纠错方法、装置、电子设备以及存储介质
CN109992769A (zh) * 2018-12-06 2019-07-09 平安科技(深圳)有限公司 基于语义解析的语句合理性判断方法、装置、计算机设备
CN111310460B (zh) * 2018-12-12 2022-03-01 Tcl科技集团股份有限公司 语句的调整方法及装置
CN109614623B (zh) * 2018-12-12 2023-06-30 广东小天才科技有限公司 一种基于句法分析的作文处理方法及系统
CN111523305A (zh) * 2019-01-17 2020-08-11 阿里巴巴集团控股有限公司 文本的纠错方法、装置和系统
CN111488732B (zh) * 2019-01-25 2024-04-09 深信服科技股份有限公司 一种变形关键词检测方法、系统及相关设备
CN111984766B (zh) * 2019-05-21 2023-02-24 华为技术有限公司 缺失语义补全方法及装置
CN110362824B (zh) * 2019-06-24 2022-12-02 广州多益网络股份有限公司 一种自动纠错的方法、装置、终端设备及存储介质
CN110442870B (zh) * 2019-08-02 2023-06-09 深圳市珍爱捷云信息技术有限公司 文本纠错方法、装置、计算机设备和存储介质
CN110674276A (zh) * 2019-09-23 2020-01-10 深圳前海微众银行股份有限公司 机器人自学习方法、机器人终端、装置及可读存储介质
CN112733529B (zh) * 2019-10-28 2023-09-29 阿里巴巴集团控股有限公司 文本纠错方法和装置
CN111125302A (zh) * 2019-11-29 2020-05-08 海信视像科技股份有限公司 用户输入语句检错方法、装置及电子设备
CN111026884B (zh) * 2019-12-12 2023-06-02 上海益商网络科技有限公司 一种提升人机交互对话语料质量与多样性的对话语料库生成方法
CN111144101B (zh) * 2019-12-26 2021-12-03 北大方正集团有限公司 错别字处理方法和装置
CN111339758B (zh) * 2020-02-21 2023-06-30 苏宁云计算有限公司 基于深度学习模型的文本纠错方法及系统
CN111859921B (zh) * 2020-07-08 2024-03-08 金蝶软件(中国)有限公司 文本纠错方法、装置、计算机设备和存储介质
CN111931490B (zh) * 2020-09-27 2021-01-08 平安科技(深圳)有限公司 文本纠错方法、装置及存储介质
CN112256232B (zh) * 2020-10-22 2023-08-15 海信视像科技股份有限公司 显示设备与自然语言生成后处理方法
CN112818090B (zh) * 2021-02-24 2023-10-03 中国人民大学 一种基于谐音字的答非所问对话生成方法和系统
CN113378553A (zh) * 2021-04-21 2021-09-10 广州博冠信息科技有限公司 文本处理方法、装置、电子设备和存储介质
CN113642317A (zh) * 2021-08-12 2021-11-12 广域铭岛数字科技有限公司 一种基于语音识别结果的文本纠错方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246714A (zh) * 2013-04-26 2013-08-14 中国科学院计算技术研究所 基于错误模式挖掘的中文搜索引擎查询纠错方法及系统
CN105468468A (zh) * 2015-12-02 2016-04-06 北京光年无限科技有限公司 面向问答系统的数据纠错方法及装置
CN105550173A (zh) * 2016-02-06 2016-05-04 北京京东尚科信息技术有限公司 文本校正方法和装置
CN105869634A (zh) * 2016-03-31 2016-08-17 重庆大学 一种基于领域的带反馈语音识别后文本纠错方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101364774B1 (ko) * 2012-12-07 2014-02-20 포항공과대학교 산학협력단 음성 인식의 오류 수정 방법 및 장치
CN103198149B (zh) * 2013-04-23 2017-02-08 中国科学院计算技术研究所 一种查询纠错方法和系统
CN104142912A (zh) * 2013-05-07 2014-11-12 百度在线网络技术(北京)有限公司 一种精确的语料类别标注方法及装置
CN103885938B (zh) * 2014-04-14 2015-04-22 东南大学 基于用户反馈的行业拼写错误检查方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103246714A (zh) * 2013-04-26 2013-08-14 中国科学院计算技术研究所 基于错误模式挖掘的中文搜索引擎查询纠错方法及系统
CN105468468A (zh) * 2015-12-02 2016-04-06 北京光年无限科技有限公司 面向问答系统的数据纠错方法及装置
CN105550173A (zh) * 2016-02-06 2016-05-04 北京京东尚科信息技术有限公司 文本校正方法和装置
CN105869634A (zh) * 2016-03-31 2016-08-17 重庆大学 一种基于领域的带反馈语音识别后文本纠错方法及系统

Cited By (77)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110780749A (zh) * 2018-07-11 2020-02-11 北京搜狗科技发展有限公司 一种字符串纠错方法和装置
CN110780749B (zh) * 2018-07-11 2024-03-08 北京搜狗科技发展有限公司 一种字符串纠错方法和装置
CN110796153A (zh) * 2018-08-01 2020-02-14 阿里巴巴集团控股有限公司 一种训练样本的处理方法、装置
CN110796153B (zh) * 2018-08-01 2023-06-20 阿里巴巴集团控股有限公司 一种训练样本的处理方法、装置
CN110889118A (zh) * 2018-09-07 2020-03-17 广州视源电子科技股份有限公司 异常sql语句检测方法、装置、计算机设备和存储介质
CN109522542B (zh) * 2018-09-17 2023-05-05 深圳市元征科技股份有限公司 一种识别汽车故障语句的方法及装置
CN109522542A (zh) * 2018-09-17 2019-03-26 深圳市元征科技股份有限公司 一种识别汽车故障语句的方法及装置
CN109558584A (zh) * 2018-10-26 2019-04-02 平安科技(深圳)有限公司 企业关系预测方法、装置、计算机设备和存储介质
CN109542247B (zh) * 2018-11-14 2023-03-24 腾讯科技(深圳)有限公司 句式推荐方法及装置、电子设备、存储介质
CN109542247A (zh) * 2018-11-14 2019-03-29 腾讯科技(深圳)有限公司 句式推荐方法及装置、电子设备、存储介质
CN109670040A (zh) * 2018-11-27 2019-04-23 平安科技(深圳)有限公司 写作辅助方法、装置及存储介质、计算机设备
CN109670040B (zh) * 2018-11-27 2024-04-05 平安科技(深圳)有限公司 写作辅助方法、装置及存储介质、计算机设备
CN109558596A (zh) * 2018-12-14 2019-04-02 平安城市建设科技(深圳)有限公司 识别方法、装置、终端及计算机可读存储介质
CN111324214A (zh) * 2018-12-17 2020-06-23 北京搜狗科技发展有限公司 一种语句纠错方法和装置
CN111324214B (zh) * 2018-12-17 2024-05-24 北京搜狗科技发展有限公司 一种语句纠错方法和装置
CN111460804B (zh) * 2019-01-02 2023-05-02 阿里巴巴集团控股有限公司 文本处理方法、装置和系统
CN111460804A (zh) * 2019-01-02 2020-07-28 阿里巴巴集团控股有限公司 文本处理方法、装置和系统
CN109800306B (zh) * 2019-01-10 2023-10-17 深圳Tcl新技术有限公司 意图分析方法、装置、显示终端及计算机可读存储介质
CN109800306A (zh) * 2019-01-10 2019-05-24 深圳Tcl新技术有限公司 意图分析方法、装置、显示终端及计算机可读存储介质
CN110110334A (zh) * 2019-05-08 2019-08-09 郑州大学 一种基于自然语言处理的远程会诊记录文本纠错方法
CN110110334B (zh) * 2019-05-08 2022-09-13 郑州大学 一种基于自然语言处理的远程会诊记录文本纠错方法
CN112015279B (zh) * 2019-05-28 2024-02-13 北京搜狗科技发展有限公司 按键误触纠错方法及装置
CN112015279A (zh) * 2019-05-28 2020-12-01 北京搜狗科技发展有限公司 按键误触纠错方法及装置
CN110309515B (zh) * 2019-07-10 2023-08-11 北京奇艺世纪科技有限公司 实体识别方法及装置
CN110309515A (zh) * 2019-07-10 2019-10-08 北京奇艺世纪科技有限公司 实体识别方法及装置
CN110442864A (zh) * 2019-07-24 2019-11-12 新华智云科技有限公司 语句通顺度确定方法、装置、电子设备及存储介质
CN110442864B (zh) * 2019-07-24 2022-12-23 新华智云科技有限公司 语句通顺度确定方法、装置、电子设备及存储介质
CN110457695B (zh) * 2019-07-30 2023-05-12 安徽火蓝数据有限公司 一种在线文字纠错方法及系统
CN110457695A (zh) * 2019-07-30 2019-11-15 海南省火蓝数据有限公司 一种在线文字纠错方法及系统
CN110764647B (zh) * 2019-10-21 2023-10-31 科大讯飞股份有限公司 输入纠错方法、装置、电子设备和存储介质
CN110764647A (zh) * 2019-10-21 2020-02-07 科大讯飞股份有限公司 输入纠错方法、装置、电子设备和存储介质
CN112836495A (zh) * 2019-11-22 2021-05-25 Tcl集团股份有限公司 一种语句的纠错方法及设备
CN111507085B (zh) * 2019-11-25 2023-07-07 江苏艾佳家居用品有限公司 句型识别方法
CN111507085A (zh) * 2019-11-25 2020-08-07 江苏艾佳家居用品有限公司 句型识别方法
CN111126036A (zh) * 2019-12-13 2020-05-08 智慧神州(北京)科技有限公司 Nlp领域固定搭配使用错误的识别方法、装置与处理器
CN111312209A (zh) * 2020-02-21 2020-06-19 北京声智科技有限公司 文本到语音的转换处理方法、装置及电子设备
CN111460795B (zh) * 2020-03-26 2023-05-26 云知声智能科技股份有限公司 一种文本纠错方法及系统
CN111460795A (zh) * 2020-03-26 2020-07-28 云知声智能科技股份有限公司 一种文本纠错方法及系统
CN111541904B (zh) * 2020-04-15 2024-03-22 腾讯科技(深圳)有限公司 直播过程中的信息提示方法、装置、设备及存储介质
CN111541904A (zh) * 2020-04-15 2020-08-14 腾讯科技(深圳)有限公司 直播过程中的信息提示方法、装置、设备及存储介质
CN111539199B (zh) * 2020-04-17 2023-08-18 中移(杭州)信息技术有限公司 文本的纠错方法、装置、终端、及存储介质
CN111539199A (zh) * 2020-04-17 2020-08-14 中移(杭州)信息技术有限公司 文本的纠错方法、装置、终端、及存储介质
CN111639217A (zh) * 2020-05-12 2020-09-08 广东小天才科技有限公司 一种口语评级方法、终端设备及存储介质
CN111753530B (zh) * 2020-06-24 2024-05-31 上海依图网络科技有限公司 一种语句处理方法、装置、设备及介质
CN111753530A (zh) * 2020-06-24 2020-10-09 上海依图网络科技有限公司 一种语句处理方法、装置、设备及介质
CN111651978A (zh) * 2020-07-13 2020-09-11 深圳市智搜信息技术有限公司 基于实体的词法检查方法与装置和计算机设备及存储介质
CN112001182A (zh) * 2020-07-20 2020-11-27 北京百度网讯科技有限公司 多语言语义表示模型的训练方法、装置、设备及存储介质
CN112001182B (zh) * 2020-07-20 2024-02-13 北京百度网讯科技有限公司 多语言语义表示模型的训练方法、装置、设备及存储介质
CN111768765A (zh) * 2020-07-30 2020-10-13 华为技术有限公司 语言模型生成方法和电子设备
CN111768765B (zh) * 2020-07-30 2022-08-19 华为技术有限公司 语言模型生成方法和电子设备
CN111949793A (zh) * 2020-08-13 2020-11-17 深圳市欢太科技有限公司 用户意图识别方法、装置及终端设备
CN111949793B (zh) * 2020-08-13 2024-02-27 深圳市欢太科技有限公司 用户意图识别方法、装置及终端设备
CN112434141A (zh) * 2020-11-11 2021-03-02 北京沃东天骏信息技术有限公司 信息处理方法、装置、电子设备及存储介质
CN112364641A (zh) * 2020-11-12 2021-02-12 北京中科闻歌科技股份有限公司 一种面向文本审核的中文对抗样本生成方法及装置
CN112509565A (zh) * 2020-11-13 2021-03-16 中信银行股份有限公司 语音识别方法、装置、电子设备及可读存储介质
CN112560450A (zh) * 2020-12-11 2021-03-26 科大讯飞股份有限公司 一种文本纠错方法及装置
CN112560450B (zh) * 2020-12-11 2024-02-13 科大讯飞股份有限公司 一种文本纠错方法及装置
CN112652325A (zh) * 2020-12-15 2021-04-13 平安科技(深圳)有限公司 基于人工智能的远程语音调整方法及相关设备
CN112652325B (zh) * 2020-12-15 2023-12-15 平安科技(深圳)有限公司 基于人工智能的远程语音调整方法及相关设备
CN112765953A (zh) * 2020-12-31 2021-05-07 维沃移动通信有限公司 中文语句的显示方法及装置、电子设备和可读存储介质
CN112685550B (zh) * 2021-01-12 2023-08-04 腾讯科技(深圳)有限公司 智能问答方法、装置、服务器及计算机可读存储介质
CN112685550A (zh) * 2021-01-12 2021-04-20 腾讯科技(深圳)有限公司 智能问答方法、装置、服务器及计算机可读存储介质
CN112905775A (zh) * 2021-02-24 2021-06-04 北京三快在线科技有限公司 文本处理方法、装置、电子设备及可读存储介质
CN112926306B (zh) * 2021-03-08 2024-01-23 北京百度网讯科技有限公司 文本纠错方法、装置、设备以及存储介质
CN112926306A (zh) * 2021-03-08 2021-06-08 北京百度网讯科技有限公司 文本纠错方法、装置、设备以及存储介质
CN113065354B (zh) * 2021-03-19 2024-01-09 平安普惠企业管理有限公司 语料中地理位置的识别方法及其相关设备
CN113065354A (zh) * 2021-03-19 2021-07-02 平安普惠企业管理有限公司 语料中地理位置的识别方法及其相关设备
CN113096667A (zh) * 2021-04-19 2021-07-09 上海云绅智能科技有限公司 一种错别字识别检测方法和系统
CN113435500A (zh) * 2021-06-25 2021-09-24 竹间智能科技(上海)有限公司 一种语言模型构建方法及设备
CN113435500B (zh) * 2021-06-25 2023-05-26 竹间智能科技(上海)有限公司 一种语言模型构建方法及设备
CN113553398B (zh) * 2021-07-15 2024-01-26 杭州网易云音乐科技有限公司 搜索词纠正方法、装置、电子设备及计算机存储介质
CN113553398A (zh) * 2021-07-15 2021-10-26 杭州网易云音乐科技有限公司 搜索词纠正方法、装置、电子设备及计算机存储介质
CN113836919A (zh) * 2021-09-30 2021-12-24 中国建筑第七工程局有限公司 一种基于迁移学习的建筑行业文本纠错方法
CN114444514A (zh) * 2022-02-08 2022-05-06 北京百度网讯科技有限公司 语义匹配模型训练、语义匹配方法及相关装置
WO2023193542A1 (zh) * 2022-04-07 2023-10-12 联通(广东)产业互联网有限公司 文本纠错方法、系统、设备及存储介质
CN115438650A (zh) * 2022-11-08 2022-12-06 深圳擎盾信息科技有限公司 融合多源特征的合同文本纠错方法、系统、设备及介质
CN115438650B (zh) * 2022-11-08 2023-04-07 深圳擎盾信息科技有限公司 融合多源特征的合同文本纠错方法、系统、设备及介质

Also Published As

Publication number Publication date
CN107122346B (zh) 2018-02-27
CN107122346A (zh) 2017-09-01

Similar Documents

Publication Publication Date Title
WO2018120889A1 (zh) 输入语句的纠错方法、装置、电子设备及介质
US11093854B2 (en) Emoji recommendation method and device thereof
US11301637B2 (en) Methods, devices, and systems for constructing intelligent knowledge base
Ling et al. Latent predictor networks for code generation
TWI664540B (zh) Search word error correction method and device, and weighted edit distance calculation method and device
US9665565B2 (en) Semantic similarity evaluation method, apparatus, and system
WO2020119075A1 (zh) 通用文本信息提取方法、装置、计算机设备和存储介质
CN107480143B (zh) 基于上下文相关性的对话话题分割方法和系统
CN109299280B (zh) 短文本聚类分析方法、装置和终端设备
US11010554B2 (en) Method and device for identifying specific text information
CN109117474B (zh) 语句相似度的计算方法、装置及存储介质
WO2018153316A1 (zh) 获取文本提取模型的方法及装置
US9811517B2 (en) Method and system of adding punctuation and establishing language model using a punctuation weighting applied to chinese speech recognized text
CN110210028A (zh) 针对语音转译文本的领域特征词提取方法、装置、设备及介质
US11074406B2 (en) Device for automatically detecting morpheme part of speech tagging corpus error by using rough sets, and method therefor
CN110232923A (zh) 一种语音控制指令生成方法、装置及电子设备
WO2014036827A1 (zh) 一种文本校正方法及用户设备
CN107341143A (zh) 一种句子连贯性判断方法及装置和电子设备
CN110046344B (zh) 添加分隔符的方法及终端设备
Shiue et al. Detection of chinese word usage errors for non-native chinese learners with bidirectional lstm
CN115496070A (zh) 平行语料数据处理方法、装置、设备及介质
JP6586055B2 (ja) 深層格解析装置、深層格学習装置、深層格推定装置、方法、及びプログラム
CN109033070B (zh) 一种数据处理方法、服务器及计算机可读介质
US11934779B2 (en) Information processing device, information processing method, and program
CN112183117B (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: 17888543

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 09/08/2019)

122 Ep: pct application non-entry in european phase

Ref document number: 17888543

Country of ref document: EP

Kind code of ref document: A1