A real-time punctuation restoration method based on efficient corpus screening

By optimizing the corpus and the model, the problem of poor performance of existing real-time punctuation recovery models has been solved, and efficient and accurate punctuation recovery has been achieved in speech recognition post-processing, especially in scenarios with incomplete sentences.

CN120998203BActive Publication Date: 2026-07-10KUNMING UNIV OF SCI & TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
KUNMING UNIV OF SCI & TECH
Filing Date
2025-07-29
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing real-time punctuation recovery models are ineffective and struggle to efficiently and accurately recover punctuation marks in speech recognition post-processing, especially when faced with incomplete sentences or multiple sentence inputs.

Method used

By using an efficient corpus screening method, training, validation, and test sets were constructed. Data cleaning and splicing were performed using an open-source real-time punctuation recovery model. Experiments were conducted with different weights and datasets to optimize the model and improve punctuation recovery performance.

Benefits of technology

It significantly improves the performance of the real-time punctuation recovery model, achieving efficient punctuation recovery under limited corpus conditions, shortening inference time, and improving the accuracy and recall of punctuation recovery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120998203B_ABST
    Figure CN120998203B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of real-time punctuation recovery method based on efficient corpus screening.The present application first downloads multiple open-source Chinese error correction corpus data sets, cleans data, and removes punctuation, to build simulated speech recognition results;Then use multiple corpora to form multiple data sets using different methods and perform data weighting;Finally, compare the accuracy of the prediction results of multiple data sets, and continuously replace the generation method of the data set to fine-tune the model according to the recovery effect of the model.The present application effectively utilizes Chinese error correction corpus and open-source CT-transformer model, and achieves good experimental results in speech recognition post-processing tasks.Through the data enhancement method of splicing multiple sentences into a line and mixing different corpora according to different proportions and weighting different punctuation, the problem of real-time punctuation recovery of speech recognition corpus is solved, and the punctuation recovery effect is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a real-time punctuation recovery method based on efficient corpus screening, belonging to the field of natural language processing technology. Background Technology

[0002] With the rapid development of artificial intelligence technology, speech recognition technology, as an important means of human-computer interaction, is increasingly widely used, such as in intelligent customer service, speech translation, and voice input. However, current mainstream automatic speech recognition systems typically transcribe input speech directly into a text sequence without punctuation. This punctuation-free text block is not only difficult to read, but also causes significant performance loss to downstream natural language processing tasks, such as text classification, sentiment analysis, and machine translation.

[0003] Punctuation recovery is a crucial task in the post-processing stage of speech recognition. Punctuation recovery aims to add appropriate punctuation marks, such as commas, periods, and question marks, to the recognized text to improve readability and semantic integrity. Early punctuation recovery work primarily focused on predicting sentence breaks, failing to efficiently and accurately determine specific punctuation marks at sequence boundaries. Furthermore, the specific requirements of speech recognition tasks often necessitate models performing inference within a very short timeframe, making real-time punctuation recovery models essential. Real-time punctuation recovery models offer significant advantages in inference time compared to pre-trained language models and large-scale language models, making them highly suitable for post-processing operations in speech recognition.

[0004] Furthermore, in real-world speech scenarios, speech recognition systems often recognize incomplete sentences. This makes traditional error correction models, such as the pre-trained BART-large-Chinese language model, unsuitable for these applications. While the BART-large-Chinese model performs admirably for complete sentences, its results are less satisfactory for incomplete sentences or multiple sentences. Therefore, a real-time punctuation recovery model is essential. However, existing open-source real-time punctuation recovery models are not entirely satisfactory, making improvement crucial. This invention proposes a real-time punctuation recovery method based on efficient corpus selection to fine-tune existing open-source real-time punctuation recovery models. Summary of the Invention

[0005] The technical problem to be solved by this invention is: This invention provides a real-time punctuation recovery method based on efficient corpus screening to solve the problem of punctuation recovery in speech recognition post-processing. This invention has achieved good experimental results in the real-time punctuation recovery method.

[0006] The technical solution of this invention is: a real-time punctuation recovery method based on efficient corpus screening, the specific steps of which include:

[0007] Step 1: Based on punctuation examples in the Chinese monolingual error correction corpus, and combined with commonly used datasets in the Chinese monolingual error correction corpus, generate a training set; based on the Chinese corpus after speech recognition, generate a validation set and a test set.

[0008] Step 2: Post-process the generated training set, validation set, and test set, and perform rule-based data cleaning. At the same time, complete the concatenation of sentences and data sets.

[0009] Step 3: Conduct punctuation recovery experiments with different real-time punctuation recovery models, different weights for different punctuation marks, and different training sets, and evaluate the punctuation recovery results. Adjust the training set accordingly based on the evaluation results, and repeat Step 2.

[0010] Step 4: Use the trained real-time punctuation recovery model to perform punctuation recovery on the corpus to be punctuated.

[0011] Furthermore, Step 1 includes:

[0012] Step 1.1: Select Chinese monolingual error correction corpora, including news corpora, lang8 corpora, and Wudao corpora, as training corpora;

[0013] Step 1.2: Analyze the distribution of punctuation marks in the Chinese monolingual error correction corpus, focusing on commas, periods, and question marks, including the proportion of sentences ending with periods and question marks.

[0014] Step 1.3: In the open-source Chinese monolingual error correction corpus, analyze the distribution of punctuation in each corpus, and manually select corpora with similar punctuation distribution to the news corpus, lang8 corpus, and Wudao corpus;

[0015] Based on the distribution of punctuation marks in the manually selected corpora, the Chinese corpora after speech recognition were selected as the validation set and test set for the experiment, respectively.

[0016] After forming the test set, it is segmented into words and randomly truncated to simulate the interruption phenomenon commonly seen in speech recognition.

[0017] Furthermore, Step 2 includes:

[0018] Step 2.1: The Chinese monolingual error correction corpus, including news corpus, lang8 corpus, and Wudao corpus, is manually screened and cleaned. By formulating rules, special symbols, data lines containing non-Chinese characters, and useless text in the news corpus, lang8 corpus, and Wudao corpus are deleted to remove potentially low-quality corpus from the news corpus, lang8 corpus, and Wudao corpus. The resulting corpus is used as the training set.

[0019] Step 2.2: Combine a portion of the corpus in the training set according to the dynamically changing proportions to form a dataset consisting of one sentence per line, a mix of multiple sentences per line, or a dataset consisting of only multiple sentences.

[0020] Step 2.3: Remove punctuation from the training set used in the experiment to simulate the results of speech recognition.

[0021] The training set was checked again for datasets with one sentence per line, mixed datasets with multiple sentences per line, or datasets with only multiple sentences to confirm that the training set was suitable for the application scenario.

[0022] Furthermore, Step 3 includes:

[0023] Step 3.1: Use the CT-transformer real-time punctuation recovery model in the open-source Funasr framework to conduct experiments on sentence punctuation recovery for sentences without punctuation. Keep multiple experimental prediction results, evaluate the recovery effect according to the labels, and calculate the F1 score of the experimental prediction results.

[0024] Step 3.2: Use the open-source large model Qwen2.5 to conduct experiments on sentence punctuation recovery for sentences without punctuation, retain the experimental prediction results, evaluate the recovery effect based on the labels, and calculate the F1 score of the experimental prediction results;

[0025] Step 3.3: Using multiple datasets of different sizes and distributions as training sets, conduct multiple experiments by applying different weights to different punctuation marks, retain multiple experimental prediction results, calculate the F1 score of the experimental prediction results, and adjust the weights of the data weighting, the size and ratio of the training set according to the results.

[0026] Step 3.4: Repeat Step 2.2-Step 2.3 and Step 3.1-Step 3.3, repeatedly modifying the dynamic change ratio mentioned in Step 2.2 until the optimal model is trained.

[0027] The present invention also provides a real-time punctuation recovery system based on efficient corpus screening, the system comprising: a module for executing the aforementioned real-time punctuation recovery method based on efficient corpus screening.

[0028] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the aforementioned real-time punctuation recovery method based on efficient corpus screening.

[0029] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the real-time punctuation recovery method based on efficient corpus screening.

[0030] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the real-time punctuation recovery method based on efficient corpus screening.

[0031] The beneficial effects of this invention are:

[0032] 1. This invention provides a solution to the existing problem of real-time punctuation recovery from speech recognition corpora.

[0033] 2. This invention provides the splicing operation and gives the optimal ratio of one sentence per line and multiple sentences per line, providing a new data augmentation and corpus filtering method for subsequent corpus processing;

[0034] 3. This invention provides the optimal weight ratio between text and punctuation;

[0035] 4. This invention achieves good experimental results in speech recognition post-processing tasks by effectively utilizing Chinese error-correcting corpora and the open-source CT-transformer model. Through data augmentation methods such as concatenating multiple sentences into a single line, mixing different corpora in varying proportions, and weighting different punctuation marks, it effectively addresses the problem of insufficient corpora after real speech recognition, thereby improving the model's recovery performance and achieving better performance in punctuation recovery tasks. Attached Figure Description

[0036] Figure 1 This is a flowchart from the present invention. Detailed Implementation

[0037] Example 1: As Figure 1 As shown, a real-time punctuation recovery method based on efficient corpus screening is described, and the specific steps of the method include:

[0038] Step 1: Based on punctuation examples in the Chinese monolingual error correction corpus, and combined with commonly used datasets in the Chinese monolingual error correction corpus, generate a training set; based on the Chinese corpus after speech recognition, generate a validation set and a test set.

[0039] Step 2: Post-process the generated training set, validation set, and test set, and perform rule-based data cleaning. At the same time, complete the concatenation of sentences and data sets.

[0040] Step 3: Conduct punctuation recovery experiments with different real-time punctuation recovery models, different weights for different punctuation marks, and different training sets, and evaluate the punctuation recovery results. Adjust the training set accordingly based on the evaluation results, and repeat Step 2.

[0041] Step 4: Use the trained real-time punctuation recovery model to perform punctuation recovery on the corpus to be punctuated.

[0042] Furthermore, Step 1 includes:

[0043] Step 1.1: Select Chinese monolingual error correction corpora, including news corpora, lang8 corpora, and Wudao corpora, as training corpora;

[0044] Step 1.2: Analyze the distribution of punctuation marks in the Chinese monolingual error correction corpus, focusing on commas, periods, and question marks, including the proportion of sentences ending with periods and question marks.

[0045] Step 1.3: In the open-source Chinese monolingual error correction corpus, analyze the distribution of punctuation in each corpus, and manually select corpora with similar punctuation distribution to the news corpus, lang8 corpus, and Wudao corpus;

[0046] Based on the distribution of punctuation marks in the manually selected corpora, the Chinese corpora after speech recognition were selected as the validation set and test set for the experiment, respectively.

[0047] After forming the test set, it is segmented into words and randomly truncated to simulate the interruption phenomenon commonly seen in speech recognition.

[0048] Furthermore, Step 2 includes:

[0049] Step 2.1: The Chinese monolingual error correction corpus, including news corpus, lang8 corpus, and Wudao corpus, is manually screened and cleaned. By formulating rules, special symbols, data lines containing non-Chinese characters, and useless text in the news corpus, lang8 corpus, and Wudao corpus are deleted to remove potentially low-quality corpus from the news corpus, lang8 corpus, and Wudao corpus. The resulting corpus is used as the training set.

[0050] Step 2.2: Combine a portion of the corpus in the training set according to the dynamically changing proportions to form a dataset consisting of one sentence per line, a mix of multiple sentences per line, or a dataset consisting of only multiple sentences.

[0051] Step 2.3: Remove punctuation from the training set used in the experiment to simulate the results of speech recognition.

[0052] The training set was checked again for datasets with one sentence per line, mixed datasets with multiple sentences per line, or datasets with only multiple sentences to confirm that the training set was suitable for the application scenario.

[0053] Furthermore, Step 3 includes:

[0054] Step 3.1: Use the CT-transformer real-time punctuation recovery model in the open-source Funasr framework to conduct experiments on sentence punctuation recovery for sentences without punctuation. Keep multiple experimental prediction results, evaluate the recovery effect according to the labels, and calculate the F1 score of the experimental prediction results.

[0055] Step 3.2: Use the open-source large model Qwen2.5 to conduct experiments on sentence punctuation recovery for sentences without punctuation, retain the experimental prediction results, evaluate the recovery effect based on the labels, and calculate the F1 score of the experimental prediction results;

[0056] Step 3.3: Using multiple datasets of different sizes and distributions as training sets, conduct multiple experiments by applying different weights to different punctuation marks, retain multiple experimental prediction results, calculate the F1 score of the experimental prediction results, and adjust the weights of the data weighting, the size and ratio of the training set according to the results.

[0057] Step 3.4: Repeat Step 2.2-Step 2.3 and Step 3.1-Step 3.3, repeatedly modifying the dynamic change ratio mentioned in Step 2.2 until the optimal model is trained.

[0058] The present invention also provides a real-time punctuation recovery system based on efficient corpus screening, the system comprising: a module for executing the aforementioned real-time punctuation recovery method based on efficient corpus screening.

[0059] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the real-time punctuation recovery method based on efficient corpus screening.

[0060] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the real-time punctuation recovery method based on efficient corpus screening.

[0061] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the real-time punctuation recovery method based on efficient corpus screening.

[0062] Example 2: A real-time punctuation recovery method based on efficient corpus screening, the method comprising:

[0063] a1. Download open-source Chinese error correction corpora such as news corpus (news2016zh), lang8 corpus, and Wudao corpus from websites such as GitHub. Based on punctuation examples in Chinese monolingual error correction corpora and combined with commonly used datasets in Chinese monolingual error correction corpora, generate a training set; obtain real Chinese corpora after speech recognition from news websites, etc., and generate a validation set and a test set.

[0064] a2. Clean the downloaded training corpus according to rules;

[0065] 1) Filter out sentences containing garbled characters, non-Chinese characters, etc.;

[0066] 2) Filter out identical sentences;

[0067] a3. Remove punctuation from the cleaned training data using rules to generate simulated speech recognition results.

[0068] a4. Using Alibaba's open-source CT-Transformer model, perform a punctuation recovery task on the test set and provide the prediction results. This is currently the best-performing real-time punctuation recovery model among open-source models. Calculate its prediction results and label accuracy, recall, and F1 score. These data will serve as the baseline for this invention. The model can infer 5000 lines of sentences without punctuation in just 30 seconds.

[0069] a5. Using Alibaba's open-source large model Qwen2.5, perform a punctuation recovery task on the test set and provide the prediction results. Calculate the accuracy, recall, and F1 score of the prediction results and labels. These data demonstrate the performance of the large model on the real-time punctuation recovery task. Simultaneously, the inference time of the pre-trained language model BART-large-Chinese and Alibaba's open-source large model Qwen2.5 are recorded. Using the same 5000 rows of test data, the BART-large-Chinese model and the large model Qwen2.5 require 10 minutes and 30 minutes respectively to complete inference.

[0070] a6. Fine-tune the CT-Transformer model open-sourced by Alibaba. First, divide the corpus into a mixed dataset of one sentence per line and multiple sentences per line. Simultaneously, create a dataset consisting entirely of multiple sentences per line using the same corpus. This results in several datasets as follows:

[0071] (1) A dataset of 2 million lines with one sentence per line and multiple sentences per line, of which lang8 single sentences account for 600,000 lines; Wudao Corpus (single sentences) accounts for 400,000 lines; News Corpus (single sentences) accounts for 200,000 lines; Wudao Corpus (multiple sentences) accounts for 400,000 lines; and News Corpus (multiple sentences) accounts for 400,000 lines.

[0072] (2) A dataset of 3.6 million lines, consisting of one sentence per line and multiple sentences per line, of which lang8 single sentences account for 600,000 lines; Wudao Corpus (single sentences) accounts for 400,000 lines; News Corpus (single sentences) accounts for 200,000 lines; Wudao Corpus (multiple sentences) accounts for 2 million lines; and News Corpus (multiple sentences) accounts for 400,000 lines.

[0073] (3) A dataset of 4.4 million lines, consisting of one sentence per line and multiple sentences per line, of which lang8 single sentences account for 600,000 lines; Wudao Corpus (single sentences) accounts for 400,000 lines; News Corpus (single sentences) accounts for 200,000 lines; Wudao Corpus (multiple sentences) accounts for 2.8 million lines; and News Corpus (multiple sentences) accounts for 400,000 lines.

[0074] (4) A dataset of 5.14 million lines, consisting of one sentence per line and multiple sentences per line, of which lang8 single sentences account for 600,000 lines; Wudao Corpus (single sentences) accounts for 400,000 lines; News Corpus (single sentences) accounts for 200,000 lines; Wudao Corpus (multiple sentences) accounts for 3.54 million lines; and News Corpus (multiple sentences) accounts for 400,000 lines.

[0075] (5) All 394w datasets are one-line-multiple-sentence datasets, with the Wudao corpus (multiple sentences) accounting for 354w and the news corpus (multiple sentences) accounting for 40w. This dataset is a one-line-multiple-sentence part of dataset (4).

[0076] (6) A dataset of 10.07 million lines, consisting of one sentence per line and multiple sentences per line, of which lang8 single sentences account for 600,000 lines; Wudao Corpus (single sentences) accounts for 400,000 lines; News Corpus (single sentences) accounts for 200,000 lines; Wudao Corpus (multiple sentences) accounts for 3.54 million lines; and News Corpus (multiple sentences) accounts for 5.33 million lines.

[0077] (7) All 887w datasets are one-line-multiple-sentence datasets, with the Wudao corpus (multiple sentences) accounting for 354w and the news corpus (multiple sentences) accounting for 533w. This dataset is a one-line-multiple-sentence part of dataset (6).

[0078] Two different validation sets were used to adapt to different training sets. The weights for text and punctuation were set to 1:1 and 1:4 respectively, resulting in multiple predictions. The accuracy, recall, and F1 score for each prediction and label were calculated. This allows for the evaluation of a better model. The inference time of the real-time punctuation recovery model was also recorded. Using the same 5000-line test set, the real-time punctuation recovery model, both before and after fine-tuning, completed inference in only 30 seconds. This demonstrates that the real-time punctuation recovery model has a significant advantage in inference time compared to pre-trained language models and large-scale language models, where long inference times are unacceptable for this task.

[0079] a7. Verify whether the reasoning for punctuation restoration can meet the requirements of time and accuracy.

[0080] The F1 score, commonly used in error correction, was adopted as the evaluation metric for the model. The specific calculation method is shown in formula (1):

[0081] (1)

[0082] The definitions of Precision and Recall are shown in Equations (2) and (3):

[0083] Precision: Represents the proportion of samples that the model predicts to be positive, but which are actually positive. The formula is:

[0084] (2)

[0085] Recall: Represents the proportion of all true positive samples that are correctly predicted as positive by the model. The formula is:

[0086] (3)

[0087] in:

[0088] TP (True Positive): The number of samples that the model correctly predicts as positive.

[0089] FP (False Positive): The number of samples that the model incorrectly predicts as positive.

[0090] FN (False Negative): The number of false negatives that the model incorrectly predicted as negative.

[0091] 1) To verify the effectiveness of the proposed method in improving Chinese punctuation recovery, a real-time punctuation recovery model was selected as the baseline model. The sequence-to-sequence model adopted the most commonly used Transformer structure, aiming to add punctuation to sentences without it in real time. In this verification, the CT-transformer model was fine-tuned for punctuation recovery.

[0092] This invention first constructs a training set using an open-source Chinese error correction dataset, and constructs a validation set and a test set using real speech recognition results. Second, it cleans the corpus using rules, selects high-quality corpus data, and simulates the post-processing results of speech recognition using methods such as truncation. Finally, by comparing multiple datasets and data weighting methods to fine-tune the CT-transformer model, it finds the data augmentation method with the best punctuation restoration accuracy.

[0093] The final experimental results are shown in Table 1. On the test set used for real-world speech recognition, the performance of the pre-trained language model and the large-scale language model was unsatisfactory, and their inference time was too long; therefore, their results are only used as a reference. A detailed analysis follows:

[0094] First, comparing the data in row 1 with rows 4, 5, and 6 of the table shows that simply fine-tuning with a larger dataset does not guarantee improved punctuation recovery. Second, comparing the data in rows 4, 5, and 6 with rows 7, 8, 9, and 10 shows that the model's punctuation recovery performance improves as the dataset size increases. Finally, comparing the data in rows 7 and 9, and rows 8 and 10, reveals that fine-tuning with a dataset consisting entirely of one line and multiple sentences achieves better punctuation recovery results compared to using a dataset with a mix of one line and one sentence. Moreover, the dataset consisting entirely of one line and multiple sentences is smaller in size yet achieves better real-time punctuation recovery performance. Previously, fine-tuning real-time punctuation recovery models often used datasets with a mix of one line and one sentence, but according to this study, employing an efficient corpus selection method can significantly improve model performance.

[0095] To address the existing problem of real-time punctuation recovery from speech recognition corpora, this invention proposes an effective solution. Through in-depth analysis of the performance of different datasets on sequence-to-sequence models, this invention finds that simply relying on dataset fine-tuning does not necessarily improve punctuation recovery performance. However, the punctuation recovery performance improves as the dataset size increases. Further research reveals that fine-tuning with a dataset consisting entirely of one-line-multiple-sentence data not only achieves better punctuation recovery results compared to using datasets with a mix of one-line-one-sentence and one-line-multiple-sentence data, but also requires a smaller dataset size. This finding indicates that efficient corpus selection methods can significantly improve the model's punctuation recovery performance under limited corpus conditions. Therefore, this invention provides an innovative solution to the existing problem of real-time punctuation recovery from speech recognition corpora by optimizing the dataset structure and fine-tuning strategy, effectively improving the model's performance in real-time punctuation recovery tasks.

[0096] Table 1. Performance of different datasets on sequence-to-sequence models

[0097]

[0098] a8. The invention is applied by using a punctuation restoration model obtained by fine-tuning and weighting a dataset consisting of a mix of sentences and multiple sentences per line from 1007w to restore punctuation in the corpus to be restored.

[0099] The specific embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.

Claims

1. A real-time punctuation recovery method based on efficient corpus screening, characterized in that: The specific steps of the method include: Step 1: Based on punctuation examples in the Chinese monolingual error correction corpus, and combined with commonly used datasets in the Chinese monolingual error correction corpus, generate a training set; based on the Chinese corpus after speech recognition, generate a validation set and a test set. Step 2: Post-process the generated training set, validation set, and test set, perform rule-based data cleaning, and simultaneously complete the concatenation of sentences in the dataset. Step 3: Conduct punctuation recovery experiments with different real-time punctuation recovery models, different weights for different punctuation marks, and different training sets, and evaluate the punctuation recovery results. Adjust the training set accordingly based on the evaluation results, and repeat Step 2. Step 4: Use the trained real-time punctuation recovery model to recover punctuation from the corpus to be punctuated; Step 2 includes: Step 2.1: The Chinese monolingual error correction corpus, including news corpus, lang8 corpus, and Wudao corpus, is manually screened and cleaned. By formulating rules, special symbols, data lines containing non-Chinese characters, and useless text in the news corpus, lang8 corpus, and Wudao corpus are deleted to remove potentially low-quality corpus from the news corpus, lang8 corpus, and Wudao corpus. The resulting corpus is used as the training set. Step 2.2: Combine a portion of the corpus in the training set according to the dynamically changing proportions to form a dataset consisting of one sentence per line, a mix of multiple sentences per line, or a dataset consisting of only multiple sentences. Step 2.3: Remove punctuation from the training set used in the experiment to simulate the results of speech recognition. The training set was checked again for datasets with one sentence per line, mixed datasets with multiple sentences per line, or datasets with only multiple sentences to confirm that the training set was suitable for the application scenario. Step 3 includes: Step 3.1: Use the CT-transformer real-time punctuation recovery model in the open-source Funasr framework to conduct experiments on sentence punctuation recovery for sentences without punctuation. Keep multiple experimental prediction results, evaluate the recovery effect according to the labels, and calculate the F1 score of the experimental prediction results. Step 3.2: Use the open-source large model Qwen2.5 to conduct experiments on sentence punctuation recovery for sentences without punctuation, retain the experimental prediction results, evaluate the recovery effect based on the labels, and calculate the F1 score of the experimental prediction results; Step 3.3: Use multiple datasets of different sizes and distributions as training sets, perform multiple experiments by weighting data with different weights for different punctuation marks, retain multiple experimental prediction results, calculate the F1 score of the experimental prediction results, and adjust the weights of data weighting, the size and ratio of training sets according to the results; Step 3.4: Repeat Step 2.2-Step 2.3 and Step 3.1-Step 3.3, repeatedly modifying the dynamically changing ratio mentioned in Step 2.2 until the optimal model is trained; The formula for calculating the F1 value is as follows: ; Precision represents precision, and Recall represents recall.

2. The real-time punctuation recovery method based on efficient corpus screening according to claim 1, characterized in that: Step 1 includes: Step 1.1: Select Chinese monolingual error correction corpora, including news corpora, lang8 corpora, and Wudao corpora, as training corpora; Step 1.2: Analyze the distribution of punctuation marks in the Chinese monolingual error correction corpus, focusing on commas, periods, and question marks, including the proportion of sentences ending with periods and question marks. Step 1.3: In the open-source Chinese monolingual error correction corpus, analyze the distribution of punctuation in each corpus, and manually select corpora with similar punctuation distribution to the news corpus, lang8 corpus, and Wudao corpus; Based on the distribution of punctuation marks in the manually selected corpora, the Chinese corpora after speech recognition were selected as the validation set and test set for the experiment, respectively. After forming the test set, it is segmented into words and randomly truncated to simulate the interruption phenomenon commonly seen in speech recognition.

3. A real-time punctuation recovery system based on efficient corpus screening, characterized in that, The system includes a module for performing a real-time punctuation recovery method based on efficient corpus screening as described in any one of claims 1 to 2.

4. 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 the real-time punctuation recovery method based on efficient corpus screening as described in any one of claims 1 to 2.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the real-time punctuation recovery method based on efficient corpus screening as described in any one of claims 1 to 2.

6. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the real-time punctuation recovery method based on efficient corpus screening as described in any one of claims 1 to 2.