Research on Chinese Question-Answering for Gaokao Based on Graph
Algorithm 1
QA algorithm for reading comprehension based on a graph.
Input: question and answer set , sentences initial value vector y.
Output: top 6 answer candidate sentences.
(1)
Calculate the relationship between the question and each candidate sentence by methods based on word similarity matching, frame matching, and discourse topic. If the degree of relationship between two nodes is greater than 0, the nodes are connected by an edge. Construct the affinity matrix . In order to prevent the self-reinforcement of each node, let .
(2)
Calculate the relationship between each candidate sentence through the word similarity. If the degree of relationship between two nodes is greater than 0, the nodes are connected by an edge. Construct the affinity matrix , while .
(3)
Combine the affinity matrix and normalize it. Define . Define the diagonal matrix , where represents the sum of the i-th row of the , and the is normalized to .
(4)
Iterate until convergence, where .
(5)
Use to represent the convergence sequence , so that each sentence gets its ranking score.
Return top 6 candidate sentences with the highest score.