摘要 |
Provided are a method and apparatus for determining a semantic matching degree. The method includes: acquiring a first sentence and a second sentence; partitioning the first sentence and the second sentence into x sentence segments and y sentence segments, respectively; performing convolution operation on term vectors in each of the sentence segments of the first sentence and term vectors in each of the sentence segments of the second sentence, so as to obtain a three-dimensional tensor; synthesizing and/or screening adjacent vectors among xth-line and yth-column one-dimensional vectors, until the three-dimensional tensor is combined into a one-dimensional target vector; and determining a semantic matching degree of the first sentence and the second sentence according to the target vector. In the embodiments of the present invention, sentences to be matched are partitioned into sentence segments by taking term vectors as a unit according to a word order, convolution is found on every two sentence segments of two sentences, so as to obtain a three-dimensional tensor, the 3-dimensional tensor comprises local matching information about the sentence segments of the various sentences, and a semantic matching result obtained based on the three-dimensional tensor is more accurate. |