Method and system for constructing large-model Myanforan syntax error correction corpus based on pronunciation error guidance
Through the large-model Burmese grammar error correction corpus construction method based on sound-like error guidance, and using ChatGLM and mBART models, the problem of poor reliance on manual annotation and error correction in the existing technology is solved, and efficient and automatic Burmese grammar error correction is achieved, especially in the handling of sound-like errors, which significantly improves the effect.
Patent Information
- Application Number
- CN202411875510.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-19
AI Technical Summary
The existing Myanmar grammar error correction technology relies on a large amount of manual labeling data and has poor error correction results, especially when dealing with sound-like errors.
Through the construction method of the Burmese grammar error correction corpus based on sound-like error guidance, using ChatGLM open source big model and pre-trained language model mBART, high-quality Burmese grammar error correction corpus is automatically generated, reducing manual labeling costs and improving error correction performance.
It has achieved the reduction of manual proofreading costs, improved the performance of the Myanmar grammar error correction model, and significantly improved the error correction effect, especially when dealing with sound-like errors.
Smart Images

Figure CN119808768A_ABST
Abstract
Description
[0001] Technical Language
[0002] The present invention relates to a method and system for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, and belongs to the technical field of natural language processing. Background Art
[0003] Burmese is the official language of Myanmar and belongs to the Tibeto-Burman language family of the Sino-Tibetan language family. It is a tonal language with a grammatical structure that is significantly different from that of the Indo-European language family. Phonemes contain tone information, which poses special challenges for speech recognition and text processing. At present, natural language processing (NLP) technology has made significant progress in grammatical error correction, especially in languages such as English. However, for small languages such as Burmese, the development of grammatical error correction technology is relatively lagging due to the lack of large-scale annotated corpora. Corpus is the basis of NLP research. Traditional corpus construction methods include text collection, cleaning, word segmentation, and annotation. Existing grammatical error correction technologies mainly include rule-based methods, statistical methods, and deep learning-based methods. Rule-based methods rely on manually written grammatical rules, while statistical methods rely on a large amount of annotated data. In recent years, with the development of deep learning technology, especially models based on the Transformer architecture, such as BERT, significant progress has been made in grammatical error correction tasks. At the same time, large model-based methods such as ChatGPT have begun to be used for corpus construction and text processing tasks. The ChatGPT-like model demonstrates powerful language understanding and generation capabilities. It can be used to generate high-quality text data, providing new possibilities for building a Burmese corpus. Burmese speech recognition is an important foundation for speech synthesis and grammatical error correction. Some researchers have proposed a Burmese speech recognition text correction method that integrates phonemes. Through a parameter sharing strategy, the transcribed text and its phonemes are jointly modeled, and phoneme information is used to assist in detecting and correcting Burmese homophones and space errors, which significantly improves the error correction performance. However, existing Burmese speech recognition text correction methods are not accurate, especially when dealing with phonetic errors.
[0004] Automatic processing of Burmese faces many challenges, including but not limited to many homophones, complex grammatical structure, limited corpus size, etc. The present invention aims to solve the deficiencies in existing Burmese grammar correction technology by constructing a Burmese grammar correction corpus based on a ChatGPT-like open source large model, using large-scale unlabeled Burmese text data, combined with deep learning technology, to automatically generate high-quality Burmese grammar correction corpus and improve the efficiency of Burmese text processing. Summary of the invention
[0005] The present invention provides a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance to solve the problem that Burmese grammar correction corpus requires a large amount of manual annotation and the Burmese correction corpus is insufficient. The present invention has achieved good experimental results in improving the performance of the Burmese grammar correction model.
[0006] The technical solution of the present invention is: a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, the method comprising:
[0007] Step 1: Based on the examples of similar sound errors in the Burmese error correction corpus based on speech recognition, the open source large model ChatGLM is guided to generate prompt instructions for the construction of Burmese grammar error correction corpus;
[0008] Step 2: Use prompt instructions that incorporate similar sound errors to guide the open source large model ChatGLM to generate Burmese grammar correction corpus;
[0009] Step 3: Post-process the Burmese grammar correction corpus generated in the previous step;
[0010] Step 4: Use the pre-trained language model mBART to test the error correction effect of the open source large model ChatGLM on the corpus generated by mixing the Burmese grammar correction corpus and the speech recognition corpus.
[0011] Furthermore, the specific steps of step 1 are as follows:
[0012] Step 1.1: Select the ChatGLM open source model as the basic model for constructing the Burmese grammar correction corpus;
[0013] Step 1.2: Deploy the ChatGLM open source model as an API interface for easy calling;
[0014] Step 1.3: On the Burmese error correction corpus of speech recognition, analyze the distribution of phonetic errors in the error correction corpus generated by the speech recognition model, and manually screen out examples of Burmese grammatical errors containing phonetic errors; use the screened examples to build a chain of thought to guide the ChatGLM open source model to generate prompt instructions for the construction of Burmese grammatical correction corpus.
[0015] Furthermore, the specific steps of step 3 are as follows:
[0016] Step 3.1: Perform data cleaning on the Burmese grammar correction corpus, delete special symbols, extra spaces between characters, data lines without Burmese characters, and short useless texts in the Burmese grammar correction corpus;
[0017] Step 3.2: For the sentences in the generated Burmese grammar correction corpus, under the condition of equal probability, insert a certain number of words into the sentence, replace a certain number of words with synonyms, randomly exchange a certain number of words, and randomly delete words with probability p, keeping the meaning of the original sentence unchanged.
[0018] Furthermore, the specific steps of step 4 are as follows:
[0019] Step 4.1: Fine-tune the pre-trained language model mBART;
[0020] Step 4.2: Mix the Burmese grammar correction corpus generated by the ChatGLM open source model with the speech recognition corpus;
[0021] Step 4.3: Use the model fine-tuned in step 4.1 to correct the errors of the corpus in the previous step and calculate the word error rate;
[0022] Step 4.4: Compare the error correction effect obtained in the previous step with the error correction effect of the speech recognition corpus.
[0023] The present invention provides a system for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, comprising: a module for executing the above-mentioned method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance.
[0024] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance is implemented.
[0025] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance is implemented.
[0026] A computer program product includes a computer program, which, when executed by a processor, implements the above-mentioned method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance.
[0027] The beneficial effects of the present invention are:
[0028] 1. The present invention guides the ChatGLM open source large model to automatically construct Burmese grammar correction corpus through manual prompt templates and automatic prompt templates, thereby reducing manual proofreading costs;
[0029] 2. The present invention performs post-processing on the Burmese grammatical error correction corpus generated based on the ChatGLM open source large model while keeping the type of Burmese grammatical error unchanged, thereby further enhancing the quality of the Burmese grammatical error correction corpus.
[0030] 3. The present invention adds Burmese grammatical error correction corpus generated based on the ChatGLM open source large model with similar data distribution and high correlation to the Burmese error correction corpus for speech recognition, which significantly improves the performance of the error correction model. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0032] Example 1: Figure 1 As shown, a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, the method comprising:
[0033] Step 1: Based on the examples of similar sound errors in the Burmese error correction corpus based on speech recognition, the open source large model is guided to generate prompt instructions for the construction of the Burmese grammar error correction corpus;
[0034] Step 1.1: Select the ChatGLM open source model as the basic model for constructing the Burmese grammar correction corpus;
[0035] Step 1.2: Deploy the ChatGLM open source model as an API interface for easy calling;
[0036] Step 1.3: On the Burmese error correction corpus of speech recognition, analyze the distribution of phonetic errors in the error correction corpus generated by the speech recognition model, and manually screen out examples of Burmese grammatical errors containing phonetic errors; use the screened examples to build a chain of thought to guide the ChatGLM open source model to generate prompt instructions for the construction of Burmese grammatical correction corpus.
[0037] Step 2: Use prompt instructions that incorporate similar sound errors to guide the open source large model to generate Burmese grammar correction corpus;
[0038] Step 3: Post-process the Burmese grammar correction corpus generated in the previous step;
[0039] The specific steps of step 3 are as follows:
[0040] Step 3.1: Perform data cleaning on the Burmese grammar correction corpus, delete special symbols, extra spaces between characters, data lines without Burmese characters, and short useless texts in the Burmese grammar correction corpus;
[0041] Step 3.2: For the sentences in the generated Burmese grammar correction corpus, under the condition of equal probability, insert a certain number of words into the sentence, replace a certain number of words with synonyms, randomly exchange a certain number of words, and randomly delete words with probability p, keeping the meaning of the original sentence unchanged.
[0042] Step 4: Use the pre-trained language model to test the error correction effect of the corpus generated by the open source large model, which is a mixture of Burmese grammar correction corpus and speech recognition corpus. The specific steps of step 4 are as follows:
[0043] Step 4.1: Fine-tune the pre-trained language model mBART;
[0044] Step 4.2: Mix the Burmese grammar correction corpus generated by the ChatGLM open source model with the speech recognition corpus;
[0045] Step 4.3: Use the model fine-tuned in step 4.1 to correct the errors of the corpus in the previous step and calculate the word error rate;
[0046] Step 4.4: Compare the error correction effect obtained in the previous step with the error correction effect of the speech recognition corpus.
[0047] Embodiment 2: A method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, the method comprising:
[0048] a1. Download the model file from the website corresponding to the ChatGLM open source model. Use the local API deployment method to adjust some of the model's call hyperparameters, such as Temperature and Top-p, through the interface method and interface link; finally, customize the return data and deploy the model as an API interface for subsequent calls;
[0049] Burmese grammatical errors can be roughly divided into eight categories: sound-like errors, word order errors, noun and quantifier collocation errors, verb morphology errors, auxiliary word usage errors, modifier misplacement, grammatical marker errors, and punctuation mark usage errors; the present invention manually screens out examples of typical Burmese grammatical errors that sound like errors from the Burmese error correction corpus of speech recognition, and uses other error types as supplements, and uses them to construct a thinking chain to guide the ChatGLM open source large model to generate prompt instructions for the construction of Burmese grammatical correction corpus.
[0050] The prompt instructions that can be processed by the language model are filtered out from the constructed prompt instructions.
[0051] 1) Filter out prompts involving links, special symbols, non-Burmese languages, etc.
[0052] 2) Filter out identical prompt instructions.
[0053] Since the ChatGLM open source model has hallucination problems, that is, the text generated by the model does not follow the original text or does not conform to the facts. In order to ensure the correctness of the model, the present invention manually constructs prompt instructions to form a prompt instruction task pool, thereby ensuring the quality of the Burmese grammar correction corpus.
[0054] a2. Select prompt instructions that incorporate similar sound errors from the task pool to guide the ChatGLM open source model to construct candidate Burmese grammar correction corpus.
[0055] 1) The method used by the present invention to guide the ChatGLM open source large model strictly follows the paradigm of Table 1 below, which includes a general prompt, an instruction field for guiding task completion, an input field for providing text to be edited, and an output sentence pair that requires a model response.
[0056] Table 1 Paradigm format
[0057]
[0058] 2) Clean the generated sentence pairs, remove the wrong sentences and form labels with the corresponding sentences.
[0059] a3. Perform post-processing operations on the Burmese grammatical correction corpus generated in the previous step; while the types of Burmese grammatical errors remain unchanged, further enhance the quality of the Burmese grammatical correction corpus generated by ChatGLM.
[0060] 1) Perform data cleaning on the Burmese grammar correction corpus, delete special symbols, extra spaces between characters, consecutive punctuation marks, data rows without Burmese characters, and short useless text in the Burmese grammar correction corpus.
[0061] 2) In order to keep the meaning of the original sentence basically unchanged, for the sentences in the generated Burmese grammar correction corpus, under the condition of equal probability, a certain number of words are inserted into the sentences in the generated Burmese grammar correction corpus, and a certain number of words are replaced with synonyms or randomly replaced, and words are randomly deleted with probability p to keep the meaning of the original sentence unchanged.
[0062] a4. Use the pre-trained language model to test the error correction effect of the corpus generated by the open source large model, which is a mixture of Burmese grammar correction corpus and speech recognition corpus.
[0063] The specific steps of a4 are as follows:
[0064] 1) Fine-tune the pre-trained language model mBART;
[0065] 2) Mix the Burmese grammar correction corpus generated by the ChatGLM open source model with the speech recognition corpus;
[0066] 3) Perform error correction on the corpus from the previous step using the fine-tuned model and calculate the word error rate;
[0067] 4) Compare the error correction effect obtained in the previous step with the error correction effect of the speech recognition corpus.
[0068] The a4 includes:
[0069] Corpus analysis is conducted on the post-processed Burmese grammatical correction corpus.
[0070] 1) Count the word frequency and frequency distribution of the post-processed Burmese grammar correction corpus, and draw frequency histograms and pie charts;
[0071] 2) Count the sentence length and average length distribution of the post-processed Burmese grammatical correction corpus and the Burmese error correction corpus after speech recognition, and draw a sentence length distribution histogram;
[0072] 3) Add the Burmese grammatical correction corpus generated by the ChatGLM open source model to the Burmese error correction corpus of speech recognition to form a mixed Burmese grammatical correction corpus.
[0073] Verify whether the Burmese grammatical correction corpus generated by the ChatGLM open source model can improve the model's error correction performance.
[0074] 1) The present invention uses the Burmese error correction corpus of speech recognition and the mixed corpus of the Burmese error correction corpus of speech recognition and the Burmese grammar error correction corpus generated by the ChatGLM open source large model as the experimental data of the present invention. The word error rate (WER) commonly used in the error correction field is used as the evaluation index of the Burmese grammar error correction model. The specific calculation method is shown in formula (1):
[0075]
[0076] in:
[0077] S represents the number of incorrectly replaced words (Substitutions).
[0078] D represents the number of deleted wrong words (Deletions).
[0079] I represents the number of inserted errors (Insertions).
[0080] N represents the total number of words in the reference text.
[0081] This formula measures the accuracy of the recognition result by calculating the number of wrong words (replacements, deletions, insertions) between the reference text and the recognized text, and then dividing it by the number of words in the reference text to get a percentage. The lower the WER value, the better the performance of the model.
[0082] 2) In order to verify the effect of the proposed method on the performance improvement of the Burmese grammar correction model, the present invention uses a mainstream Burmese grammar correction model as the benchmark model. The sequence-to-sequence model uses the most commonly used Transformer structure, and the goal is to directly "translate" incorrect sentences into correct sentences. In this verification, the present invention uses the fine-tuned mBART model for pre-training and fine-tuning.
[0083] The present invention firstly guides the ChatGLM open source large model to generate prompt instructions for constructing Burmese grammar correction corpus; secondly, uses the prompt instructions to guide it to generate candidate Burmese grammar correction corpus, from which high-quality corpus is screened out; finally, after post-processing, data cleaning, data enhancement and corpus analysis, it is combined with the Burmese correction corpus of speech recognition to further improve the performance of the Burmese grammar correction model.
[0084] The final experimental results are shown in Table 2. First, by comparing the first and second rows, it can be found that by increasing the amount of corpus, the effect of the fine-tuned mBART model can be better; secondly, by comparing the second and third rows, the effect of the mBART model can be better by combining the original speech recognition corpus generated by the ChatGLM open source large model for constructing Burmese grammar correction corpus with the original speech recognition corpus; finally, by comparing the third and fourth rows, it can be found that simply increasing the original speech recognition corpus cannot enable the model to achieve the above-mentioned enhanced effect. The fifth row is the error correction effect of the officially released mBART model. By comparing with the fourth row, it can be seen that with 21w data, the effect of the fine-tuned mBART model is better than the officially released mBART model.
[0085] Table 2 Performance of different datasets on sequence-to-sequence models
[0086]
[0087] The present invention provides a system for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, comprising: a module for executing the above-mentioned method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance.
[0088] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the program, a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance is implemented.
[0089] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance is implemented.
[0090] A computer program product includes a computer program, which, when executed by a processor, implements the above-mentioned method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance.
[0091] The specific implementation modes of the present invention are described in detail above in conjunction with the accompanying drawings, but the present invention is not limited to the above implementation modes, and various changes can be made within the knowledge scope of ordinary technicians in this field without departing from the purpose of the present invention.
Claims
1. A method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, characterized by: The method comprises: Step 1: Based on the examples of similar sound errors in the Burmese error correction corpus based on speech recognition, the open source large model is guided to generate prompt instructions for the construction of the Burmese grammar error correction corpus; Step 2: Use prompt instructions that incorporate similar sound errors to guide the open source large model to generate Burmese grammar correction corpus; Step 3: Post-process the Burmese grammar correction corpus generated in the previous step; Step 4: Use the pre-trained language model to test the error correction effect of the open source large model on the mixed Burmese grammar correction corpus and speech recognition corpus.
2. The method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance according to claim 1, characterized in that: The specific steps of step 1 are as follows: Step 1.1: Select the ChatGLM open source model as the basic model for constructing the Burmese grammar correction corpus; Step 1.2: Deploy the ChatGLM open source model as an API interface for easy calling; Step 1.3: On the Burmese error correction corpus of speech recognition, analyze the distribution of phonetic errors in the error correction corpus generated by the speech recognition model, and manually screen out examples of Burmese grammatical errors containing phonetic errors; use the screened examples to build a chain of thought to guide the ChatGLM open source model to generate prompt instructions for the construction of Burmese grammatical correction corpus.
3. The method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance according to claim 1, characterized in that: The specific steps of step 3 are as follows: Step 3.1: Perform data cleaning on the Burmese grammar correction corpus, delete special symbols, extra spaces between characters, data lines without Burmese characters, and short useless texts in the Burmese grammar correction corpus; Step 3.2: For the sentences in the generated Burmese grammar correction corpus, under the condition of equal probability, insert a certain number of words into the sentence, replace a certain number of words with synonyms, randomly exchange a certain number of words, and randomly delete words with probability p, keeping the meaning of the original sentence unchanged.
4. The method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance according to claim 1, characterized in that: The specific steps of step 4 are as follows: Step 4.1: Fine-tune the pre-trained language model mBART; Step 4.2: Mix the Burmese grammar correction corpus generated by the ChatGLM open source model with the speech recognition corpus; Step 4.3: Use the model fine-tuned in step 4.1 to correct the errors of the corpus in the previous step and calculate the word error rate; Step 4.4: Compare the error correction effect obtained in the previous step with the error correction effect of the speech recognition corpus.
5. A system for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance, characterized by: include: A module for executing a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance as described in any one of claims 1 to 4.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, it implements a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance as described in any one of claims 1 to 4.
8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements a method for constructing a large-model Burmese grammar correction corpus based on sound-like error guidance as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and device for voice recognition and error correction of Myankang language
CN117059072A
Chinese grammar error correction corpus construction method based on ChatGPT-like open source large model
CN117272984A
Method, device and equipment for automatically generating fine tuning instruction of large model and medium
CN117573835A