A word unit consistency framework recommendation method for framework semantic knowledge base construction
By jointly learning a model using pre-trained and graph neural networks, and combining syntactic structure information, the response speed and robustness issues of the frame recommendation algorithm in knowledge base construction are solved. This achieves fast and efficient lexical consistency frame recommendation, improving the coverage of the knowledge base and its adaptability to application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANXI UNIV
- Filing Date
- 2022-11-15
- Publication Date
- 2026-04-14
AI Technical Summary
Existing framework recommendation algorithms have high response speed requirements and high hardware requirements during knowledge base construction. Furthermore, the framework feature representation is not robust enough, the application scenarios are limited, and it is difficult to meet the needs of fast and high-concurrency operation.
A joint learning model combining pre-trained and graph neural networks is adopted, which combines syntactic structure information and achieves lexical consistency framework recommendation through frame recognition and recommendation process. This includes structural information extraction, encoding, semantic structure relation representation and label prediction, which are split into offline and real-time calculations to improve efficiency.
It provides more robust lexical representations in different contexts, improves the coverage of frames and lexical units in the knowledge base, adapts to multiple application scenarios, reduces computation time, and improves the usability of the platform.
Smart Images

Figure CN115688803B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural language processing, specifically relating to a lexical consistency framework recommendation method for constructing a framework semantic knowledge base. Background Technology
[0002] Semantic analysis techniques are fundamental to semantic understanding, and frame semantic analysis based on case grammar performs semantic analysis and understanding from the perspective of frames. A key factor influencing frame semantic analysis is the coverage of frames and lexical units; improving the coverage of frames and lexical units can enhance the ability of frame semantics to analyze text.
[0003] The frame recommendation aims to recommend the top-K frames for registered lexical units (lexical units already existing in the knowledge base) or unregistered lexical units (lexical units to be expanded into the knowledge base), to facilitate the determination of the context to which the current lexical unit belongs and to identify the phenomenon of a word having multiple frames. The recommendation process is as follows:
[0004] F k =rank(similar(x,[S1,S2,...,S n ],[F t 1 ,F t 2 ,...,F t m ]),k)
[0005] Where x represents the target word for which the recommendation framework is needed, and S i F represents example sentences containing the target word. t i Let represent the i-th frame feature, k be the number of recommendations needed, similar(·) be the similarity calculation function, and rank(·) be the ranking function.
[0006] Finding suitable frames for lexical units typically involves two tasks: frame identification and frame disambiguation.
[0007] The study of frame identification was first proposed by FrameNet, especially the corresponding evaluation task proposed by Baker et al. in SemEval in 2007. Early frame identification (FI) tasks mainly used traditional machine learning algorithms. Johansson and Nugues used an SVM classifier to extract text features through feature engineering for frame identification. Das et al. used a conditional model that shared weights among all target words, frames, and prototypes. They designed classification models using manually designed features and traditional machine learning methods, using frame names as supervision information.
[0008] In recent years, distributed feature representations and neural network-based models have been widely applied to frame recognition. Based on this, recent work has shown two trends. The first trend is joint learning methods, which transform discrete frame labels into continuous embeddings by simultaneously learning target words and frame embeddings. For example, Hermann et al. proposed the WSABIE algorithm, which maps possible frame labels and the syntactic relations of target words in context to the same feature space. Subsequently, Hartmann et al. proposed SimpleFrameId, which uses the average of all word vectors in a sentence as the context representation, performing the same operation as the WSABIE algorithm. The second trend is using deep neural models to build classification models. Similar to earlier work, this model uses discrete frame labels as supervisory information. Zhao Hongyan et al. used DNNs to model the context of example sentences, using the dependency relations of target words as feature inputs to learn more abstract target word context features. Zhang Liwen et al. used a bidirectional GRU deep model to collect context information from the beginning to the end of the sentence and from the end to the beginning, respectively, using Word2Vec as the initial word vector input and adding an attention mechanism to filter information. Swayamdipta et al. used bidirectional LSTM to construct a classifier.
[0009] Recently, Botschen et al. used a multimodal algorithm model that fused image and text to improve the performance of frame recognition. Peng et al. used a model that jointly learned FI and frame semantic role labeling tasks, adopting a multi-task model structure and proposing a formula for learning semantic parsing from multiple datasets. Unlike the previous two, Jiang et al. did not rely on syntactic features but instead concatenated sentences, lexical definitions, and frame definitions together for joint modeling, achieving good results. Su et al. proposed a knowledge-guided frame recognition algorithm that uses a GCN network to learn a unified representation of frame definitions, frame elements, and relationships between frames, and concatenates the representations of the context. This model achieved state-of-the-art performance on the FI task.
[0010] Frame disambiguation is a task that seeks to find frames that match the current context for a target word in a scenario where the word can activate multiple frames. In 2011, Liu Haijing et al. selected 332 ambiguous Chinese words and built a frame disambiguation model using SVM. In 2013, Zhang Lifan et al. utilized the semantic resources of frame networks and leveraged the semantic features of lexical units, comparing the maximum entropy model and the SVM model, demonstrating that the maximum entropy model is more suitable for frame disambiguation. In 2015, Dang Shuaibing et al. improved the performance of frame disambiguation using word distribution representation. In 2020, Hou Yunyao et al. achieved a 72.52% performance on 88 ambiguous lexical units using neural networks and the WSABIE algorithm.
[0011] While the above work has achieved good results, it still has the following three problems: 1) In practical applications, recommendation algorithms require high response speeds, while traditional recognition and disambiguation processes require loading models and using GPUs for inference, which requires significant time and hardware resources. 2) The features of a framework are obtained by fusing the representations of all example sentences containing all lexical units within that framework through the model, while the above two tasks only obtain representations of lexical units. 3) The application scenarios for the above two tasks are relatively limited.
[0012] Framework recommendation is widely applicable in the knowledge base construction process, with the following three main application scenarios: ① providing some reference for experts when creating frameworks; ② selecting appropriate frameworks for unregistered terms; ③ recommending and ranking frameworks that can be triggered by target words during manual annotation, saving time and effort for manual judgment.
[0013] Based on the problems and shortcomings of existing technologies, and considering the application scenarios that frame recommendation needs to address in knowledge base construction, this paper designs and provides a lexical consistency-based frame recommendation method for frame creation, lexical expansion, and frame semantic dataset construction. From the perspective of frame recommendation, this Chinese frame recommendation method integrates syntactic structure information, providing relevant auxiliary analysis tools to improve the coverage of frames and lexical units in the knowledge base, and offering a more robust representation technique for the same lexical unit in different contexts. Furthermore, it balances research and practicality, and from an engineering perspective, can be integrated into existing frame semantic annotation platforms to improve platform usability and accelerate knowledge base construction. In conclusion, this invention has a significant positive impact on frame semantic analysis in the field of natural language processing and possesses promising application prospects. Summary of the Invention
[0014] To address the aforementioned issues, this invention provides a lexical consistency-based frame recommendation method for constructing a frame semantic knowledge base. From the perspective of frame recommendation, it studies a Chinese frame recommendation method that integrates syntactic structure information, providing technical support for improving the coverage of frames and lexical units in the knowledge base.
[0015] To achieve the above objectives, the present invention employs the following technical solutions:
[0016] A lexical consistency framework recommendation method for constructing a framework semantic knowledge base includes the following steps:
[0017] Step 1, Frame Recognition: Construct a pre-trained and graph neural network joint learning model to obtain lexical representation information that integrates semantic and dependency information. The model structure includes: 1) Structural Information Extraction Layer: Extracting PropBank roles or dependency structure information of the sequence in which the target word is located; 2) Encoding Layer: Encoding the context sequence using BERT; 3) Semantic Structure Relationship Representation Layer: Extracting the corresponding semantic representation based on the structural information and using GCN to model the target word and the semantic representation; 4) Label Prediction Layer: Concatenating the structural information learned by GCN and the representation of the target word and classifying them using a classifier; Through the supervised labels of the frames to which the lexical belongs, the lexical representations under the same frame tend to be consistent under the constraints of the supervised information, further obtaining more robust features;
[0018] Step 2, Frame Recommendation: This includes offline frame feature calculation and real-time frame feature calculation. The offline frame feature calculation extracts the features of word elements containing context information based on the word elements under the frame and the example sentences to which the word elements belong through the encoder. The features of all word elements under the same frame are averaged and pooled to become the features of the current frame. By extracting information already available in the knowledge base, each frame is pre-represented and the frame features are stored in a local file. When making recommendations, the offline-calculated frame features are directly read, avoiding a lot of repetitive calculations.
[0019] The real-time frame feature calculation involves extracting features from lexical units and their contexts using an encoder, then calculating and ranking these features against those obtained from offline frame feature calculation to identify the top-k similar frames for frame recommendation in different scenarios. For multiple application scenarios, real-time feature extraction is performed on lexical units requiring frame recommendations, and similarity calculations are performed with all offline frame features. Frame creation requires commonality mining based on recommended frames to extract attributes that fit the new frame. Lexical unit expansion requires manual secondary screening of target frames. The data annotation stage combines knowledge base and recommendation results for filtering and relevance ranking, providing reference frames for annotators.
[0020] Furthermore, the structural information extraction layer in step 1 specifically comprises:
[0021] Using semantic blocks directly associated with the target word as structural information, a structural graph representing the semantic structure is constructed, and its adjacency matrix is represented as follows:
[0022] A = (a ij ) s×s ,
[0023] Where s is the number of semantics associated with the target word plus one, a ij The definition is as follows:
[0024]
[0025] Among them, w i w is the i-th word in the sentence. j It is the j-th word in the sentence;
[0026] The start and end position information of each semantic block are represented as p. i and l i The positional information corresponding to the contextual structure of the target word is represented as P = {[p1, l1], ..., [p...]}. i , l i ],...,[p s , l s ]}, and pass it to the encoding layer.
[0027] Furthermore, the coding layer in step 1 specifically comprises:
[0028] Using BERT as the encoding layer, the semantic information of the context is incorporated into the representation of the target word. The encoding layer is represented as E. s The target word is denoted as t, its context is denoted as s, the start position information of the target word is denoted as st, the end position information is denoted as en, and the last level of BERT is denoted as H. t For the target word r t The encoding is represented as:
[0029] r t =E s (s,t,st,en)=W s T H t +b s
[0030] Combining the position P of the structural information obtained from the structural information extraction layer, the i-th structural information associated with the target word express:
[0031]
[0032] in, H is a learnable parameter. t Represented as: Represented as: P i [0] and P i [1] represents the start and end positions of the semantic block in the i-th structural information, respectively;
[0033] For multiple tokens, the hidden layer H t and Perform a weighted average operation to obtain the representation of the entire word.
[0034] Furthermore, the semantic structure relation representation layer in step 1 specifically comprises:
[0035] Semantic structure relation extraction is performed using GCN. A two-layer GCN network is constructed, and the two layers are connected via a ReLU function. The network structure of the semantic structure relation representation layer is as follows:
[0036] R1 = GCN(ReLu(GCN(A,M)))[k]
[0037] Where M is r t and The concatenated matrix, k is r t At the position in the matrix, A and M are input into the first layer GCN, the output is activated by the ReLU function, and finally the output is input into the second layer GCN, and the representation of the k-th position is taken as the final feature representation R1.
[0038] Furthermore, the label prediction layer in step 1 specifically comprises:
[0039] The target word representation r obtained from the encoding layer t The structural information representation R1 obtained from the semantic structure relation layer is concatenated, and then linear transformation and nonlinear activation are performed to obtain the probability p of each frame to which the current representation belongs. t , is represented as:
[0040] p t =Softmax(L(concat(r) t ,L(R1))))
[0041] Where L represents the linear transformation layer, and the position with the highest probability is taken as the current predicted result category, expressed as:
[0042]
[0043] Different adjacency matrices A are constructed for target words with different parts of speech. Multiple frame recognition models are trained on the overall dataset using structural information for each part of speech. These models are then fused through hard voting to obtain the final frame recognition model. The entire voting process is represented as follows:
[0044]
[0045] in, These are the predicted labels for each model, and Vote is the voting function.
[0046] Furthermore, the different scenarios in step 2 mainly include framework creation, lexical expansion, and data annotation, as detailed below:
[0047] In the frame creation process, the input word units that need to be included in the new frame and the context in which the word units are located are input. The encoder performs feature extraction and sorts the extracted word unit features with the frame features calculated offline. The top-k frames with the highest similarity to the input content in terms of frame relationships and frame elements are returned and used as a reference for frame creation. After manual judgment, frame relationships and frame elements that conform to the specified word units and context are formed.
[0048] In the word augmentation process, the word to be augmented and its context are input. The encoder extracts features by performing matrix operations on multiple word elements and example sentences at once. The extracted word features are ranked by similarity with the frame features calculated offline. The top-k existing frames with the highest semantic similarity to the word to be augmented are returned as candidate frames for word augmentation. After a second manual screening, the input word elements and example sentences are augmented into the target frame.
[0049] In the data annotation process, a sentence to be annotated and its target words are input. The encoder extracts features from the sentences and calculates similarity between the features and the frame features obtained from offline frame feature calculation. The top-k recommended frames are then obtained. The difference between the recommended frames and the frames that are actually activated in the knowledge base is calculated to obtain a set of recommended but not yet activated frames. These frames are then sorted according to their relevance to the target words and returned to the data annotation staff as the frame recommendation results.
[0050] Based on the above description, this technical solution mainly addresses two technical challenges:
[0051] First, to address the representation issues of different word units within the same frame and the same word unit in different frames, the frame recognition task is used to optimize the representation of target words by aiming for word units within the same frame to be closest in the same vector space and word units in different frames to be furthest in the vector space.
[0052] Second, to meet the needs of fast and high-concurrency recommendations, and in combination with different application scenarios, the recommendation process is split into two parts: offline computation of existing framework features and real-time, parallel computation of the recommended framework features.
[0053] Compared with the prior art, the present invention has the following advantages:
[0054] This provides a more robust representation technique for the same lexical units across different contexts. Furthermore, it balances research and practicality, and from an engineering perspective, can be integrated into existing framework semantic annotation platforms to improve platform usability and accelerate knowledge base construction. Attached Figure Description
[0055] Figure 1 Identify the model diagram for the framework;
[0056] Figure 2 Recommend a flowchart for the framework;
[0057] Figure 3 The distribution of the lexical representations obtained using the original BERT model in the plane;
[0058] Figure 4 The distribution of the lexical representation results obtained using this method in the plane. Detailed Implementation
[0059] Example 1
[0060] A lexical consistency framework recommendation method for constructing a framework semantic knowledge base includes the following steps:
[0061] Step 1, Frame Recognition: Construct a joint learning model of prediction training and Graph Neural Network (GCN). The model structure includes: 1) Structural Information Extraction Layer: Extracting PropBank role or dependency structure information of the sequence containing the target word; 2) Encoding Layer: Encoding the context sequence using BERT; 3) Semantic Structure Relationship Representation Layer: Extracting the corresponding semantic representation based on the structural information and using GCN to model the target word and the semantic representation; 4) Label Prediction Layer: Concatenating the structural information learned by GCN and the representation of the target word and classifying them using a classifier. In addition, in Step 1, structural information features of different parts of speech are considered in a fine-grained manner, and multi-model label fusion is used to obtain the final prediction result for the frame recognition task.
[0062] 1) The structural information extraction layer specifically consists of:
[0063] Using semantic blocks directly associated with the target word as structural information, a structural graph representing the semantic structure is constructed, and its adjacency matrix is represented as follows:
[0064] A = (a ij ) s×s ,
[0065] Where s is the number of semantics associated with the target word plus one, a ij The definition is as follows:
[0066]
[0067] Among them, w i w is the i-th word in the sentence. j It is the j-th word in the sentence;
[0068] The start and end position information of each semantic block are represented as p. i and li The positional information corresponding to the contextual structure of the target word is represented as P = {[p1, l1], ..., [p...]}. i , l i ],…,[p s , l s ]}, and pass it to the encoding layer.
[0069] 2) The coding layer specifically consists of:
[0070] Using BERT as the encoding layer, the semantic information of the context is incorporated into the representation of the target word. The encoding layer is represented as E. s The target word is denoted as t, its context is denoted as s, the start position information of the target word is denoted as st, the end position information is denoted as en, and the last level of BERT is denoted as H. t For the target word r t The encoding is represented as:
[0071] r t =E s (s,t,st,en)=W s T H t +b s
[0072] Combining the position P of the structural information obtained from the structural information extraction layer, the i-th structural information associated with the target word express:
[0073]
[0074] in, H is a learnable parameter. t Represented as: Represented as: P i [0] and P i [1] represents the start and end positions of the semantic block in the i-th structural information, respectively;
[0075] The target words and dependency information can be composed of multiple tokens, thus requiring a hidden layer H corresponding to multiple tokens. t and Perform a weighted average operation (avg) to obtain the representation of the entire word.
[0076] 3) The semantic structure relation representation layer is specifically as follows:
[0077] Semantic structure relation extraction is performed using GCN. A two-layer GCN network is constructed, and the two layers are connected via a ReLU function. The network structure of the semantic structure relation representation layer is as follows:
[0078] R1 = GCN(ReLu(GCN(A,M)))[k]
[0079] Where M is r t and The concatenated matrix, k is r t At the position in the matrix, A and M are input into the first layer GCN, the output is activated by the ReLU function, and finally the output is input into the second layer GCN, and the representation of the k-th position is taken as the final feature representation R1.
[0080] 4) The label prediction layer specifically consists of:
[0081] The target word representation r obtained from the encoding layer t The structural information representation R1 obtained from the semantic structure relation layer is concatenated, and then linear transformation and nonlinear activation are performed to obtain the probability p of each frame to which the current representation belongs. t , is represented as:
[0082] p t =Softmax(L(concat(r) t ,L(R1))))
[0083] Where L represents the linear transformation layer, and the position with the highest probability is taken as the current predicted result category, expressed as:
[0084]
[0085] To address the differences in target word structural information, different adjacency matrices A are constructed for target words of different parts of speech. Multiple frame recognition models are trained on the overall dataset for each part of speech's structural information. These models are then fused using a hard voting method to obtain the final frame recognition model. The entire voting process is represented as follows:
[0086]
[0087] in, These are the predicted labels for each model, and Vote is the voting function.
[0088] Step 2, Frame Recommendation: This includes offline and real-time frame feature computation, which together complete the frame recommendation task. The recommendation flowchart is shown below. Figure 2 As shown.
[0089] The offline frame feature calculation mainly involves an offline algorithm for calculating the features of existing frames. It processes all frames sequentially and calculates their features. The input consists of all existing frames, their constituent words, and example sentences. Based on the words within a frame and the example sentences to which they belong, an encoder extracts word features containing contextual information. The features of all words within the same frame are then averaged and pooled to obtain the features of the current frame. By extracting information from the knowledge base, each frame is pre-represented, and its features are stored in a local file. The output consists of the features of all existing frames.
[0090] The specific calculation process is shown in Process 1:
[0091] Process 1:
[0092]
[0093] The inputs to process 1 are E and F, where E is the encoder used to obtain the target word representation by fusing PropBank role information and contextual information, and F is a set containing all frame names, lexical units, and example sentence information. The output is R, which contains the names and feature vectors of all frames. The entire process is described as follows: First, an empty set R is defined to store frame features. Then, the frame names f and their lexical units s′ in set F are traversed. Then, F is defined... e This is used to store the features of all lexical units within a single frame. Iterating through s′, we obtain each lexical unit and its name s, along with the context set C′ containing that lexical unit. A set l is defined to store the lexical unit features. e The algorithm iterates through C′ to obtain each context C containing s, and calculates the start and end positions st and en of s in C using s and C. Then, the encoder E calculates the representation s of the target word based on the context s, C, st, and en. e And add this representation to set l e In this process, after this iteration, all contextual representations of a word in the frame are obtained. These representations are then averaged and pooled to become the representation of the current word, and then incorporated into the frame feature set F. e In the middle. And F e At the end of the loop, the representations of all terms are included. Finally, the result of mean pooling of this set is used as the feature of the current frame and incorporated into the final set R.
[0094] The real-time frame feature calculation mainly involves a feature computation tool for real-time calculation of example sentences and target words in practical application scenarios. After extracting features from words and their contexts through an encoder, the features are compared with the frame features obtained from offline frame feature calculation, and then ranked to obtain the top-k similar frames for frame recommendation in different scenarios.
[0095] The different scenarios involved mainly include framework creation, lexical expansion, and data annotation, as detailed below:
[0096] In the frame creation process, the input word units that need to be included in the new frame and the context in which the word units are located are input. The encoder performs feature extraction and sorts the extracted word unit features with the frame features calculated offline. The top-k frames with the highest similarity to the input content in terms of frame relationships and frame elements are returned and used as a reference for frame creation. After manual judgment, frame relationships and frame elements that conform to the specified word units and context are formed.
[0097] In the lexical expansion process, the input lexical units used for expansion and the context in which the lexical units are located are input. The encoder performs feature extraction. In this scenario, the input scale is usually large. Therefore, a matrix operation method is adopted to extract features from multiple lexical units and example sentences at one time. The extracted lexical unit features are ranked with the frame features calculated by offline frame features. The top-k existing frames with the highest semantic similarity to the lexical unit to be filled are returned and used as candidate frames for lexical expansion. After a second manual screening, the input lexical units and example sentences are expanded into the target frame.
[0098] In the data annotation process, a sentence to be annotated and its target words are input. The encoder extracts features from the sentences and calculates similarity between the features and the frame features obtained from offline frame feature calculation. The top-k recommended frames are then obtained. The difference between the recommended frames and the frames that are actually activated in the knowledge base is calculated to obtain a set of recommended but not yet activated frames. These frames are then sorted according to their relevance to the target words and returned to the data annotation staff as the frame recommendation results.
[0099] The specific calculation process is shown in process 2.
[0100] Process 2
[0101]
[0102] The inputs to process 2 are E, R, s, C′, and k, where E is the encoder, R is the set storing all frame features, s is the vocabulary of the frame to be recommended, C′ is the context set containing s, and k is a parameter controlling the number of recommendations. The output is F′, which contains a set of k recommended frames. The entire process is described as follows: Define two empty sets F′ and l e This is used to store the final recommendation results and the features of the current word. It obtains C containing s by traversing C′, and calculates the representation s of s containing context features using E. e And merged into l e In the loop, after the loop ends, the set of representations of all current context information is obtained.e After pooling, the final representation of s is obtained. ea Finally, similarity scores are calculated based on all frame features, and the frames are sorted to obtain the top-k similar frame set F′.
[0103] The frame recognition model was compared with previous methods on both the English FrameNet 1.7 and Chinese Frame Semantics (CFN) datasets, demonstrating its effectiveness. The experimental results are shown in Tables 1 and 2 below:
[0104] Table 1. Experimental Results of FN1.7
[0105]
[0106] Table 2 Experimental results of the CFN dataset
[0107]
[0108] The comparison of the recommendation acceleration effects using matrix operations is shown in Table 3 below:
[0109] Table 3 compares the recommended acceleration effects.
[0110]
[0111] Experimental results on the effectiveness of frame recognition on two datasets, combined with a comparison of recommendation speeds within one second for two different input methods, demonstrate that the proposed method performs well in both effectiveness and speed of frame recognition.
[0112] In offline frame feature calculation, the dataset involves 623 frames, containing 4998 words and a total of 82548 sentences. Using the BERT model to calculate frame features on the above data took 1342 seconds, which is too long and cannot meet the time requirements of real-time calculation. Therefore, this method splits the recommendation process into offline and real-time calculations, which effectively accelerates the recommendation speed.
[0113] The original BERT model and the model in this method were used to encode the lexical units under the three frameworks of "visiting," "viewing," and "distinguishing," respectively. The distribution of the resulting lexical representations in the plane is shown below. Figure 3 As shown and Figure 4 As shown in the figure, the BERT model represents the target words in a more scattered manner and does not cluster them according to frames; while the representation of the target words in this method is clustered according to frames, resulting in a more consistent representation, which proves that the present method has better performance.
Claims
1. A lexical consistency framework recommendation method for constructing a framework semantic knowledge base, characterized in that, Includes the following steps: Step 1, Frame Recognition: Construct a pre-trained and graph convolutional neural network (GCN) joint learning model. The model structure includes: 1) Structural Information Extraction Layer: Extracting PropBank role or dependency structure information of the sequence containing the target word; 2) Encoding Layer: Encoding the context sequence using BERT; 3) Semantic Structure Relationship Representation Layer: Extracting the corresponding semantic representation based on the structural information and using GCN to model the target word and the semantic representation; 4) Label Prediction Layer: Concatenating the structural information learned by GCN and the representation of the target word and classifying them using a classifier. Step 2, Frame Recommendation: This includes offline frame feature calculation and real-time frame feature calculation. The offline frame feature calculation extracts lexical features containing contextual information based on the lexical units and the example sentences to which the lexical units belong using an encoder. The features of all lexical units under the same frame are averaged and pooled to obtain the features of the current frame. By extracting information from the knowledge base, each frame is pre-represented and its features are stored in a local file. The real-time frame feature calculation extracts features from lexical units and their contexts using an encoder. These features are then compared with the frame features obtained from the offline frame feature calculation, and the similarity is calculated and sorted to obtain the top-k similar frames, thus completing frame recommendation in different scenarios.
2. The lexical consistency framework recommendation method for constructing a framework semantic knowledge base according to claim 1, characterized in that, The structural information extraction layer in step 1 is specifically as follows: Using semantic blocks directly associated with the target word as structural information, a structural graph representing the semantic structure is constructed, and its adjacency matrix is represented as follows: , in, Increment the number of semantics associated with the target word by one. The definition is as follows: in, For the first in the sentence One word, For the first in the sentence One word; The start and end position information of each semantic block are represented as follows: and The corresponding positional information of the context structure of the target word is represented as follows: And pass it to the encoding layer.
3. The lexical consistency framework recommendation method for constructing a framework semantic knowledge base according to claim 1, characterized in that, The coding layer in step 1 is specifically as follows: Using BERT as the encoding layer, the semantic information of the context is incorporated into the representation of the target word. The encoding layer is represented as... The target word is represented as The context in which it is located is represented as The starting position information of the target word is denoted as The end position information is recorded as The last level of BERT is represented as For target words The encoding is represented as: Combined with the location of the structural information obtained by the structural information extraction layer The first one associated with the target word structural information express: in, , These are learnable parameters. Represented as: , Represented as: , and They represent the first The start and end positions of semantic blocks in each structural information; Hidden layers corresponding to multiple tokens and Perform a weighted average operation to obtain the representation of the entire word.
4. The lexical consistency framework recommendation method for constructing a framework semantic knowledge base according to claim 3, characterized in that, The semantic structure relation representation layer in step 1 is specifically as follows: use Semantic structural relationships are extracted, and two layers are constructed. Network, and two layers Inter-network communication The functions are connected, and the network structure of the semantic structure relation representation layer is as follows: in, It is by and The matrix formed by splicing together yes The position in the matrix will and The input is fed into the first layer of the GCN, and the output is processed... The function is activated, and finally the output is input into the second layer. Middle and take the first The representation of each position serves as the final feature representation. .
5. The lexical consistency framework recommendation method for constructing a framework semantic knowledge base according to claim 1, characterized in that, The label prediction layer in step 1 specifically comprises: The target word representation obtained from the encoding layer Structural information representation obtained from semantic structure relation layer The data is concatenated, then subjected to linear transformation and nonlinear activation to obtain the probability of the current representation belonging to each frame. , is represented as: in Representing the linear transformation layer, the position with the highest probability is taken as the current predicted result category, expressed as: Construct different adjacency matrices for target words with different parts of speech. Multiple frame recognition models are trained on the overall dataset separately for the structural information of each part of speech. These models are then fused using a hard voting method to obtain the final frame recognition model. The entire voting process is represented as follows: in, These are the predicted labels for each model, and Vote is the voting function.
6. The lexical consistency framework recommendation method for constructing a framework semantic knowledge base according to claim 1, characterized in that, The different scenarios in step 2 mainly include framework creation, lexical expansion, and data annotation, as detailed below: In the frame creation process, the input word units that need to be included in the new frame and the context in which the word units are located are input. The encoder performs feature extraction and sorts the extracted word unit features with the frame features calculated offline. The top-k frames with the highest similarity to the input content in terms of frame relationships and frame elements are returned and used as a reference for frame creation. After manual judgment, frame relationships and frame elements that conform to the specified word units and context are formed. In the word augmentation process, the word to be augmented and its context are input. The encoder extracts features by performing matrix operations on multiple word elements and example sentences at once. The extracted word features are ranked by similarity with the frame features calculated offline. The top-k existing frames with the highest semantic similarity to the word to be augmented are returned as candidate frames for word augmentation. After a second manual screening, the input word elements and example sentences are augmented into the target frame. In the data annotation process, a sentence to be annotated and its target words are input. The encoder extracts features from the sentences and calculates similarity between the features and the frame features obtained from offline frame feature calculation. The top-k recommended frames are then obtained. The difference between the recommended frames and the frames that are actually activated in the knowledge base is calculated to obtain a set of recommended but not yet activated frames. These frames are then sorted according to their relevance to the target words and returned to the data annotation staff as the frame recommendation results.