A Chinese measure word correction method, system, computer device and storage medium
By constructing a dynamically expandable collocation vocabulary and a numeral dictionary, combining a large language model for semantic verification, and designing a multi-level rule filtering mechanism and a Prompt template, the problems of insufficient knowledge base coverage and weak semantic judgment ability in Chinese quantifier correction are solved, achieving a highly accurate and robust quantifier correction effect.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 山东齐鲁壹点传媒有限公司
- Filing Date
- 2026-02-04
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies for Chinese classifier error correction suffer from problems such as insufficient knowledge base coverage, weak semantic judgment ability, and unstable error correction, making it difficult to achieve high accuracy and robustness in complex text environments.
We construct a dynamically expandable collocation vocabulary and numeral dictionary, combine them with a large language model for semantic verification, design a multi-level rule filtering mechanism and a Prompt template, and implement quantifier error correction through a multi-layer fusion proofreading framework.
It significantly improves the accuracy and robustness of quantifier correction, ensures stability and naturalness in complex text environments, and avoids misjudgment and omissions in traditional methods.
Smart Images

Figure CN122113908A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of natural language processing technology, specifically to a method, system, computer device, and storage medium for correcting errors in Chinese classifiers. Background Technology
[0002] Chinese extensively uses structures composed of numerals, classifiers, and nouns. Classifiers and nouns often have relatively fixed yet highly nuanced collocation requirements, and the variations in expression across different contexts make the standardization and accuracy of classifier usage a crucial aspect of text processing. Existing technologies largely rely on pre-set vocabularies, rule templates, or simple predictions based on statistical and language models for classifier matching and error detection. However, due to the lag in vocabulary updates and the vast and frequently changing number of collocations, traditional methods often struggle to cover the rich expressions in real-world scenarios. Furthermore, classifier collocation judgment inherently involves multiple levels of information, including sentence meaning, contextual information, and noun attributes. Simple rules or models cannot adequately handle deep semantic analysis, easily leading to misjudgments or omissions, especially when dealing with fixed structures, industry-specific terminology, and semantic ambiguities. Therefore, there is an urgent need for a classifier error correction method that integrates large-scale dictionary knowledge, flexible rule mechanisms, and the semantic understanding capabilities of large models to achieve higher accuracy, robustness, and adaptability, meeting the needs of automatic classifier correction in complex text environments. Summary of the Invention
[0003] In view of this, the present invention provides a Chinese classifier error correction method, system, computer device and storage medium to solve the problems of classifier collocation detection relying on manual rules, insufficient coverage, weak semantic judgment ability and unstable error correction in the prior art.
[0004] In a first aspect, the present invention provides a method for correcting errors in Chinese classifiers, including: The system constructs a dynamically expandable collocation vocabulary, including: automatically identifying the collocation relationships between newly appearing quantifiers and nouns in the text and calculating their co-occurrence frequency during system operation; when the co-occurrence frequency exceeds a preset threshold, the newly appearing combination is added to the collocation vocabulary as a new legal collocation. The initial vocabulary can be constructed based on a large-scale corpus of news databases, after text cleaning, format standardization, and manual verification, forming a stable and reliable basic collocation resource.
[0005] A numeral dictionary was constructed, including Chinese numerals, indicative numerals, and Arabic numerals. Ambiguous numeral expressions were standardized by breaking them down into recognizable numeral segments and modifier segments to ensure the consistency and accuracy of numeral recognition.
[0006] Establish a structured error correction training library, continuously absorb high-quality error correction examples, design a Prompt template for quantifier error correction, call a large model for semantic verification and correction, and achieve intelligent and context-adaptive error correction capabilities.
[0007] The input text is segmented into sentences, and the first word segmentation and part-of-speech tagging are performed. The three-element structure is identified based on the collocation word list and the numeral dictionary. For sentences with identified triadic structures, a pre-defined fixed phrase filter word list is used. This fixed phrase filter word list stores common fixed collocations, proper nouns, and indivisible structures to avoid misprocessing legitimate fixed expressions. For sentences that did not match successfully, the collocation validity of quantifiers and nouns in the three-part structure was checked based on the collocation word list; the check process was as follows: Query the collocation table to obtain the set of nouns corresponding to the classifiers in the three-part structure. Determine whether the nouns in a three-part structure belong to a set of nouns; If it is, it is determined to be a valid combination, and the error correction process for the ternary structure is not performed; If it does not belong to the set of nouns in the collocation list, then iterate through the collocation list and search whether the nouns in the three-element structure belong to the set of nouns of other quantifiers; If a noun belongs to a set of nouns with at least one other quantifier, it is determined that the verification fails and there is a candidate correct quantifier. If a noun does not belong to any set of nouns containing quantifiers, it is considered a failed check and is marked as an item without dictionary basis.
[0008] If the verification fails, processing information for semantic error correction is generated based on the ternary structure: if the noun belongs to a set of nouns with at least one other quantifier, then at least one other quantifier is identified as a candidate correct quantifier, and the first type of processing information is generated accordingly. The first type of processing information includes a data structure generated based on one or more candidate correct quantifiers, such as "introducing a [part|set|set|batch|type|some|items] equipment"; if the noun is marked as an item without dictionary basis, then this state and the original structure are used as the second type of processing information.
[0009] For the three-element structures that fail the verification, a second word segmentation and part-of-speech tagging is performed on the input text. All nouns in the input text are extracted to form the first noun set, and the nouns corresponding to the quantifiers to be corrected in the collocation list are obtained to form the second noun set. If the intersection of the first and second noun sets is empty, it is determined that in the global context of the current text, no noun can form a valid collocation with the quantifier to be corrected, thus triggering the condition for the intervention of a large language model for semantic correction. Based on the processed information, the large language model, which has been fine-tuned as described above, is invoked, and the specifications of the dedicated Prompt template are applied to perform quantifier replacement and context adaptation on the sentence, generating the final corrected sentence.
[0010] Secondly, the present invention provides a Chinese classifier error correction system, comprising: The resource management module is used to build and maintain collocation word lists and numeral dictionaries; The preprocessing and validation module is used to segment the input text into sentences, words, and parts of speech, filter fixed phrases, identify trigram structures, and then validate the collocation validity based on the collocation vocabulary. The information generation module is used to generate processing information for subsequent semantic error correction for structures that fail the verification. The model training module is used to construct quantifier error correction training data and to train or optimize large language models based on this data. The semantic error correction module is used to determine the intersection of noun sets for structures that fail the verification. When the intersection is empty, it calls the trained large language model to perform quantifier replacement and context adaptation based on the processed information, and outputs the corrected sentence.
[0011] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method described in the first aspect or any corresponding embodiment thereof.
[0012] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the method described in the first aspect or any corresponding embodiment thereof.
[0013] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to perform the method described in the first aspect or any corresponding embodiment thereof.
[0014] This invention constructs a multi-layered fusion proofreading framework of "rule detection + vocabulary matching + large-scale model verification," achieving synergistic effects between the knowledge base, rule system, and semantic reasoning capabilities. This significantly improves the accuracy, naturalness, and robustness of quantifier correction, effectively overcoming the limitations of traditional single-technology paths. The multi-level rule detection process designed in this invention first eliminates misjudgments of inherent expressions at the source through a fixed phrase filtering mechanism. Then, based on a dynamically expandable large-scale quantifier pairing vocabulary, it performs rapid and reliable legality verification and candidate generation, effectively solving the problem of insufficient coverage by static dictionaries. It innovatively introduces a noun set cross-validation mechanism, providing a reliable basis for triggering large-scale model decisions, ensuring that it intervenes only at necessary stages, performing context-based quantifier selection and contextual adaptation, thereby avoiding the rigid replacements and excessive modifications common in traditional methods. This invention significantly improves the standardization and naturalness of the output text, providing stable and reliable technical support for automatic proofreading of Chinese quantifiers in complex real-world scenarios. Attached Figure Description
[0015] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating a Chinese classifier correction method according to an embodiment of the present invention; Figure 2 This is a schematic diagram of the rule verification and candidate generation process of a Chinese classifier error correction method according to an embodiment of the present invention; Figure 3 This is a structural block diagram of a Chinese classifier correction system according to an embodiment of the present invention; Figure 4 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] In the current field of natural language processing, the automatic proofreading and normalization of Chinese texts is an important and challenging task. Among them, the correct use of quantifiers is particularly crucial. There is a rich system of quantifiers in Chinese, and the collocation relationship between quantifiers and nouns is strictly restricted by semantic categories, cognitive habits, and specific contexts, forming a complex and precise set of language rules. For example, collocations such as "a piece of paper", "a pen", and "a horse" reflect the internal relationship between the inherent attributes of nouns and the selection of quantifiers. The accuracy of such collocations directly affects the standardization degree of texts and the authenticity of language. Therefore, in applications such as machine translation, content generation, intelligent writing assistance, and text quality detection, the realization of automatic identification and correction of quantifier errors has clear practical value.
[0019] Existing technical research and practices for automatic correction of Chinese quantifiers mainly follow the following three paradigms, each with its own characteristics but also corresponding limitations: The first category is the rule- and knowledge-base-based method. This method relies on a pre-constructed "quantifier-noun" collocation dictionary or rule set. The system identifies the ternary structure in the text through pattern matching and queries the knowledge base to verify its legality. The advantage of this method is that the principle is intuitive and the response speed is fast, and it has a high judgment accuracy for the standard collocations included in the dictionary. However, its performance bottleneck lies in the coverage and update ability of the knowledge base. The language is in dynamic development, with new noun concepts, professional terms, and emerging collocations constantly emerging. It is difficult for a static dictionary to comprehensively cover them, which easily leads to missed judgments of out-of-vocabulary words or new collocations. In addition, strict rule matching is difficult to handle cases where there are multiple legitimate quantifiers (such as "a set of / a piece of / a set of equipment") or cases where selection needs to be based on subtle contexts, lacking the necessary flexibility.
[0020] The second category is the statistical machine learning-based method. This type of method uses large-scale annotated or unannotated corpora to calculate the co-occurrence probability of quantifiers and nouns and train classification models (such as maximum entropy models, support vector machines, etc.) to predict or evaluate the possibility of collocations. Compared with the pure rule-based method, the statistical method can automatically learn some collocation rules from the data, alleviating the data sparsity problem to a certain extent. However, its model performance is severely limited by the scale and representativeness of the training corpus, and in essence, what is learned is the shallow statistical association at the word list level, making it difficult to deeply model the deep semantic features of nouns, the internal structure of phrases, and the cross-sentence context dependence relationship. Therefore, in the face of complex cases that require semantic reasoning or common sense judgment, the generalization ability of such methods is limited, and it may produce recommended results that do not conform to language intuition.
[0021] The third category is methods based on deep learning and pre-trained language models. With the widespread application of large-scale pre-trained models, researchers have begun to explore using their powerful contextual semantic representation capabilities to handle quantifier collocation problems. Through fine-tuning or prompt learning, the model can directly generate or correct quantifier components in the text. This type of method shows significant advantages in capturing contextual information and understanding the overall sentence meaning. However, directly applying it to high-precision, high-reliability error correction scenarios still faces challenges: First, the model's generation behavior has strong randomness and uncontrollability, which may make unnecessary modifications to non-target text parts, violating the error correction principle of "minimal modification"; second, the model's decision-making process has poor interpretability, making it difficult to trace the basis of its judgment, which is not conducive to manual verification or system optimization of the error correction results; third, the model may misjudge fixed phrases or professional terms such as "a series" or "the first stage" because it lacks targeted protection mechanisms.
[0022] It is particularly noteworthy that in practical applications, texts often contain numerous fixed expressions that are similar in form but cannot be broken down using conventional grammar (such as "first-class disciplines," "secondary innovation," and "three major elements"). Existing technical solutions generally lack effective mechanisms to accurately identify and exempt such structures, thus becoming a significant reason for increased misjudgment rates and decreased system usability.
[0023] In summary, current mainstream technologies all face inherent limitations when dealing with the task of automatic error correction of Chinese quantifiers: rule-based methods are constrained by the completeness and static nature of knowledge bases; statistical methods are limited by the expressive power of shallow features and insufficient understanding of semantic depth; and end-to-end deep learning methods have shortcomings in controllability, interpretability, and protection of fixed structures. A single technological paradigm struggles to achieve a balance across multiple dimensions, including accuracy, robustness, flexibility, and security.
[0024] Therefore, there is an urgent need to explore a novel technical framework that can effectively integrate structured language knowledge, controllable rule logic, and deep semantic understanding capabilities. This framework should achieve the following goals: providing a broad and updatable set of collocation criteria using a scalable dynamic knowledge base; designing a multi-level rule filtering mechanism to quickly identify and protect legitimate fixed structures and filter out obvious errors; and introducing a large language model for in-depth contextualized semantic discrimination and optimization in complex or marginal cases where rules and knowledge cannot provide definitive conclusions. Through this hierarchical and collaborative design, it is hoped that a Chinese classifier automatic error correction system can be built that is more adaptable to real-world complex text environments, possessing both high accuracy and low error correction risk, to meet the growing demand for high-quality intelligent text processing.
[0025] According to an embodiment of the present invention, an embodiment of a method for correcting Chinese measure words is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0026] In this embodiment, a method for correcting Chinese measure words is provided. Figure 1 It is a flowchart of a method for correcting Chinese measure words according to an embodiment of the present invention, as Figure 1 shown, the process includes the following steps: Step S101, construct a dynamically extensible collocation word list, construct a numeral dictionary; segment the input text, perform the first word segmentation processing and词性标注 (positional tagging), and identify the ternary structure based on the collocation word list and the numeral dictionary.
[0027] Step S1011, construct a corpus of fixed collocations of measure words The purpose of this step is to form a stable and extensible resource library of fixed collocations of measure words to support subsequent identification and correction of measure word structures. The system first collects and preprocesses a large amount of Chinese news texts. Through text cleaning, format normalization, and extraction of information related to measure words, structured combinations of measure words and nouns are generated. Subsequently, through statistical analysis and manual verification, common and reliable collocation relationships are screened and fixed to form an initial collocation word list. The system also supports dynamic updates. When a new stable combination is detected, the word list can be automatically expanded to maintain the real-time nature and language adaptation ability of the corpus.
[0028] The system collects millions of texts from news databases such as Qilu One Point and Dazhong Daily, and uses a preprocessing module to remove HTML tags, abnormal symbols, and invalid characters. Subsequently, Jieba word segmentation and posseg positional tagging tools are used to extract measure words (such as "set", "vehicle", "time", etc.) and their corresponding nouns from the texts. By counting the occurrence frequencies and combining manual verification, about 2000 stable collocations are finally generated, such as: "set - generator / server", "time - access / attempt", "vehicle - car / chariot", etc. When the system detects a newly emerging and repeatedly occurring collocation relationship between a measure word and a noun during subsequent operation, it can trigger an automatic writing process to supplement the new combination into the word list and achieve dynamic expansion of the corpus.
[0029] Step S1012, construct a numeral dictionary It should be noted that the "词性标注" in the English translation of step S101 is left in Chinese because it seems to be a specific technical term that may not have a well-known equivalent in English. If there is a proper English term for it, it should be used for a more accurate translation.This step aims to provide a unified and accurate basis for numeral recognition for quantifier structure recognition. First, the system collects and organizes common Chinese numerals, demonstrative numerals, and Arabic numerals according to the characteristics of the Chinese language, and classifies and stores them for quick retrieval during subsequent structure extraction. The constructed numeral dictionary adopts an extensible data structure, supports word form normalization and unified parsing of multiple types of numerals, enabling the system to stably recognize the numeral components in the "numeral + quantifier" structure and providing basic semantic units for quantifier phrase detection.
[0030] In an optional embodiment, the numeral dictionary preset in the system includes Chinese numerals (such as "zero, one, two, three, ten, hundred, thousand, ten thousand, hundred million", etc.), demonstrative numerals ("this, that"), and Arabic numerals (0–9). During the construction process, the system performs standardization processing on different types of numerals. For example, it normalizes "both" to "two", and splits fuzzy quantifiers such as "more than twenty" and "hundreds of" into recognizable segments such as "twenty" and "more" to improve parsing ability. In the syntactic analysis stage, the system can directly use this dictionary to quickly locate numerals, improving the recognition accuracy and efficiency of quantifier structures.
[0031] Step S1013, Clause Parsing and Quantifier Structure Recognition The goal of this step is to identify potential ternary structures from the input text. After the system completes the construction of the word list and dictionary, it performs clause processing on the original text, and then performs word segmentation and词性标注 on each sentence. Combining the quantifier fixed collocation word list and the numeral dictionary, the system performs structure matching and collocation verification on the candidate phrases in the sentence to determine whether there is a quantifier structure that conforms to the known combination. When a fixed or common collocation is recognized, the system outputs the matching result and records the structure information, providing basic data for the next step of quantifier error correction.
[0032] In an optional embodiment, the system uses regular expressions or natural language processing tools (such as the posseg module of jieba) to perform clause and词性标注 on the text. For the sentence "He bought three new servers and installed them in place", the system will recognize the structure "three (numeral) + units (quantifier) + servers (noun)", and query the constructed quantifier collocation word list to confirm that "units—servers" is a valid collocation, thus marking this structure as a stable collocation combination. For structures such as "drank two cups of medicine" and "walked five kilometers", the system will also identify and confirm them through词性标注 and collocation comparison. If an unknown collocation (such as "two rains") appears, the system will record it as a suspected error structure, providing input for the subsequent error correction step S2.
[0033] It should be noted that the "词性标注" in the original text seems to be a misspelling. It might be "词性标注", which is translated as "词性 tagging" or "word - class tagging". But since the original text is kept as it is in the relevant part, the translation follows the original.Step S102: For sentences with identified trigram structures, match them with a preset fixed phrase filter word list; for sentences that fail to match, verify the legality of the collocation between quantifiers and nouns in the trigram structure based on the collocation word list; if the verification fails, generate processing information for semantic error correction based on the trigram structure.
[0034] Step S1021, Verification of valid collocation of quantifiers In this step, the system first determines whether a three-part structure consisting of a numeral, a classifier, and a noun exists in the current sentence based on the recognition result of step S1013. If the structure exists, the system retrieves the set of legal nouns corresponding to the classifier from the classifier collocation corpus and compares it with the nouns actually appearing in the sentence. When the noun can be found in the classifier's legal collocation list, it indicates that the current classifier usage conforms to language habits, and is therefore judged as a correct collocation, and does not proceed to the error correction stage. If the noun is not included in the classifier's legal noun set, the system continues the reverse search: checking whether the noun appears in the legal collocation lists of other classifiers to determine the possible range of correct classifiers corresponding to the noun, providing a basis for generating subsequent error correction candidates. If no recognizable "numeral + classifier + noun" combination is detected in the current sentence, the system skips this step and directly processes the next sentence.
[0035] The system detected that the sentence "held a happy tea party" contained the structure "a tea party". When querying the fixed collocation list of classifiers, the system can find the set of nouns corresponding to "times" (such as "visit", "operation", "launch", "echo", "tea party", "breakthrough", "process", "training"), which includes "tea party". Therefore, the system judges the collocation to be valid and does not require further correction. Conversely, for the sentence "introduced a large industrial equipment", the system recognizes the structure "a piece of equipment", but the list of valid collocations for "head" usually includes animal nouns such as "camel", "ox", "elephant", "pig", "lion", "bear", "deer", "water buffalo", etc., but not "equipment". The system then searches whether "equipment" belongs to the set of valid nouns of other classifiers (such as "set", "batch", etc.), thus confirming that the current classifier is used incorrectly and generating candidate options for subsequent correction. If a sentence such as "the sun is shining brightly today" does not contain any "numeral + classifier + noun" structure, the system skips it directly and does not execute the collocation judgment logic in this step.
[0036] Step S1022: Cross-quantifier noun matching and candidate quantifier identification If, in step S1021, the noun in the judgment sentence fails to match a valid noun in the current quantifier's set, this step continues to search for valid collocations of the noun under other quantifiers based on the collocation dictionary. The system traverses the noun set of all quantifiers. If the noun can be found in the valid collocation list of another quantifier, it is considered that the current quantifier is suspected of being misused, and that other quantifier is added as a candidate correct quantifier for use in the subsequent error correction stage. If the noun does not exist in any valid noun set of all quantifiers, it is considered that there is no clear dictionary to rely on, the current structure is retained and enters the subsequent large-scale model semantic reasoning stage, where the semantic model further determines the possible correct quantifier or keeps it as is.
[0037] The sentence "Introduced a large industrial equipment" is judged by step S1021 to be an invalid collocation of "head + industrial equipment". This step continues to search the fixed collocation list of quantifiers for the noun "industrial equipment". The system finds that although this noun does not appear in the collocation list for "head", it is recorded as a valid collocation in the noun set for "unit", such as "unit: equipment, prototype, freezer, server", etc. Therefore, the system determines that the current quantifier "head" is likely used incorrectly and records "unit" as a candidate correct quantifier. If the detected noun is a very rare or newly emerging term, such as "photonic quantum processor", and does not exist in any of the quantifier noun lists, the system considers it a case of no dictionary match and directly submits the structure to the subsequent large-scale model semantic judgment for further correction or confirmation.
[0038] Step S1023: Construction and matching of fixed phrase filtering rules In the quantifier collocation detection process, to avoid misjudging fixed expressions, proper nouns, and indivisible structures, this step first constructs a fixed phrase filter word list to record common stable collocations and idiomatic structures. Before performing quantifier validity detection, the system performs a filter word matching check on the input sentence. If a phrase matching the filter word list appears in the sentence, it is considered an indivisible whole expression, skipping the three-element structure recognition and subsequent error detection steps, thus effectively reducing the risk of erroneous modification. For sentences that do not match the filter word list, quantifier structure parsing and validity verification continue, ensuring that the system maintains high accuracy while also being robust and adaptable.
[0039] The system inputs the sentence "This company is a local state-owned enterprise at the first level". Before processing, the system first retrieves the fixed phrase filter list and detects that "state-owned enterprise at the first level" has been included as a fixed expression. Since this phrase belongs to an inseparable structure, the system determines that it does not need to perform the analysis of "numeral + measure word + noun", nor does it perform the legality verification of measure word collocations, thus avoiding misidentifying "first level" as a numeral and "state-owned enterprise" as a noun structure, ensuring that the correct correction will not be made to this normal expression. If the sentence is "Held an annual summary meeting", since there is no fixed phrase in the filter list, the system will continue to enter the measure word detection process.
[0040] Step S1024, output the candidate correction structure After completing the legality verification of measure word collocations, the system selects several possible measure word replacement candidates based on the nouns identified in the previous steps and their corresponding correct measure word sets, combined with the collocation list, statistical co-occurrence data, and semantic similarity model. The system uniformly formats and outputs these candidate measure words to form a candidate correction structure for subsequent calls by the automatic error correction module or for manual proofreading to assist in determining the most appropriate measure word replacement plan. This method not only improves the flexibility of error correction but also enhances the diversity and accuracy of error correction results.
[0041] The system detects that there is a suspected error in the collocation of "piece" and "equipment" in the sentence "Introduced a piece of equipment". Through the collocation list and semantic analysis, the system finds that the legal measure words corresponding to "equipment" include "unit", "set", "piece", "batch", "type", "some", and "one", etc. So, the system outputs the candidate correction structure as "Introduced one [unit|set|piece|batch|type|some|one] of equipment", indicating that there are multiple reasonable measure word choices at this position. This result can not only provide optional solutions for the automatic error correction module but also facilitate the manual proofreader to make a final determination of the measure word.
[0042] Step S103, for the ternary structure that fails the verification, perform the second word segmentation processing and词性标注 on the input text, extract all nouns in the input text to form the first noun set, and obtain the nouns corresponding to the measure word to be corrected in the collocation list to form the second noun set; if the intersection of the first noun set and the second noun set is empty, then based on the processing information, call the large language model to perform measure word replacement and context adaptation on the sentence to generate the finally corrected sentence.
[0043] Step S1031, construct the measure word error correction training database This step establishes a structured training database for quantifier error correction. The data format includes the original sentence (ori_sent), the suspected incorrect quantifier phrase (quantity_word), and the corresponding correct sentence (correct_sent). Through an automatic expansion mechanism, this database continuously incorporates high-quality error correction examples identified during the system operation, ensuring the continuous growth of data scale and diversity. The training data mainly comes from the annotated corpus of Qilu One Point, the open-source data sets that have been screened and manually verified, and the key data sets of the quantifier collocation corpus. This database provides a solid data foundation for the fine-tuning training and reinforcement learning of subsequent large models, thus significantly improving the accuracy and performance of the model in actual quantifier error correction tasks.
[0044] An example is as follows: {"ori_sent": "一座千年树成为了当地居民的象征", "quantity_word": "一座", "correct_sent": "一棵千年树成为了当地居民的象征"}.
[0045] This database will continuously receive such high-quality error correction data during the system operation. If it detects that the usage of "个" in "一个手机" is correct, it will not be updated; but if it finds "引进一头工业设备", it will automatically mark the correction as "台" and store this case in the database for subsequent model training.
[0046] Step S1032, construct the large model call and Prompt template design For the quantifier error correction task, design a dedicated Prompt template, and combine with the qwen large model to achieve semantic-level quantifier collocation detection and correction. The Prompt guides as an "expert in Chinese quantifier collocation", requiring the model to strictly modify only the suspected incorrect quantifier part in the input sentence while keeping other parts of the sentence unchanged. The input adopts a tuple form, where the first element is the suspected incorrect quantifier and the second element is the corresponding sentence. The Prompt contains multiple example correction pairs to guide the model to understand the correction specifications. Through this Prompt, the text to be processed and the suspected incorrect quantifier are passed to the qwen large model, and the model accurately discriminates based on the context semantics and outputs the corrected sentence or the original sentence, ensuring that the correction result is both accurate and natural, avoiding unnecessary text modification and redundant explanations.
[0047] An example Prompt construction is as follows: "As a Chinese classifier collocation expert, please strictly follow these rules: Input a Chinese text sentence that is suspected of having a classifier and noun collocation error, and provide the suspected incorrect classifier as a tuple. The first element is the classifier, and the second element is the suspected incorrect sentence. Perform classifier-noun collocation detection. If a collocation error is found, return the corrected sentence; otherwise, return the original sentence. Examples include: {"ori_sent":"A thousand-year-old tree became a symbol of the local residents","quantity_word":"a","correct_sent":"A thousand-year-old tree became a symbol of the local residents"}, {"ori_sent":"A majestic mountain stands tall","quantity_word":"a","correct_sent":"A majestic mountain stands tall"}, {"ori_sent":"It turned out to be a crystal-clear mountain peak","quantity_word":"a","correct_sent":"It turned out to be a crystal-clear mountain peak"}. Execution instructions: Please strictly follow the above rules, only modify the classifier part, keep the rest of the sentence unchanged, and do not provide any additional explanations." An example of the input format is: {'ori_sent': 'Each sentence in this article expresses the author's three months of wandering', 'quantity_word': 'one sentence'}. The model returns a corrected result based on this input, such as "Each sentence in this article expresses the author's three months of wandering", or if there is a quantifier error, it returns the corrected sentence.
[0048] Step S1033: Construct a set of nouns for the article. The input article is segmented and tagged with parts of speech sentence by sentence, with a focus on extracting all nouns and removing non-noun components, ultimately generating a complete set of nouns within the article's scope. Specifically, the article is first divided into several sentences, then segmented using word segmentation tools (such as jieba and HanLP), and finally tagged with parts of speech to select nouns. This set of nouns accurately reflects the entity and concept vocabulary involved in the article, providing fundamental data support for subsequent matching and detection of quantifiers and noun collocations.
[0049] For example, after processing a news report, the extracted set of nouns may include words such as "play", "airplane", and "ship", reflecting the main entities involved in the text, which serve as the basis for subsequent error correction logic.
[0050] Step S1034: Construct the set of nouns corresponding to the classifier to be corrected. Based on a pre - constructed collocation vocabulary list, retrieve the set of legal nouns for the quantifier to be corrected. The system looks up all the legal nouns corresponding to this quantifier in the vocabulary list, providing a standard reference for subsequent matching and comparison. This noun set covers common and reasonable noun collocations under this quantifier, helping to determine whether the current use of the quantifier complies with the rules.
[0051] For example, for the quantifier "unit", the set of legal nouns extracted by the system from the vocabulary list includes "repertoire", "prototype", "generator", "bus", "channel", "freezer", etc., serving as the standard set for subsequent intersection judgment.
[0052] Step S1035, Intersection Judgment of Noun Sets and Error - Correction Trigger Mechanism In this step, by comparing the noun set A obtained from segmenting the article sentence with the set of legal nouns B corresponding to the quantifier to be corrected, the intersection situation of the two sets is judged. If the intersection is non - empty (A ∩ B ≠ ∅), it is determined that the collocation of the quantifier and the noun may be legal, and the system avoids incorrect modification and does not trigger the large - model error - correction. On the contrary, if the intersection is empty (A ∩ B = ∅), it indicates that the collocation deviation of the quantifier is obvious, and the large - model is allowed to conduct a comprehensive semantic judgment and correction. This mechanism combines rule matching and semantic understanding to achieve the effect of "correct without incorrect modification, incorrect must be corrected", improving the accuracy and stability of error - correction.
[0053] Suppose the article noun set A is [repertoire, airplane, ship], and the noun set B for the quantifier "unit" to be corrected is [repertoire, prototype, generator, bus, channel, freezer]. Since there is an intersection "repertoire" between A and B, it is determined that the current quantifier collocation is legal and no error - correction is performed. If the article noun set is [camel, industrial equipment], and the set corresponding to "unit" does not contain "industrial equipment", the large - model is allowed to conduct a semantic judgment and correction on the candidate sentence.
[0054] Step S1036, Preliminary Fusion of Multiple Sources of Information This step integrates the quantifier collocation dictionary and the rule detection results, the semantic proofreading results of the large - model, and the judgment information of the noun set filtering mechanism to comprehensively evaluate the rationality of the quantifier collocation. The dictionary and rule detection are responsible for locating basic errors, the large - model supplements the error - correction accuracy through context semantic understanding, and the noun set filtering mechanism prevents misjudgment of legal collocations. The three are organically combined to form multiple candidate error - correction schemes, providing support for the selection of the final result.
[0055] The system detects through the dictionary that the quantifier "head" in "introduce a head of industrial equipment" has an abnormal collocation with the noun "equipment". At the same time, the large - model proposes a replacement suggestion "unit" based on the context. Combining the judgment of the noun set filtering to confirm the necessity of error - correction, a candidate error - correction list is formed by integrating the information from these three aspects.
[0056] Step S1037, Large Model Context Adaptation and Polishing Optimization Based on the candidate error correction solutions, the large model uses context information for semantic comparison and screening, avoiding rigid replacements, and ensuring that the corrected sentences are both accurate and natural and fluent. The model focuses on context adaptation and language polishing, optimizing the quantifier replacement results to make the corrected content conform to the real language expression habits, improving the overall smoothness and logical consistency of the sentences. For the candidate error correction structure "introduce one [piece|set|unit|batch|type|some|individual] of equipment", the large model combines the context semantics and common expressions, and finally selects "unit" as the most appropriate quantifier to achieve natural and accurate correction.
[0057] Step S1038, Output the Final Corrected Sentence and Ensure Expression Consistency The system outputs the corrected sentence that conforms to semantic logic and language norms according to the final judgment of the large model. The correction not only targets quantifier errors but also takes into account the overall expression coherence and accuracy of the sentence, avoiding unnecessary additions and deletions to the sentence structure and content, and ensuring that the result is natural and standard. This step realizes the effective integration of rule matching and deep semantic understanding, significantly improving the error correction effect. The finally output sentence is "introduce one unit of equipment", which corrects the quantifier error while maintaining the original meaning. The sentence is expressed smoothly and naturally, without unnecessary modifications, and conforms to language habits and semantic logic. Embodiment
[0058] The difference between this embodiment and Embodiment 1 is that the construction logic and update mechanism of the quantifier collocation list are more applicable to the quantifier error correction requirements in professional fields. For a specific field (medical field), professional literature, industry reports, and standard texts (such as "Medical Term Usage Specifications", "Engineering Technical Document Writing Standards") are collected, and domain-specific quantifier collocations (such as "one CT scanner", "one dose of medicine", "one case of surgery" in the medical field; "one set of construction equipment", "one steel bar", "one bridge" in the engineering field) are manually screened, and 500 - 800 domain-specific collocations are initially supplemented. Embodiment
[0059] The difference between this embodiment and Embodiment 1 lies in the multi - language compatibility and cross - scenario adaptation logic, which constructs a "Chinese - English bilingual quantifier mapping vocabulary list": collecting the collocation relationships between Chinese quantifiers and their corresponding English expressions (e.g., "台" corresponds to "a unit of", "a piece of", "辆" corresponds to "a vehicle of"). When the text appears "3 头 equipment" (Chinese - English mixture), first map the English noun "equipment" to the Chinese "设备", and then correct it to "3 台 equipment" according to the Chinese quantifier rules; expand the numeral dictionary to multi - language numerals: add the standardization processing of English numerals (one, two, ten, etc.) and Roman numerals (I, II, X, etc.), and support the recognition and correction of mixed structures such as "two 头 设备", "X 个 方案"; add "Chinese - English mixed fixed expressions" (such as "Level 3 企业", "一类 importedproducts") to the fixed - phrase filtering vocabulary list to avoid incorrect splitting of mixed structures.
[0060] In this embodiment, a Chinese quantifier error - correction system is also provided. This system is used to implement the above - mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0061] This embodiment provides a Chinese quantifier error - correction system, as Figure 3 shown, including: A resource management module, used to construct and maintain a collocation vocabulary list and a numeral dictionary; A pre - processing and verification module, used to perform sentence splitting, word segmentation, and词性标注 (should be "pos tagging" in English) on the input text, perform fixed - phrase filtering, identify ternary structures, and then verify their collocation legality based on the collocation vocabulary list; A processing information generation module, used to generate processing information for subsequent semantic error - correction for structures that fail the verification; A model training module, used to construct quantifier error - correction training data and train or optimize a large - language model based on this; A semantic error - correction module, used to perform an intersection judgment on the noun sets for structures that fail the verification, and when the intersection is empty, call the trained large - language model to perform quantifier replacement and context adaptation based on the processing information, and output the corrected sentence.
[0062] The further function descriptions of the above - mentioned various modules and units are the same as those in the corresponding above - mentioned embodiments, and will not be repeated here.
[0063] In this embodiment, a Chinese classifier correction system is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit), a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0064] This invention also provides a computer device having the above-described features. Figure 4 This is a Chinese classifier error correction system.
[0065] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 4 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 4 Take a processor 10 as an example.
[0066] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.
[0067] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0068] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0069] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0070] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0071] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0072] A portion of this application can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to this application through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0073] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for correcting errors in Chinese classifiers, characterized in that, The method includes: Construct a dynamically expandable collocation list, which is used to record the collocation relationship between quantifiers and nouns; Construct a numeral dictionary; The input text is segmented into sentences, and the first word segmentation and part-of-speech tagging are performed. Based on the collocation word list and numeral dictionary, a ternary structure composed of numerals, classifiers and nouns is identified. For sentences that identify the three-gram structure, a preset fixed phrase filter word list is matched; For sentences that fail to match, the collocation validity of quantifiers and nouns in the three-element structure is verified based on the collocation word list. If the verification fails, processing information for semantic error correction is generated based on the ternary structure. For the three-element structure that fails the verification, a second word segmentation and part-of-speech tagging are performed on the input text. All nouns in the input text are extracted to form a first noun set, and the nouns corresponding to the quantifier to be corrected in the collocation table are obtained to form a second noun set. If the intersection of the first set of nouns and the second set of nouns is empty, then based on the processing information, the large language model is invoked to perform quantifier replacement and context adaptation on the sentence, generating the final corrected sentence.
2. The method according to claim 1, characterized in that, The verification of the collocation validity of quantifiers and nouns in the ternary structure based on the collocation vocabulary includes: Query the collocation table to obtain the set of nouns corresponding to the quantifiers in the ternary structure in the collocation table; Determine whether the nouns in the given ternary structure belong to the set of nouns; If it belongs to the category, it is determined to be a valid combination, and the error correction process of the ternary structure is not performed; If it does not belong to the set of nouns of other classifiers, then traverse the collocation word list and search whether the nouns in the three-element structure belong to the set of nouns of other classifiers. If the noun belongs to a set of nouns with at least one other quantifier, it is determined that the verification fails and there is a candidate correct quantifier; If the noun does not belong to any set of nouns containing quantifiers, it is determined that the verification fails and it is marked as an item without dictionary basis.
3. The method according to claim 2, characterized in that, If the verification fails, processing information for semantic error correction is generated for the ternary structure, including: If the noun belongs to a set of nouns with at least one other quantifier, then the at least one other quantifier is identified as a candidate correct quantifier, and the first type of processing information is generated accordingly. If the noun is marked as an item without dictionary basis, this state and the original structure are treated as the second type of processing information.
4. The method according to claim 3, characterized in that, The first type of processing information includes a data structure generated based on one or more of the candidate correct quantifiers.
5. The method according to claim 1, characterized in that, The construction of a dynamically expandable collocation vocabulary includes: During system operation, the system automatically identifies the collocation relationship between newly appearing quantifiers and nouns in the text and counts their co-occurrence frequency; When the co-occurrence frequency exceeds a preset threshold, the newly appearing combination is added to the collocation list as a new legal collocation.
6. The method according to claim 1, characterized in that, The construction of the numeral dictionary includes: including Chinese numerals, indicative numerals and Arabic numerals, and standardizing the expression of fuzzy numerals.
7. A Chinese classifier error correction system, characterized in that, The system includes: The resource management module is used to build and maintain collocation word lists and numeral dictionaries; The preprocessing and verification module is used to segment the input text into sentences, words, and parts of speech, filter fixed phrases, identify trigram structures, and then verify the legality of the collocation based on the collocation vocabulary. The information generation module is used to generate processing information for subsequent semantic error correction for the structures that fail the verification. The model training module is used to construct quantifier error correction training data and train or optimize large language models based on this data. The semantic error correction module is used to determine the intersection of noun sets for structures that fail the verification. When the intersection is empty, it calls a trained large language model to perform quantifier replacement and context adaptation based on the processed information and outputs the corrected sentence.
8. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to perform the method of any one of claims 1 to 6.