Word sense disambiguation method based on quasi-quantum non-homologous representation constraint
Through the method based on quantum-like non-homologous representation constraints, the problem of long-tail word meaning disambiguation task under low resources is solved, and the effective recognition and accurate representation of long-tail word meanings is achieved, which significantly improves the performance of word meaning disambiguation model.
Patent Information
- Application Number
- CN202411892033.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-15
AI Technical Summary
The prior art is difficult to effectively solve the long-tail word meaning disambiguation task under low resources, especially when the number of training samples is insufficient and the word meaning annotation text is limited.
Using a method based on the constraints of a class of quantum non-homologous representation, the traditional and quantum word meaning recognition scores are calculated by obtaining the target word representation and word meaning definition representation, and adding them as the final word meaning disambiguation result, to improve the accuracy of word meaning definition representation and distinguish boundaries.
It significantly improves the accuracy of long-tail word meaning recognition under low resources and can be applied to text representation problems under other low resources, verifying the effectiveness of this method in the long-tail word meaning disambiguation task.
Smart Images

Figure CN119830903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of natural language processing, and in particular to a word sense disambiguation method based on quasi-quantum non-homologous representation constraints. Background Art
[0002] Word sense disambiguation (WSD) aims to determine the most likely meaning of a target word in a list of word senses based on known contextual information. It is a semantic understanding task at the lexical level. Word sense disambiguation is a classic research topic in the field of natural language processing and has a long history of research. Early word sense disambiguation models have been able to effectively identify high-frequency or head word senses. The current focus of word sense disambiguation tasks has shifted to the most difficult low-frequency word senses, namely long-tail word sense disambiguation.
[0003] Data show that the core challenge facing long-tail word sense disambiguation lies in the low-resource characteristics of training samples. Previous work has studied the word representation and text representation learning tasks under small samples in the long-tail word sense disambiguation task from different aspects and achieved good results, but still failed to achieve effective recognition of long-tail word meanings. Inspired by quantum theory, the present invention proposes a representation constraint method based on non-homologous data to implement spatial constraints on representation vectors with the help of multi-source data, improve the accuracy of representation vectors, and thus solve the long-tail word sense disambiguation task under low resources.
[0004] Chinese patent document CN116775890A discloses a "method and device for word sense disambiguation". It includes: based on the RPA knowledge graph, determining the entities to be disambiguated in the text to be disambiguated, and the corresponding candidate entity list; based on each candidate entity in the candidate entity list, and the entity to be disambiguated, through RPA feature extraction, determine the embedding features corresponding to the candidate entity and the embedding features corresponding to the entity to be disambiguated; based on the word sense disambiguation model, the embedding features corresponding to each candidate entity, and the embedding features corresponding to the entity to be disambiguated, determine whether the entity to be disambiguated is the same entity as the candidate entity. The above technical solution is difficult to effectively solve the long-tail word sense disambiguation task under low resources. Summary of the invention
[0005] The present invention mainly solves the technical problem that the original technical solution is difficult to effectively solve the long-tail word sense disambiguation task under low resources. It provides a word sense disambiguation method based on quasi-quantum non-homologous representation constraints, which is based on the quasi-quantum non-homologous representation constraint mechanism to obtain word sense definition representations under low resources, and further implement the word sense disambiguation task. The representation vector obtained with the help of non-homologous data implements constraints in spatial geometric form to reduce the parameter space search range and alleviate the number of training samples used. Finally, the effectiveness of the word sense disambiguation model is verified on the long-tail word sense disambiguation task under low resources.
[0006] The above technical problem of the present invention is mainly solved by the following technical solution: The present invention comprises the following steps: S1. obtaining a target word representation corresponding to a target word in a text to be disambiguated; S2. Obtaining a word meaning definition representation corresponding to the word meaning annotation and a word meaning example representation corresponding to the word meaning example sentence; S3. Calculate the similarity scores between the target word representation and each word meaning representation, i.e., the traditional word meaning recognition score; S4. Calculate the similarity scores between the target word representation and the word meaning representation obtained under each non-cognate representation constraint mechanism, i.e., the quantum word meaning recognition score; S5. Add the traditional word sense recognition score and the quantum word sense recognition score as the final word sense recognition result output by the word sense disambiguation model.
[0007] Preferably, the S1 uses the pre-trained language model BERT as the target word encoder to obtain the word representation of the target word, that is, the target word representation v target .
[0008] Preferably, the word representation of the target word is obtained by: text , the pre-trained language model BERT represents each word in the text as a vector V text , will correspond to the target word w target The vector of is designated as the target word representation v target .
[0009] Preferably, the S2 includes using the pre-trained language model BERT as a word meaning definition encoder to obtain a text representation of the word meaning annotation text, that is, the word meaning definition representation
[0010] Preferably, the acquisition of word meaning definition representation specifically includes: for the input word meaning annotation text The pre-trained language model BERT represents each word in the semantic annotation text as a vector Sum and average the vectors corresponding to all words as the meaning definition representation of the meaning annotation text
[0011] Preferably, the S2 further includes using the pre-trained language model BERT as a word meaning example encoder to obtain a text representation of the word meaning example text, that is, the word meaning example representation
[0012] Preferably, the acquisition of word meaning example representation specifically includes: for the input word meaning example text The pre-trained language model BERT represents each word in the semantic example text as a vector Sum and average the vectors corresponding to all words as the word meaning example representation of the word meaning example text
[0013] Preferably, the S3 specifically includes: representing the target word v target and word meaning definition representation Dot product operation is performed to obtain the similarity score of the kth word sense in the word sense list corresponding to the target word, that is, the traditional word sense recognition score.
[0014] Preferably, the S4 specifically includes: using a square sum normalization function to perform a normalization operation on the target word representation to obtain a word meaning measurement operator, using a square sum normalization function to perform a normalization operation on the word meaning definition representation and the word meaning example representation to obtain the word meaning definition representation and the word meaning example representation in the form of quantum states, and further constructing it into a superposition state of the measured word meaning.
[0015] Preferably, the constructed superposition state and word meaning measurement operator uses a quantum probability calculation method to calculate the similarity score between the target word representation and the word meaning representation obtained under each non-homologous representation constraint mechanism, that is, the quantum word meaning recognition score.
[0016] The beneficial effects of the present invention are: (1) This paper studies the most difficult long-tail word sense disambiguation task. Inspired by the geometric position relationship of the measured superposition state in Hilbert space in quantum mechanics, it proposes a quantum-like non-homologous representation constraint mechanism to obtain word sense definition representation under low resources. Since this scheme can not only obtain accurate word sense definition representation, but also improve the distinction boundary between word sense definition representations, the word sense disambiguation model can effectively identify long-tail word senses.
[0017] (2) Compared with existing technologies, the present invention can significantly improve the accuracy of long-tail word meaning recognition under low resources, and the representation method can be applied to the text representation problems faced by other tasks under low resources.
[0018] (3) In order to accurately evaluate the effectiveness of the quantum-like non-homologous representation constraint mechanism, verification was carried out on the standard word sense disambiguation framework. The experimental results showed that the quantum-like non-homologous representation constraint mechanism can improve the accuracy of word sense annotation text representation; verification was also carried out on the long-tail word sense disambiguation task. The experimental results showed that the quantum-like non-homologous representation constraint mechanism can effectively integrate non-homologous data to improve the accuracy of the representation vector. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a flow chart of the present invention.
[0020] Figure 2It is a word sense disambiguation model diagram constructed based on a quasi-quantum non-homologous representation constraint mechanism of the present invention.
[0021] Figure 3 It is a schematic diagram of the geometric position relationship of a measured superposition state in quantum mechanics in the Hilbert space of the present invention.
[0022] Figure 4 This is a graph of experimental results obtained by a word sense disambiguation model constructed based on a quasi-quantum non-homologous representation constraint mechanism under a cross-language evaluation framework of the present invention. DETAILED DESCRIPTION
[0023] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the technical solutions of the present application are further described in detail below through embodiments and in combination with the accompanying drawings. It should be understood that the specific implementation method described here is only an optimal embodiment of the present application, which is only used to explain the present application and does not limit the protection scope of the present application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0024] The core challenge of long-tail word sense disambiguation lies in the low resource characteristics of training samples. The lack of sufficient training text containing long-tail word senses makes it difficult for the target word representation to learn the feature information of the context to which the long-tail word sense belongs; the limited and fixed word sense annotation text provided in the dictionary makes it difficult for the word sense definition representation to establish an accurate and easily distinguishable positional relationship in the word sense space. In response to the above challenges, researchers have proposed solutions such as data enhancement technology, small sample learning technology, and semantic space constraint technology.
[0025] (1) The main idea of the method based on data augmentation technology is to expand more training samples and supplement more word meaning annotation texts. The schemes for expanding training samples include adding multilingual training corpus and integrating training corpus from other tasks. The word sense disambiguation model with multilingual training corpus is to generalize the model to the multilingual mode, so that the word sense disambiguation model can see more contextual scene feature information of long-tail word meanings, and then learn more accurate target word representation vectors. The word sense disambiguation model integrating multi-task training corpus is to connect the model representation learning process to other tasks, so as to improve the accuracy of the representation vector with the help of training corpus from other tasks. The schemes for supplementing word sense annotation text mainly include adding multilingual word sense annotation text and dual encoder joint training. The word sense disambiguation model with multilingual word sense annotation text is to use the word sense annotation text in multilingual language dictionaries to learn word sense definition representation, so as to obtain more accurate and easy-to-distinguish representation vectors. The dual-encoder jointly trained word sense disambiguation model jointly trains the target word representation encoder and the word sense definition representation encoder so that the word sense definition representation vector learned by the word sense definition representation encoder can be improved with the help of the target word representation encoder with more training texts.
[0026] (2) The main idea of the method based on small sample learning technology is to use small sample learning strategies such as transfer learning and meta-learning to deal with the lack of long-tail word sense training text and the scarcity of word sense annotation text in the long-tail word sense disambiguation task. Transfer learning is to transfer the model knowledge obtained under large-scale training samples to the model of the target task across domains. The pre-trained model can capture the general feature representation of the data, and can be fine-tuned on a new small data set to quickly adapt to specific tasks. Meta-learning aims to give the model the ability to "learn to learn". By designing model initialization parameters that can converge quickly on new tasks, the model can quickly adjust its internal representation under a small number of samples to achieve efficient learning. In the long-tail word sense disambiguation task, methods based on transfer learning and meta-learning have achieved good performance, but the limited and fixed word sense annotation text provided in the dictionary still restricts the scope of application of word sense disambiguation models built based on transfer learning and meta-learning.
[0027] (3) The main idea of the method based on semantic space constraint technology is to constrain the target representation with the help of known word representations or text representations to reduce the space or scope of parameter search and the number of samples required for training the model. In the long-tail word sense disambiguation task, it is difficult to obtain accurate word sense definition representations because the word sense annotation texts provided in the dictionary are limited. However, with the help of semantic space constraint technology, constraints between word sense definition representations can be implemented, and then the spatial position of the word sense definition representations can be determined. In fact, for the word sense disambiguation model, the word sense definition representation does not need to be represented very accurately. What is more needed is to provide clear boundaries between word sense annotations in the semantic space.
[0028] For the word representation and text representation learning tasks under small samples in the long-tail word sense disambiguation task, previous work has studied it from different aspects and achieved good results, but still failed to achieve effective recognition of long-tail word meanings. Inspired by quantum theory, this paper proposes a representation constraint method based on non-homologous data to implement spatial constraints on representation vectors with the help of multi-source data, improve the accuracy of representation vectors, and thus solve the long-tail word sense disambiguation task under low resources.
[0029] Inspired by the geometric position relationship of the measured superposition state in Hilbert space in quantum mechanics, this paper proposes a quasi-quantum non-homologous representation constraint mechanism, and applies it to the long-tail word sense disambiguation task to improve the accuracy of word sense definition representation under low resources and strengthen the distinction boundary between word sense definition representations, thereby achieving accurate long-tail word sense recognition. The word sense disambiguation model constructed based on the quasi-quantum non-homologous representation constraint mechanism is specifically: 1) The target word encoder is used to obtain the corresponding target word representation from the text to be disambiguated in the training sample.
[0030] 2) The word meaning annotation text and word meaning example text from the dictionary use the word meaning definition encoder and word meaning example encoder to obtain their corresponding word meaning definition representation and word meaning example representation respectively. The word meaning definition encoder obtains the text representation of the input text; the word meaning example encoder obtains the text representation of the input text, which is equivalent to obtaining the scene information of the target word. Since the word meaning annotation text is a descriptive text of the target word's meaning annotated by humans, and the word meaning example text can be any text containing the target word extracted from books and materials, and there are also differences in their language expressions, they can be called non-homologous data, and the representations obtained are called non-homologous representations.
[0031] 3) Using the word meaning definition representation and the target word representation, the similarity scores between the target word and each word meaning can be calculated respectively, that is, the traditional word meaning recognition result.
[0032] 4) Based on the word meaning definition representation, word meaning example representation and target word representation, and using the quantum superposition state measurement method, the similarity scores between the target word and the word meaning representations obtained under each non-homologous representation constraint mechanism can be calculated respectively, that is, the quantum word meaning recognition result.
[0033] 5) Finally, the traditional word sense recognition result and the quantum word sense recognition result are added together, which can be used as the final output of the word sense disambiguation model.
[0034] Finally, the effectiveness of the word sense disambiguation model is verified on the long-tail word sense disambiguation task under low resources. Among them, the word sense definition encoder, word sense example encoder and target word encoder can be constructed by a classic neural network model, or can be implemented by the current mainstream pre-trained language model or large model, but the selection of different types of representation learning methods in the specific implementation process does not limit the applicability of the present invention.
[0035] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the operations (or steps) as sequential processes, many of the operations (or steps) therein can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the drawings; the process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0036] The technical solution of the present invention is further specifically described below through embodiments and in conjunction with the accompanying drawings.
[0037] Embodiment: A word sense disambiguation method based on quantum-like non-homologous representation constraints in this embodiment, such as Figure 1 As shown, the following steps are included: (1) Use the pre-trained language model BERT as the target word encoder to obtain the word representation of the target word, that is, the target word representation: For the input text to be disambiguated W text , W text =[w1,w2,…,w i ,…] (1) where w i is the word in the text to be disambiguated (the superscript text is omitted for clarity), and the pre-trained language model BERT represents each word in the text as a vector V text , V text =[v1,v2,…,v i ,…] (2) where v i is the word vector of the vocabulary in the text to be disambiguated (the superscript text is omitted for clarity); corresponding to the target word w target The vector of will be designated as the target word representation v target .
[0038] (2) Use the pre-trained language model BERT as the word definition encoder to obtain the text representation of the word meaning annotation text, that is, the word meaning definition representation: For the input word meaning annotation text where w i is the vocabulary in the semantic annotation text (superscript glosses are omitted for clarity), the subscript k refers to the kth word in the list of senses corresponding to the target word, and the pre-trained language model BERT represents each word in the semantic annotation text as a vector where v i is the word vector of the vocabulary in the semantic annotation text (the superscript gloeese is omitted for clarity); the vectors corresponding to all words are summed up and averaged to represent the semantic definition of the semantic annotation text
[0039] (3) Use the pre-trained language model BERT as the word meaning example encoder to obtain the text representation of the word meaning example text, that is, the word meaning example representation: For the input word meaning example text where w i is the vocabulary in the example text of the word meaning (the superscript examples is omitted for clarity), the subscript k refers to the example text corresponding to the word meaning k, and the pre-trained language model BERT represents each vocabulary in the example text of the word meaning as a vector where v i is the word vector of the vocabulary in the semantic example text (the superscript examples is omitted for clarity); the vectors corresponding to all vocabulary are summed and averaged to be the semantic example representation of the semantic example text
[0040] (4) Calculate the similarity score between the target word representation and the word meaning definition representation, that is, obtain the traditional word meaning recognition score, where the similarity calculation method can be a measurement method such as Euclidean distance: target and word meaning definition representation Perform a dot product operation, The operator ⊙ represents the dot product operation, then is the similarity score of the kth word sense in the word sense list corresponding to the target word, that is, the traditional word sense recognition score.
[0041] (5) The target word representation is normalized using the square sum normalization function to obtain the word meaning measurement operator: The quantum state form of the target word representation is obtained by the square sum normalization function SSN(·) |ψ target >, Where i refers to v target Each component of the vector; then construct the meaning measurement operator from this quantum state where <ψ target |Yes|ψ target > is the conjugate transpose of (6) The word meaning definition representation and the word meaning example representation are normalized by using the square sum normalization function to obtain the word meaning definition representation and the word meaning example representation quantum state form, and further construct it into a superposition state of the measured word meaning: The word meaning definition representation is obtained by the square sum normalization function SSN(·) and word meaning example representation The quantum state form of Then the measured superposition state is constructed from the quantum state. in And ε k You can specify a specific value, such as 1 / 2, based on the scenario in which the word sense disambiguation model is used. (7) Based on the constructed superposition state and word meaning measurement operator, the quantum probability calculation method is used to calculate the similarity score between the target word representation and the word meaning representation obtained under each non-homologous representation constraint mechanism, that is, the quantum word meaning recognition score: The quantum word meaning recognition score can be obtained by the measurement formula p(·) of the quantum superposition state, in‖·‖ 2 It is the square operation of absolute value.
[0042] (8) Add the traditional word sense recognition score and the quantum word sense recognition score to obtain the word sense recognition result output by the word sense disambiguation model: and quantum word sense recognition score The final word meaning recognition result can be obtained. in The weight coefficient of each item can be specified according to the scenario in which the word sense disambiguation model is used, such as 1 / 2.
[0043] The word sense disambiguation model uses the cross entropy loss function, and the loss function is: The parameter Score of the loss function is: The index index represents the index variable k of all the meanings of the target word.
[0044] The word sense disambiguation model based on the quantum-like non-homologous representation constraint mechanism is shown in the "Attachment to the Specification" Figure 2 As shown in , the model uses the pre-trained language model BERT as the target word encoder, word meaning definition encoder and word meaning example encoder to obtain the target word representation, word meaning definition representation and word meaning example representation respectively, and uses the dot product operation to obtain the traditional word meaning recognition score, and uses the quantum superposition state measurement method to obtain the quantum word meaning recognition score. See the quasi-quantum non-homologous representation constraint mechanism for details. Figure 3 , Figure 3 Schematic diagram of the geometric position relationship of the measured superposition state in Hilbert space in quantum mechanics. This principle is used to construct a quantum-like non-homologous representation constraint mechanism.
[0045] During the model training process, the mainstream learning rate adaptive optimization algorithm Adam is used as the optimizer.
[0046] In order to verify the text representation capability and effectiveness of the word sense disambiguation model based on the quasi-quantum non-homologous representation constraint mechanism proposed in the present invention, experiments were carried out under the standard word sense disambiguation evaluation framework and the latest cross-language evaluation framework. The specific steps are as follows: Dataset: The word sense disambiguation model based on the quantum-like non-homologous representation constraint mechanism uses the word sense disambiguation evaluation framework proposed by Navigli et al. to implement standard evaluation experiments, and constructs data enhancement evaluation experiments by adding the training set WNGT. Its training set is SemCor, the development set is SemEval-07, the test set is Senseval-2 (SE2), Senseval-3 (SE3), SemEval-13 (SE13), SemEval-15 (SE15) and the integrated set of all test sets ALL. The word sense candidate list includes all word sense annotations in WordNet3.0. For cases with multiple word sense examples, the first one is selected by default; for cases without word sense examples, the training text is used instead. The evaluation indicators and other unlisted information are subject to the settings of the evaluation framework.
[0047] Compare systems: The comparison models under the standard evaluation experiment selected related work in the past four years as control models, including EWISE and LMMS in 2019, SREF, ARES, BEM, EWISER and SyntagRank in 2020, COF and ESR in 2021, and Z-Reweighting in 2022. In addition, QWSD and DRWSD, which are also based on quantum theory, were also selected.
[0048] The comparison models under the data enhancement evaluation experiment include SparseLMMS, EWISER and ESR.
[0049] The experimental results of the above systems are all taken from the data published in the original paper.
[0050] Experimental results and analysis: The results of the standard and data enhancement evaluation experiments are shown in Table 1. From the overall performance point of view, the word sense disambiguation model QiWSD based on the quasi-quantum non-homologous representation constraint mechanism outperforms the comparison model in the standard evaluation experiment; QiWSD partially outperforms the comparison model in the data enhancement evaluation experiment. The reason for this phenomenon is that the training samples of long-tail word senses are scarce under the standard experimental setting, while a certain number of long-tail word sense training samples are provided under the data enhancement experimental setting. It can be understood that improving the weak position of long-tail word senses by increasing the amount of data is directly effective in improving the recognition accuracy of long-tail word senses. Judging from the gap in the experimental results, QiWSD does not have much gap with the comparison model. The reason is that the number of long-tail word senses is relatively small, and it is difficult to have a significant gap.
[0051] From the perspective of detailed performance, the experimental results on the development set are suboptimal, and the experimental results on the test set ALL are optimal, indicating that QiWSD does not overfit the training data and has good generalization ability. The poor performance on the test sets Adj. and Adv. is because there are relatively few long-tail meanings in adjectives and adverbs, so QiWSD, which has the ability to recognize long-tail meanings, cannot give full play to its advantages.
[0052] It should be emphasized that compared with the quantum-inspired models QWSD and DRWSD, QiWSD outperforms the comparative models in all indicators, indicating that it has certain competitiveness.
[0053] Table 1: Experimental results under the standard word sense disambiguation evaluation framework Model ablation analysis: Dataset: We use the datasets set by the standard evaluation experiment and the constructed long-tail word sense dataset for ablation research. We extract the long-tail word senses from the training set, development set, and test set of the standard evaluation experiment and construct the corresponding long-tail word sense dataset. The word senses with less than three samples are called long-tail word sense training sample data.
[0054] Model setup: Based on the original QiWSD, the model with the quantum identification method removed is called QiWSD - base ; The model that retains the quantum recognition method component is called QiWSD + base, which is the original model. Other information not listed is the same as the above model settings.
[0055] Result Analysis: The experimental results are shown in Table 2. The analysis is as follows: On the original dataset, QiWSD - base The results are significantly lower than QiWSD + base , indicating that the quantum recognition method has high value and is very helpful for improving the overall performance of the word sense disambiguation model. The reason for the 3-4 percentage point difference in the experimental results is that the proportion of long-tail word senses is relatively small. - base The results are also significantly lower than QiWSD + base , indicating that the quantum recognition method is effective in long-tail word meaning recognition. The difference of about 15 percentage points between the experimental results also confirms this.
[0056] Table 2: Experimental results under model ablation analysis Cross-language experimental results and analysis: The generalization ability of QiWSD in other languages was verified on the latest cross-language dataset proposed by Pasini et al., and its performance in niche languages can also reflect the value of quantum-like models from the side. The experimental models are QiWSD proposed in the ablation experiment + base and QiWSD - base The comparison model XLMR-Base is the model used in the original paper.
[0057] The encoder of the model is implemented using the bert-base-multilingual-cased version of the BERT model. Note that since the cross-lingual dataset is built based on the BabelNet database, the annotations and examples in the experiment are all selected from the BabelNet database.
[0058] The experimental results are as follows Figure 4 From the overall performance point of view, QiWSD + base To some extent, it is better than XLMR-Base, while QiWSD + base Better than QiWSD - base , which shows that QiWSD has certain generalization ability.
[0059] The specific embodiments described herein are merely examples of the spirit of the present invention. The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that a technician in the technical field to which the present application belongs may make various modifications or supplements to the described specific embodiments or replace them in a similar manner, but will not deviate from the spirit of the present application or exceed the scope defined in the attached claims. For a person of ordinary skill in the art, multiple variations and improvements may also be made without departing from the concept of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A word sense disambiguation method based on quantum-like non-homologous representation constraints, characterized in that: include: S1. Obtain the target word representation corresponding to the target word in the text to be disambiguated; S2. Obtaining a word meaning definition representation corresponding to the word meaning annotation and a word meaning example representation corresponding to the word meaning example sentence; S3. Calculate the similarity scores between the target word representation and each word meaning representation, i.e., the traditional word meaning recognition score; S4. Calculate the similarity scores between the target word representation and the word meaning representation obtained under each non-cognate representation constraint mechanism, i.e., the quantum word meaning recognition score; S5. Add the traditional word sense recognition score and the quantum word sense recognition score as the final word sense recognition result output by the word sense disambiguation model.
2. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1, characterized in that: S1 uses the pre-trained language model BERT as the target word encoder to obtain the word representation of the target word, that is, the target word representation v target .
3. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1 or 2, characterized in that: The step of obtaining the word representation of the target word specifically includes: for the input text to be disambiguated W text , the pre-trained language model BERT represents each word in the text as a vector V text , will correspond to the target word w target The vector of is designated as the target word representation v target .
4. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1, characterized in that: S2 includes using the pre-trained language model BERT as a word meaning definition encoder to obtain a text representation of the word meaning annotation text, that is, a word meaning definition representation 5. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1 or 4, characterized in that: The method of obtaining the word meaning definition representation specifically includes: for the input word meaning annotation text The pre-trained language model BERT represents each word in the semantic annotation text as a vector Sum and average the vectors corresponding to all words as the meaning definition representation of the meaning annotation text 6. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1, characterized in that: S2 also includes using the pre-trained language model BERT as a word meaning example encoder to obtain a text representation of the word meaning example text, that is, the word meaning example representation 7. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1 or 6, characterized in that: The method of obtaining the word meaning example representation specifically includes: for the input word meaning example text The pre-trained language model BERT represents each word in the semantic example text as a vector Sum and average the vectors corresponding to all words as the word meaning example representation of the word meaning example text 8. The word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1, characterized in that: The S3 specifically includes: representing the target word v target and word meaning definition representation Dot product operation is performed to obtain the similarity score of the kth word sense in the word sense list corresponding to the target word, that is, the traditional word sense recognition score.
9. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 1, 2, 4 or 6, characterized in that: The S4 specifically includes: using a square sum normalization function to perform a normalization operation on the target word representation to obtain a word meaning measurement operator, using a square sum normalization function to perform a normalization operation on the word meaning definition representation and the word meaning example representation to obtain the form of quantum states of the word meaning definition representation and the word meaning example representation, and further constructing it into a superposition state of the measured word meaning.
10. A word sense disambiguation method based on quasi-quantum non-homologous representation constraints according to claim 9, characterized in that: Based on the constructed superposition state and word meaning measurement operator, the quantum probability calculation method is used to calculate the similarity score between the target word representation and the word meaning representation obtained under each non-homologous representation constraint mechanism, namely the quantum word meaning recognition score.
Citation Information
Patent Citations
Word sense disambiguation method and device
CN116775890A