Chinese and English literature ambiguity resolution method based on context adaptive model
By using a deep learning-based context-adaptive model, and leveraging Transformer and BERT models, we can detect and resolve lexical and syntactic ambiguities in Chinese and English documents. This solves the problem of poor ambiguity resolution in existing technologies and achieves efficient and accurate ambiguity resolution.
Patent Information
- Application Number
- CN202511411439.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-01-09
AI Technical Summary
Existing technologies fail to fully utilize contextual information when processing Chinese and English documents, resulting in poor ambiguity resolution due to lexical and syntactic ambiguities.
We employ a deep learning-based context-adaptive model, utilizing the Transformer model to capture long-distance dependencies and combining it with the BERT model to detect and resolve lexical and syntactic ambiguities. We select the word meaning that best fits the current context by fusing word vectors and context, and construct a syntactic tree through dependency parsing to resolve ambiguities.
It improves the accuracy and resolution precision of ambiguity detection in Chinese and English documents, and can handle ambiguity in mixed Chinese and English contexts across languages. It is applicable to both single-language and mixed-context environments.
Abstract
Description
Field of the Invention
[0001] The present invention belongs to the field of natural language processing (NLP), and particularly relates to a method and system for resolving ambiguities in Chinese and English documents based on a context-adaptive model. Background Art
[0002] When dealing with Chinese and English documents in daily life, lexical ambiguity and syntactic ambiguity are common and thorny problems. Both Chinese and English have situations of lexical ambiguity and syntactic ambiguity. Lexical ambiguity (polysemy) examples: In Chinese, "马上" can mean "on horseback", or it can mean "immediately, soon"; in English, "bank" can refer to "financial institution", and can also refer to "riverbank"; "bat" can mean "baseball bat" or "bat". Syntactic ambiguity examples: In Chinese, "开刀的是他父亲" can mean "His father is a doctor and is performing an operation on a patient", or it can mean "His father is a patient and is undergoing an operation"; for example, the English sentence "They are hunting dogs." can be "They are hunting for dogs" or "They are hunting dogs". Lexical ambiguity and syntactic ambiguity pose challenges to document understanding and automated semantic analysis. Most existing technologies use static dictionaries or rule-based methods to resolve ambiguities, but these methods do not fully utilize context information, resulting in poor ambiguity resolution effects.
[0003] Therefore, the present invention is proposed. Summary of the Invention
[0004] The present invention aims to provide a context-adaptive ambiguity resolution method that can accurately understand polysemes and syntactic ambiguities in Chinese and English documents and improve the accuracy of automated processing. The method of the present invention detects ambiguities through multi-level context information, combines a context modeling method based on deep learning, and automatically identifies parts that may be ambiguous in words and sentences. The Transformer model (such as BERT or GPT) is used to capture long-distance dependencies, thereby providing accurate context information for subsequent ambiguity resolution. The method of the present invention uses the BERT model as the core of context modeling, and through the deep fusion of word vectors and context, can learn high-quality context information in a large-scale corpus, thereby improving the accuracy of ambiguity detection. This method is not only applicable to a single language, but also applicable to Chinese-English mixed contexts, and can perform ambiguity identification and resolution across languages.
[0005] The technical solution of the present invention is as follows:
[0006] A method for resolving ambiguities in Chinese and English documents based on a context-adaptive model, comprising the following steps:
[0007] (1) Detect lexical and syntactic ambiguities in the literature; (2) resolve lexical and syntactic ambiguities.
[0008] Preferably, the step of detecting lexical ambiguity in the document is as follows: through deep fusion of word vectors and the context of the document, the document is used to detect ambiguous polysemous words; specifically, assuming there is a polysemous word ω in the document text. i The context is C={ω1,ω2,...,ω n}, predicting word meaning S(ω) i ) = argmax s∈S P(s|C); where S is the set of all possible word meanings, and P(s|C) is the word ω given the context C. i The conditional probability of having a certain word meaning s.
[0009] Preferably, the steps for resolving lexical ambiguity are as follows: A deep learning-based polysemous word resolution model is used, combined with document context and knowledge base information, for resolution; specifically, assuming that the polysemous word ω in the document text... i Having multiple meanings s1, s2, ..., s k The word vectors provided by context C are ν C The word vector for each word meaning is ν. sj The selection of word meanings is based on maximizing the similarity between the context and the meanings of each word: S(ω) i ) = argmax sj∈S cos(ν C ,ν sj ); where cos(ν) C ,ν sj Let represent the cosine similarity between context C and word meaning sj, where S is the set of all word meanings. The model calculates the similarity between context C and each candidate word meaning sj. j The similarity between words is evaluated, and the meaning with the highest similarity is selected as the final resolution result. This formula is used to select the meaning that best fits the current context from multiple possible meanings, thereby resolving lexical ambiguity and improving the accuracy of lexical ambiguity resolution. A deep learning-based polysemous word resolution model (WSD) is adopted, combining context and knowledge base information for resolution. This model uses BERT or Transformer architecture to resolve ambiguity by comparing the similarity between the context and the various meanings defined in the dictionary. The context-aware model dynamically adjusts the choice of word meaning, without relying on a fixed dictionary or rules, and can flexibly handle situations where the meaning is unknown. When processing polysemous words in Chinese and English, it can automatically select appropriate grammatical and semantic rules based on language differences and context.
[0010] Preferably, the criterion for detecting the syntactic ambiguity existing in the literature is that when the model finds that a sentence can construct multiple different and reasonable syntactic tree structures, it is considered that there is syntactic ambiguity. For example, in the example of "the operation is his father", when constructing the syntactic tree, the dependency syntax analysis model may generate two possible syntactic tree structures: structure one: his father is a doctor, and is operating on a patient. Structure two: his father is a patient, and is undergoing surgery. When the model detects this "one sentence corresponds to multiple syntactic trees", it is judged that syntactic ambiguity is detected.
[0011] Preferably, the resolution step of the syntactic ambiguity is to use the dependency syntax analysis model to construct the syntactic tree, and then learn the relationship between the syntactic tree and the context through the Transformer model to finally resolve the syntactic ambiguity; Specifically: assuming that the dependency syntax tree of a sentence is T=(V,E), wherein V is the node set, that is, the vocabulary, and E is the edge set, that is, the dependency relationship; The goal of syntactic ambiguity resolution is to find the most appropriate syntactic tree structure T* so that the grammar structure and the context semantics are the most matched: T * = argmax T P(T|C); wherein P(T|C) represents the probability of the syntactic tree T * given the context C. That is, according to the given context information C, the syntactic tree T that can maximize the conditional probability P(T|C) is selected, that is, the most appropriate syntactic structure is found, so that the syntactic tree is most consistent with the semantics and structure of the context. Syntactic ambiguity resolution mainly solves the ambiguity problem caused by the grammar structure; by combining the syntax analysis and semantic understanding model to resolve such ambiguity. Specifically, first, use the dependency syntax analysis model (such as BiLSTM-based dependency parsing) to construct the syntactic tree, and then learn the relationship between the syntactic tree and the context through the Transformer model to finally resolve the syntactic ambiguity. The innovation and advantage is that the deep learning-based dependency syntax analysis and grammar tree construction technology is adopted, which can accurately identify the source of syntactic ambiguity, and dynamically adjust the grammar structure combined with the context information. By combining grammar and semantic analysis, complex syntactic structures and multiple ambiguity types can be processed, and the ambiguity resolution effect is improved.
[0012] Preferably, the context C is encoded by the model to obtain the best matching of word meaning and syntax.
[0013] The beneficial effects of the present application are:
[0014] The context-adaptive ambiguity resolution method of the present application can accurately understand polysemous words and syntactic ambiguities in Chinese and English literature, and improve the accuracy of automatic processing. The method of the present application detects ambiguities through multiple levels of context information, automatically identifies parts of words and sentences that may have ambiguities by combining a context modeling method based on deep learning. A Transformer model (such as BERT or GPT) is used to capture long-range dependencies, thereby providing accurate context information for subsequent ambiguity resolution. The method of the present application uses a BERT model as the core of context modeling, and through the deep fusion of word vectors and context, it can learn high-quality context information in a large-scale corpus, thereby improving the accuracy of ambiguity detection. For the resolution of lexical ambiguity, a deep learning-based polysemous word resolution model is used, combined with literature context and knowledge base information for resolution; the most suitable word sense for the current context is selected from multiple possible word senses, thereby resolving lexical ambiguity and improving the accuracy of lexical ambiguity resolution. For the resolution of syntactic ambiguity, a dependency syntax analysis model is used to construct a syntax tree, and then a Transformer model is used to learn the relationship between the syntax tree and the context, and finally the syntactic ambiguity is resolved. The present application provides an efficient and accurate ambiguity resolution method. The method of the present application combines context modeling, deep learning, syntax analysis and other technologies to solve the ambiguity problems faced by traditional methods when processing Chinese and English literature. The method of the present application is not only suitable for a single language, but also suitable for a mixed Chinese-English context, and can perform ambiguity recognition and resolution across languages. DETAILED DESCRIPTION
[0015] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be further described in detail below with reference to the embodiments. All other embodiments obtained by those skilled in the art without creative labor on the basis of the embodiments in the present application belong to the scope of protection of the present application.
[0016] The context-adaptive ambiguity resolution method of the present application, comprising the following steps: (1) detecting the lexical ambiguity and syntactic ambiguity existing in the literature; (2) resolving the lexical ambiguity and syntactic ambiguity.
[0017] The step of detecting the lexical ambiguity existing in the literature is: detecting the polysemous word having ambiguity in the literature by deep fusion of word vectors and context of the literature; specifically: assuming that there is a polysemous word ω i in the literature text, whose context is C={ω1, ω2,..., ω n n}, and predicting the word sense S(ω i )=argmax s∈S P(s|C); wherein S is a set of all possible word senses, and P(s|C) is the word ω iThe conditional probability of a word sense s. The steps for resolving lexical ambiguity are: using a deep learning-based polysemy resolution model, combining literature context and knowledge base information for resolution; specifically: assuming that the polysemous word ω i has multiple word senses s1, s2,..., s k , the word vector provided by the context C is v C , the word vector of each word sense is v sj , and the selection of the word sense is based on maximizing the similarity between the context and each word sense: S(ω i )=argmax sj∈ S cos(v C , v sj ); where cos(v C , v sj ) represents the cosine similarity between the context C and the word sense sj, and S is the set of all word senses. The model evaluates the similarity between the context C and each candidate word sense s j , and selects the word sense with the highest similarity as the final resolution result. This formula is used to select the word sense that best fits the current context from multiple possible word senses, thereby resolving lexical ambiguity and improving the accuracy of lexical ambiguity resolution. A deep learning-based polysemy resolution model (WSD) is used to resolve ambiguity in combination with context and knowledge base information. This model uses BERT or Transformer architecture to resolve ambiguity by comparing the similarity between the context and each word sense defined in the dictionary. The model dynamically adjusts the selection of word senses through context awareness, and does not rely on fixed dictionaries or rules, allowing for flexible handling in unknown word senses. When processing English and Chinese polysemous words, it can automatically select appropriate grammar and semantic rules based on language differences and context.
[0018] Wherein the judgment standard for detecting syntactic ambiguity in the literature is: when the model finds that a sentence can construct multiple different and reasonable syntactic tree structures, it is considered that there is syntactic ambiguity. For example, in the example "he is the father who is operating", when constructing a syntactic tree, the dependency syntax analysis model may produce two possible syntactic tree structures: structure one: his father is a doctor, and is operating on the patient. Structure two: his father is a patient, and is undergoing surgery. When the model detects this "one sentence corresponds to multiple syntactic trees", it is judged that syntactic ambiguity is detected. The steps for resolving syntactic ambiguity are: using a dependency syntax analysis model to construct a syntactic tree, and then learning the relationship between the syntactic tree and the context through a Transformer model to finally resolve the syntactic ambiguity; specifically: assuming that the dependency syntax tree of a sentence is T=(V,E), where V is the node set, i.e. the vocabulary, and E is the edge set, i.e. the dependency relationship; the goal of syntactic ambiguity resolution is to find the most appropriate syntactic tree structure T* so that the grammar structure and the context semantics are the most matched: T* =argmax T P(T|C); where P(T|C) represents the syntax tree T given the context C. * The probability of syntactic ambiguity is determined by the given context information C. Specifically, it involves selecting the syntax tree T that maximizes the conditional probability P(T|C), i.e., finding the most suitable syntactic structure that best matches the semantics and structure of the context. Syntactic ambiguity resolution primarily addresses ambiguities caused by grammatical structures; it resolves such ambiguities by combining syntactic analysis and semantic understanding models. Specifically, it first constructs a syntax tree using a dependency parsing model (such as BiLSTM-based dependency parsing), then learns the relationship between the syntax tree and the context using a Transformer model, ultimately resolving syntactic ambiguities. Its innovations and advantages include: employing deep learning-based dependency parsing and syntax tree construction techniques, accurately identifying the sources of syntactic ambiguity, and dynamically adjusting the grammatical structure based on contextual information. By combining syntactic and semantic analysis, it can handle complex syntactic structures and various types of ambiguity, improving the effectiveness of ambiguity resolution.
[0019] The context C is encoded through the model to obtain the best match between word meaning and syntax.
[0020] Example: Two English sentences with typical ambiguity are selected for analysis: (A) "Time flies like an arrow."; (B) "Fruit flies like a banana.". The specific resolution method is implemented as follows:
[0021] 1. Detect lexical and syntactic ambiguities in the literature:
[0022] (1) Lexical ambiguity detection: In the sentence “Time flies like an arrow.”, “flies” is a polysemous word that can mean “fly” (verb) or “fruit fly” (noun); the model will detect the ambiguity of this word based on the context.
[0023] In the sentence "Fruit flies like a banana," "flies" is also a polysemous word, which could mean "fruit fly" (noun) or "fly" (verb). Similarly, the model is able to determine that the word is ambiguous.
[0024] In the English documents containing the above two sentences, by calculating the semantic set S(ωi)=argmaxs∈SP(s|C), it can be determined that there is lexical ambiguity between them.
[0025] (2) Syntactic Ambiguity Detection: The sentence "Time flies like an arrow" has syntactic ambiguity: "flies like an arrow" can be interpreted in two ways: it means "flying away" or "time flies like an arrow." Another interpretation is a metaphor. If we interpret "Time flies" as the flight of time, then "like an arrow" might be understood as a metaphor for time flying like an arrow.
[0026] The syntactic ambiguity of the sentence "Fruit flies like a banana" lies in "like a banana": "Fruit flies like a banana" can be interpreted as "Fruit flies like bananas," where "like" is a verb. Alternatively, "Fruit flies like a banana" can be understood as "Fruit flies like bananas," where "like" is a preposition indicating a metaphor.
[0027] Similarly, calculate the word meaning set S(ω) i ) = argmax s∈S After P(s|C), syntactic ambiguity can be detected.
[0028] 2. Resolution of lexical and syntactic ambiguities:
[0029] (1) Lexical ambiguity: “Time flies like an arrow”: The word “arrow” in the context suggests speed and direction, strengthening the sense that “flies” is the verb “flies” in this sentence. After calculating the result of S(ωi)=argmaxsj∈Scos(νC,νsj), the similarity of “flies” as “flies” + “like” as “like” in this sentence will be greater than the similarity of “flies” as “fruit flies” + “like” as “like” or other combinations.
[0030] "Fruit flies like a banana": In this passage, S(ω) is calculated. i ) = argmax sj∈S cos(ν C ,ν sjBecause of the association with "fruit", the model determines that the probability of "flies" being the noun "fruit fly" + "like" being the verb "to like" is higher than the probability of other combinations such as "flies" as "fleeting" + "like" as "to like". Therefore, "Fruitflies like a banana" is resolved to "Fruit flies like bananas".
[0031] (2) Syntactic Ambiguity Resolution: “Time flies like an arrow”: In this sentence, based on contextual information (e.g., arrow indicates speed and direction, and “flies” is more appropriate for describing an action than a living thing), we resolve the ambiguity using formula T. * =argmax T The optimal syntax tree is selected using P(T|C): The model generates two candidate syntax trees (T1 and T2). Through context modeling, the model calculates the conditional probabilities P(T1|C) and P(T2|C) of the two syntax trees, and finally selects the parsing result T1 with higher probability, namely "time flies like an arrow", as the optimal syntax tree.
[0032] "Fruit flies like a banana": Through syntactic analysis, two candidate syntactic trees (T1 and T2) are generated, where T1 represents the parsing of "Fruit flies like a banana," and T2 represents the parsing of "Fruit flies like a banana." The model uses formula T... * =argmax T P(T|C) calculations revealed that T1 had the highest conditional probability: "Fruit flies" was the subject, belonging to a noun phrase, and "like" was used as a verb, followed by "a banana" as the object. Ultimately, "Fruit flies like bananas" was chosen as the optimal syntax tree.
[0033] In summary, this embodiment resolved lexical and syntactic ambiguities in the literature through the following steps: 1. Lexical ambiguity detection and resolution: The model accurately selected the meaning of the polysemous word "flies" based on contextual information. 2. Syntactic ambiguity detection and resolution: Structural ambiguities in the sentence were resolved using syntactic analysis and contextual modeling.
[0034] In summary, this invention provides an efficient and accurate method for resolving ambiguity. This method combines context modeling, syntactic analysis, and other techniques to address the ambiguity issues encountered by traditional methods when processing Chinese and English documents. Further implementation of this invention will contribute to enhancing ambiguity resolution capabilities in the field of natural language processing.
[0035] The above description is merely a specific embodiment of the present invention, and while the description is detailed, it should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for resolving ambiguities in Chinese and English documents based on a context-adaptive model, characterized in that, Includes the following steps: (1) Detect lexical and syntactic ambiguities in the literature; (2) resolve lexical and syntactic ambiguities.
2. The method according to claim 1, characterized in that, The steps for detecting lexical ambiguity in documents are as follows: Through deep fusion of word vectors and the document's context, ambiguous polysemous words are detected. Specifically, assuming there is a polysemous word ω in the document text... i The context is C={ω1,ω2,...,ω n }, predicting word meaning S(ω) i ) = argmax s∈ SP(s|C); where S is the set of all possible word meanings, and P(s|C) is the word ω given the context C. i The conditional probability of having a certain word meaning s.
3. The method according to claim 2, characterized in that, The steps for resolving lexical ambiguity are as follows: A deep learning-based polysemous word resolution model is used, combining document context and knowledge base information for resolution; specifically, it involves assuming that the polysemous word ω in the document text... i Having multiple meanings s1, s2, ..., s k The word vectors provided by context C are ν C The word vector for each word meaning is ν. sj The selection of word meanings is based on maximizing the similarity between the context and the meanings of each word: S(ω) i ) = argmax sj∈S cos(ν C ,ν sj ); where cos(ν C ,ν sj ) represents the cosine similarity between context C and word meaning sj, where S is the set of all word meanings.
4. The method according to claim 1, characterized in that, The criterion for detecting syntactic ambiguity in the literature is: when the model finds that a sentence can be constructed into multiple different and reasonable syntactic tree structures, it is considered to have syntactic ambiguity.
5. The method according to claim 4, characterized in that, The steps for resolving syntactic ambiguity are as follows: First, a syntactic tree is constructed using a dependency parsing model. Then, the relationship between the syntactic tree and the context is learned through a Transformer model, ultimately resolving the syntactic ambiguity. Specifically, assuming the dependency syntactic tree of a sentence is T = (V, E), where V is the set of nodes (vocabulary) and E is the set of edges (dependencies), the goal of syntactic ambiguity resolution is to find the most suitable syntactic tree structure T*, which best matches the semantics of the context: T * =argmax T P(T|C); where P(T|C) represents the syntax tree T given the context C. * The probability of.
6. The method according to claim 3 or 5, characterized in that, The context C is encoded through the model to obtain the best match between word meaning and syntax.
