Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (16): 151-158.

Sentence Similarity Calculation Method Based on Semantics and Emotion

YANG Yanjiao, ZHAO Guotao, WANG Pidong

1. College of Computer Science and Engineering, Northwest Normal University, Lanzhou 730070, China
• Online:2021-08-15 Published:2021-08-16

基于语义与情感的句子相似度计算方法

1. 西北师范大学 计算机科学与工程学院，兰州 730070

Abstract:

Aiming at the characteristics of flexible, complex and changeable expressions in Chinese sentences, a sentence similarity calculation method based on semantics and emotion is proposed, which calculates sentence similarity from the ideographic level. This method uses the Harbin Institute of Technology LTP platform to preprocess sentences, extracts words, parts of speech, syntactic dependency tags and semantic role tags, assigns semantic role labeling results as semantic independent components in sentences to similarity weight coefficients, synthesizes syntactic dependency relationships and lexical relationships to calculate the similarity of semantic independent components of two sentences with the same label to obtain partial similarity, and calculates the partial similarity by weighting to obtain the overall similarity of the sentence. In addition, considering the sentiment and sentence factors, the sentiment deduction and sentence deduction are calculated for the two sentences that satisfy the condition based on the overall similarity. The experimental results show that the method can effectively extract the semantic independent components of the sentence, calculate the sentence similarity from the semantic level, solve the problem of inconsistency between information leakage and sentence composition, and improve the accuracy and robustness of sentence similarity calculation.