Computer Engineering and Applications ›› 2021, Vol. 57 ›› Issue (16): 151-158.DOI: 10.3778/j.issn.1002-8331.2005-0226

Previous Articles     Next Articles

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.

Key words: sentence similarity, syntactic structure, emotional information, Harbin Institute of Technology LPT platform, syntactic dependency analysis, semantic role labeling

摘要:

针对汉语语句表意灵活复杂多变的特点,提出一种基于语义与情感的句子相似度计算方法,从表意层面计算句子相似度。该方法使用哈工大LTP平台对句子进行预处理,提取词语、词性、句法依存标记与语义角色标记,将语义角色标注结果作为句中语义独立成分赋予相似度权重系数,综合句法依存关系与词法关系计算两句相同标签语义独立成分相似度得到部分相似度,加权计算部分相似度得到句子整体相似度。另外,考虑到情感与句式因子,在整体相似度的基础上对满足条件的两句计算情感减益与句式减益。实验结果表明,该方法能有效提取出句子语义独立成分,从语义层面上计算句子相似度,解决了信息遗漏与句子组成成分不一致的问题,提高了句子相似度计算的准确率与鲁棒性。

关键词: 句子相似度, 句法结构, 情感信息, 哈工大LTP平台, 句法依存分析, 语义角色标注