# Domain Knowledge Graph Question Answering Based on Semantic Analysis and Data Augmentation
## 4 Question Answering System
### Semantic Parsing
#### 4.2.2 Event Matching  
After analyzing the questions in the dataset, we found that in actual usage scenarios, sentence components may be missing or unclear due to factors such as limited user expression abilities [44]. As a result, the identification of event entities is frequently less effective; in particular, the input to the QA system consists of spoken audio converted to text, which increases the difficulty of identifying event entities and makes the answer retrieval more difficult. To address the above issues, we utilized LTP [7] developed by Harbin University of Technology to analyze questions by starting with the sentence structure. The tool performs syntactical analysis on the question, extracts important semantic subject roles. We reorganized them into phrases based on semantic role properties. The resulting phrases were then matched with a predefined statement template. The process partly eliminates noises caused by colloquial language or vague expressions and ultimately identifies the household registration event entity associated with the question. (1) Semantic Role Analysis  
The LTP platform supports user-defined dictionaries. We added commonly used words related to the field of household registration to the LTP dictionary. The question is then segmented, annotated with parts of speech, and labeled with semantic roles. Based on the result of the semantic analysis, the semantic roles were extracted from the clauses and output. Semantic roles and their meanings are listed in Table 3[45]. The LTP performs semantic role labeling and extracts semantic roles present in interrogative sentences. To illustrate, we take the question 'Can I apply for my first ID card for non-local household registration in Wuhan?' as an example. Figure 6 shows the analysis result of the LTP for this question, which provides a list of semantic labeling results:  
['predicate': 'apply for', 'arguments': [('ARGM-TPC', 'non-local household registration'), ('ARGM-ADV', 'first'), ('A1', 'ID card')]], ['predicate': 'apply for', 'arguments': [('ARGM-TPC', 'non-local household registration'), ('ARGM-LOC', 'in Wuhan')]]. The resulting list consists of multiple dictionaries where each dictionary contains a predicate 'predicate' and a semantic role 'argument'. The predicates and semantic roles in each dictionary are then reassembled into a phrase set \(P=(p_{1},p_{2},\cdots,p_{m})\), which expresses the key semantic elements of the question, according to the role types, as shown in Table 3. For instance, using semantic role extraction, we obtained the following phrases: 'non-local household registration apply for first ID card' and 'non-local household registration apply for in Wuhan'. Text similarity matching  
The purpose of similarity matching is to calculate the similarity between the phrases extracted from semantic analysis and the event entities stored in the KG. This process can ensure the household registration item names and contextual conditions for the given question, and provides important information to support answer retrieval [46]. The specific process of similarity matching includes the following steps:  
* To begin with, the phrases extracted from semantic analysis in the phrase set \(P\) are reassembled and concatenated, resulting in the sentence \(sent\) with extracted semantic role features. * Search for all CVT nodes that represent household registration events in the KG, extract the corresponding description texts of household registration events for these nodes, and form a candidate set \(S=(s_{1},s_{2},\cdots s_{n})\);