A method for detecting typos in Chinese text based on deep learning

Through the neural network model and Chinese character association map based on deep learning, the problem of low accuracy and efficiency in manual detection of typos in Chinese texts is solved, and fast and accurate typo detection is achieved. In particular, the detection accuracy is improved through the type-specific model. .

CN111737982BActive Publication Date: 2024-09-20WUHAN HONGXIN TECH SERVICE CO LTD
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202010604113.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-29
Publication Date
2024-09-20
Estimated Expiration
2040-06-29

AI Technical Summary

Technical Problem

In the existing technology, the accuracy and efficiency of manually detecting typos in Chinese text are not high, and it is difficult to process a large amount of text data.

Method used

Using a method based on deep learning, by training a neural network model, a Chinese character model library and a Chinese character association map are established. These models are used to detect typos in the text to be detected, and make judgments based on the frequency of occurrence and preset thresholds.

Benefits of technology

It achieves fast and accurate detection of typos in text and improves detection efficiency and accuracy. In particular, the detection accuracy is further improved by establishing a type-specific neural network model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111737982B
    Figure CN111737982B
Patent Text Reader

Abstract

The invention discloses a method for detecting Chinese text typos based on deep learning, the method comprising the steps of: training a neural network model using a training sample set, repeating the above training steps until the neural network model is verified by using a verification sample set; obtaining a text to be detected, and sequentially querying each Chinese character of the text to be detected using the trained neural network model for detection. The method is trained with a large amount of text data to obtain a corresponding algorithm model, and the algorithm model is used to detect typos in the text to be detected. After the algorithm model is detected, corresponding feedback is given, so that typos in the text to be detected can be found very conveniently and quickly.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of neural network applications, and in particular relates to a method for detecting Chinese text typos based on deep learning. Background Art

[0002] Chinese has a long history and is spoken by the largest number of people. There are at least 1.5 billion people speaking Chinese in the world, which is more than 20% of the world's total population. It is the official language of China, one of the four official languages ​​of Singapore, and one of the six working languages ​​of the United Nations. It is mainly circulated in Chinese communities in China, Singapore, Malaysia, Myanmar, Thailand and other Southeast Asian countries, as well as in the United States, Canada, Australia, New Zealand, Japan and other countries.

[0003] Chinese text can be used to express our thoughts, but it is easy to make typos when writing in Chinese, so that others cannot correctly understand or even misunderstand what we want to convey. At present, typos detection in Chinese text is usually done by naked eyes. However, for a large amount of text data, it is not only difficult to detect using manual detection methods, but also the detection accuracy and efficiency are not high. Summary of the invention

[0004] In view of the above defects or improvement needs of the prior art, the present invention provides a Chinese text typo detection method based on deep learning, aiming to solve the technical problems of low accuracy and efficiency in the existing manual detection of Chinese text typos.

[0005] To achieve the above object, according to one aspect of the present invention, a method for detecting Chinese text typos based on deep learning is provided, comprising:

[0006] Using the training sample set to train the neural network model, the neural network model includes a Chinese character model library, the training sample set includes a plurality of Chinese text training data samples, querying in turn whether each Chinese character in each training sentence group exists in the Chinese character model library, and if not, adding the corresponding Chinese character to the Chinese character model library;

[0007] Repeat the above training steps until the neural network model is verified by using the verification sample set, wherein the sample data in the verification sample set includes typos;

[0008] Get the text to be detected, and query each Chinese character in the text to be detected in turn to see if it exists in the Chinese character model library. If not, the current Chinese character is considered to be a typo.

[0009] As a further improvement of the present invention, the verification conditions of the neural network model include:

[0010] The detection accuracy of all Chinese characters in the verification sample set is greater than a first preset threshold.

[0011] As a further improvement of the present invention, the neural network model also includes a Chinese character association map;

[0012] The training process of the neural network model also includes: segmenting and grouping the Chinese text training data samples according to punctuation marks to obtain multiple training sentence groups, forming a current training phrase with a current training Chinese character and the next Chinese character in the training sentence group, querying the Chinese character association map to see whether the current training phrase exists, and if so, updating the occurrence frequency of the current training phrase, otherwise adding the current training phrase to the Chinese character association map;

[0013] The detection process of the neural network model also includes: grouping the Chinese text training data samples according to punctuation marks to obtain multiple sentence groups to be detected. When the current Chinese character of the sentence group to be detected exists in the Chinese character model library, the current Chinese character and the next Chinese character in the sentence group are combined into a current phrase, and the frequency of occurrence of the current phrase in the Chinese character association map is obtained. When the frequency of occurrence is less than a third preset threshold, the current Chinese character is considered to be a typo.

[0014] As a further improvement of the present invention, the sample data in the verification sample set also includes erroneous phrases, and the verification condition of the neural network model includes when the detection accuracy of all phrases in the verification sample set is greater than a second preset threshold, and the verification process of the neural network model includes:

[0015] The verification samples of the verification sample set are segmented and grouped according to punctuation marks to obtain multiple sentence groups to be verified. When the current Chinese character of the sentence group to be verified exists in the Chinese character model library, the current Chinese character and the next Chinese character in the sentence group are combined into a current verification phrase, and the frequency of occurrence of the current verification phrase in the Chinese character association map is obtained. When the frequency of occurrence is less than a third preset threshold, the current Chinese character is considered to be a typo.

[0016] As a further improvement of the present invention, the process of obtaining the text to be detected includes: extracting text data from the picture or video data.

[0017] As a further improvement of the present invention, the training process of the neural network model also includes:

[0018] The neural network model is retrained according to the user's feedback results to improve the detection accuracy of the neural network model.

[0019] As a further improvement of the present invention, a plurality of different types of neural network models are established according to the type of text data, and the neural network model corresponding to the type of text to be detected is used to detect typos in the text to be detected.

[0020] To achieve the above object, according to another aspect of the present invention, a computer readable medium is provided, which stores a computer program executable by a terminal device, and when the program runs on the terminal device, the terminal device executes the steps of the above method.

[0021] To achieve the above-mentioned purpose, according to another aspect of the present invention, there is provided a terminal device, comprising at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the steps of the above-mentioned method.

[0022] In general, the above technical solution conceived by the present invention has the following beneficial effects compared with the prior art:

[0023] The present invention discloses a method for detecting Chinese text typos based on deep learning, which obtains a Chinese character model library of a neural network model by training a large amount of text. The Chinese character model library can then be used to conveniently and quickly detect typos in the text, thereby solving the problem of low accuracy and efficiency in manually detecting Chinese text typos.

[0024] The present invention provides a method for detecting Chinese text typos based on deep learning, which establishes a Chinese character association map by acquiring the current training phrases, and judges typos based on the occurrence frequency of phrases in the Chinese character association map, thereby further improving the detection accuracy of typos.

[0025] The present invention provides a method for detecting Chinese text typos based on deep learning, which establishes multiple neural network models of different types according to the type of text data, so that each model is more focused on one type, thereby further improving the detection accuracy of typos. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A schematic diagram of a method for detecting Chinese text typos based on deep learning according to an embodiment of the present invention;

[0027] Figure 2 A schematic diagram of a storage method of a Chinese character model library according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0029] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The present invention is further described in detail below in conjunction with specific embodiments.

[0030] Figure 1 FIG. 1 is a schematic diagram of a method for detecting Chinese text typos based on deep learning according to an embodiment of the present invention. Figure 1 As shown, a Chinese text typo detection method based on deep learning includes:

[0031] A large amount of text data is collected, and a neural network model is trained using a training sample set. The neural network model includes a Chinese character model library, and the training sample set includes multiple Chinese text training data samples. Each Chinese character in each training sentence group is sequentially queried to see whether it exists in the Chinese character model library. If it does not exist, the corresponding Chinese character is added to the Chinese character model library. The query process of Chinese characters can be implemented using a query pointer, that is, whether the Chinese character pointed to by the query pointer exists in the Chinese character model library.

[0032] Figure 2 FIG. 1 is a schematic diagram of a storage method of a Chinese character model library according to an embodiment of the present invention. Figure 2 As shown, as a storage method of the Chinese character model library, the Chinese character model library is empty at the beginning and is expanded through training. In order to facilitate searching, the nodes of the Chinese character model library can adopt a chain or tree structure and be sorted by the appearance rate of Chinese characters as weight; in the Chinese character model library, each node represents a different Chinese character, that is, there are as many nodes in the Chinese character model library as there are Chinese characters in Chinese; each node contains an association map, which is composed of all the words and appearance frequencies that can be composed of this Chinese character. The storage method is the same as the Chinese character model library, and the words are sorted by the appearance frequency of the words as weight.

[0033] Repeat the above training steps until the neural network model is verified by using the verification sample set, wherein the sample data in the verification sample set includes typos;

[0034] Get the text to be detected, and query each Chinese character in the text to be detected in turn to see if it exists in the Chinese character model library. If not, the current Chinese character is considered to be a typo.

[0035] Optionally, the validation conditions for the neural network model include:

[0036] The detection accuracy of all Chinese characters in the verification sample set is greater than a first preset threshold.

[0037] Optionally, the neural network model also includes a Chinese character association graph;

[0038] The training process of the neural network model also includes: segmenting and grouping Chinese text training data samples according to punctuation marks to obtain multiple training sentence groups, forming a current training Chinese character and the next Chinese character in the training sentence group into a current training phrase, querying the Chinese character association map whether the current training phrase exists, and if it exists, updating the occurrence frequency of the current training phrase, otherwise adding the current training phrase to the Chinese character association map; as an example, the training process is: receiving a text to be detected, segmenting the text to obtain multiple sentences, and using the algorithm model to search for each sentence starting from the first Chinese character to obtain the Chinese character model and association map of the Chinese character, until the Chinese character pointer points to the last Chinese character in the text to be detected, and the Chinese character pointer initially points to the first Chinese character;

[0039] The detection process of the neural network model also includes: grouping the Chinese text training data samples according to punctuation marks to obtain multiple sentence groups to be detected. When the current Chinese character of the sentence group to be detected exists in the Chinese character model library, the current Chinese character and the next Chinese character in the sentence group are combined into a current phrase, and the frequency of occurrence of the current phrase in the Chinese character association map is obtained. When the frequency of occurrence is less than a third preset threshold, the current Chinese character is considered to be a typo.

[0040] Optionally, the sample data in the verification sample set also includes erroneous phrases, and the verification condition of the neural network model includes when the detection accuracy of all phrases in the verification sample set is greater than a second preset threshold, and the verification process of the neural network model includes:

[0041] The verification samples of the verification sample set are segmented and grouped according to punctuation marks to obtain multiple sentence groups to be verified. When the current Chinese character of the sentence group to be verified exists in the Chinese character model library, the current Chinese character and the next Chinese character in the sentence group are combined into a current verification phrase, and the frequency of occurrence of the current verification phrase in the Chinese character association map is obtained. When the frequency of occurrence is less than a third preset threshold, the current Chinese character is considered to be a typo.

[0042] As an example, the verification process is as follows:

[0043] S1. Provide an erroneous text data and all the erroneous words in the text data;

[0044] S2. By detecting the erroneous text data, multiple groups of words that the algorithm model considers to be erroneous can be obtained;

[0045] S3. Calculate the hit rate of the wrong words considered by the program in S2 to the wrong words in S1;

[0046] S4. Provide more groups of erroneous text data and erroneous words in the text data described in S1, repeat S1, S2, and S3 to obtain multiple groups of hit rates. When the arithmetic mean of the multiple groups of hit rates is higher than the set value (for example, 90%), the model training is considered to be completed.

[0047] Optionally, the process of obtaining the text to be detected includes: extracting text data from pictures or video data. Using pictures to extract text data mainly involves filtering the pictures, that is, converting them into black and white pictures. Black and white pictures contain black pixels and white pixels. Black pixels are replaced by 1 and white pixels are replaced by 0, so that a binary matrix can be obtained. Then, the binary matrix can be easily converted into a piece of text data through existing technical means. When extracting text data from a video file, it is only necessary to convert the video file into multiple video frames, each of which is a picture, and then convert the picture into text data.

[0048] Optionally, the training process of the neural network model also includes:

[0049] The neural network model is retrained according to the user's feedback results to improve the detection accuracy of the neural network model.

[0050] Optionally, multiple neural network models of different types are established according to the type of text data, and the neural network model corresponding to the type of text to be detected is used to detect typos in the text to be detected. For example, for academic subjects, academic papers are used as training sets and validation sets, so that each model is more focused on one type, thereby improving accuracy.

[0051] A computer readable medium stores a computer program executable by a terminal device. When the program is run on the terminal device, the terminal device executes the steps of the above method.

[0052] A terminal device includes at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the steps of the above method.

[0053] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting Chinese text typos based on deep learning, characterized in that: include: Using the training sample set to train the neural network model, the neural network model includes a Chinese character model library, the training sample set includes a plurality of Chinese text training data samples, querying in turn whether each Chinese character in each training sentence group exists in the Chinese character model library, and if not, adding the corresponding Chinese character to the Chinese character model library; Repeat the above training steps until the neural network model is verified by using a verification sample set, wherein the sample data in the verification sample set includes typos; Obtain the text to be detected, and query in turn whether each Chinese character in the text to be detected exists in the Chinese character model library, and if not, consider the current Chinese character to be a wrong character; The neural network model also includes a Chinese character association graph; The training process of the neural network model also includes: segmenting and grouping the Chinese text training data samples according to punctuation marks to obtain a plurality of training sentence groups, forming a current training phrase with a current training Chinese character and its next Chinese character in the training sentence group, querying the Chinese character association map to see whether the current training phrase exists, and if so, updating the occurrence frequency of the current training phrase, otherwise, adding the current training phrase to the Chinese character association map; The detection process of the neural network model also includes: segmenting and grouping the Chinese text training data sample according to punctuation marks to obtain a plurality of sentence groups to be detected, when the current Chinese character of the sentence group to be detected exists in the Chinese character model library, combining the current Chinese character and the next Chinese character in the sentence group into a current phrase, obtaining the occurrence frequency of the current phrase in the Chinese character association map, and when the occurrence frequency is less than a third preset threshold, the current Chinese character is considered to be a wrong character; Wherein, the sample data in the verification sample set also includes erroneous phrases, and the verification condition of the neural network model includes when the detection accuracy of all phrases in the verification sample set is greater than a second preset threshold, and the verification process of the neural network model includes: The verification samples of the verification sample set are segmented and grouped according to punctuation marks to obtain multiple sentence groups to be verified. When the current Chinese character of the sentence group to be verified exists in the Chinese character model library, the current Chinese character and the next Chinese character in the sentence group are combined into a current verification phrase, and the appearance frequency of the current verification phrase in the Chinese character association map is obtained. When the appearance frequency is less than a third preset threshold, the current Chinese character is considered to be a typo.

2. A Chinese text typo detection method based on deep learning according to claim 1, wherein: The verification conditions of the neural network model include: The detection accuracy of all Chinese characters in the verification sample set is greater than a first preset threshold.

3. A Chinese text typo detection method based on deep learning according to any one of claims 1-2, wherein: The process of obtaining the text to be detected includes: extracting text data from the image or video data.

4. A method for detecting Chinese text typos based on deep learning according to any one of claims 1-2, wherein: The training process of the neural network model also includes: The neural network model is retrained according to the user's feedback results to improve the detection accuracy of the neural network model.

5. A method for detecting Chinese text typos based on deep learning according to any one of claims 1-2, wherein: A plurality of different types of neural network models are established according to the type of text data, and the neural network model corresponding to the type of the text to be detected is used to detect typos in the text to be detected.

6. A computer-readable medium, characterized in that It stores a computer program executable by a terminal device, and when the program is run on the terminal device, the terminal device executes the steps of the method described in any one of claims 1 to 5.

7. A terminal device, characterized in that: The method comprises at least one processing unit and at least one storage unit, wherein the storage unit stores a computer program, and when the program is executed by the processing unit, the processing unit executes the steps of the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Model training method and device, and wrongly-written character identification method and device

    CN106815592A

  • Wrongly written character correcting method, terminal and computer readable storage medium

    CN107341140A

  • Chinese error correction method, device and equipment based on mutual information, and storage medium

    CN107608963A

  • Automatic construction method and device of text proofreading error word library

    CN107665190A

  • Chinese character error detection method and system

    CN109213998A