CPC G06F 40/30 (2020.01) [G06F 40/289 (2020.01); G06N 5/01 (2023.01)] | 14 Claims |
1. A missing semantics complementing method, comprising:
obtaining a historical dialog statement and a question statement input by a user;
obtaining location information of a to-be-resolved item in the question statement, and resolving the to-be-resolved item in the question statement based on the historical dialog statement and the location information of the to-be-resolved item, to obtain a resolved question statement, wherein the location information is obtained based on a first sequence labeling model that comprises a neural network;
determining that a component in the question statement is ellipted, and in response to determining that a component in the question statement is ellipted, complementing the ellipted component based on the historical dialog statement to obtain a question statement after ellipsis resolution;
merging the resolved question statement and the question statement after ellipsis resolution to obtain a merged question statement; and
determining a target complemented question statement from the resolved question statement, the question statement after ellipsis resolution, and the merged question statement in the resolved question statement, wherein the target complemented question statement is a question statement with a highest stem sentence integrity degree and a highest probability that all words in a sentence form one sentence selected from one of the resolved question statement, the question statement after ellipsis resolution, and the merged question statement,
wherein the historical dialog statement comprises a previous statement to the question statement,
wherein the determining that the component in the question statement is ellipted comprises:
determining that a stem sentence component in the question statement is ellipted,
determining that a notional word that is in the question statement and corresponds to an attribute word is ellipted, or
determining that a general component in the question statement is ellipted; and
wherein determining that the stem sentence component in the question statement is ellipted comprises:
determining that a sentence pattern of the question statement and a sentence pattern of the previous statement meet a preset condition or determining that a body of the sentence pattern of the question statement is a proper subset of the previous statement;
in response to determining that the sentence pattern of the question statement and the sentence pattern of the previous statement meet the preset condition or determining that the body of the sentence pattern of the question statement is the proper subset of the previous statement, determining whether there is a same-type relationship between a phrase in the question statement and a phrase in the previous statement; and
in response to there being the same-type relationship between the phrase in the question statement and the phrase in the previous statement, determining that the stem sentence component in the question statement is ellipted.
|