CPC G06F 40/30 (2020.01) [G06F 40/205 (2020.01); G06F 40/295 (2020.01)] | 11 Claims |
1. A method for semantic parsing, performed by an intelligent Q&A system based on a neural network, comprising:
obtaining a first recognition result of a target statement by a recognition at a coarse-grained level, wherein the first recognition result comprises a first intention recognition result and a first entity recognition result, and wherein the first entity recognition result corresponds to a plurality of vertical domains, each of the plurality of vertical domains comprises respective slots and respective intentions, the first entity recognition result includes at least one first slot and corresponding slot information, and wherein the first intention recognition result is a coarse-grained intention recognition result, the first entity recognition result is a coarse-grained entity recognition result;
determining one of the plurality of vertical domains corresponding to the first entity recognition result as a target vertical domain corresponding to the target statement according to the first intention recognition result, wherein the target vertical domain includes at least one second slot;
converting the first entity recognition result into a second entity recognition result in the target vertical domain, wherein the second entity recognition result is a fine-grained entity recognition result;
parsing a fine-grained intention of the target statement according to the second entity recognition result; and
generating and outputting a query statement for the target statement according to the second entity recognition result in the target vertical domain and the fine-grained intention of the target statement, to implement intelligent voice interaction,
wherein the method for semantic parsing further comprises:
establishing, before obtaining the first recognition result of the target statement, at least one first slot and a first intention corresponding to the at least one first slot, wherein the at least one first slot is established based on commonality of part of the second slots in all the vertical domains, so that different second slots in different vertical domains are mapped onto one first slot;
performing mapping of the target vertical domain to the first slots and establishing an association relationship between second slots and the first slots in the target vertical domain, wherein each of the second slots corresponds to one first slot, wherein each of the first slots corresponds to at least one second slot, and wherein a total quantity of the first slots is smaller than or equal to that of the second slots; and
associating the target vertical domain to the first intention, wherein a plurality of the first intentions are defined, each of the first intentions points to one or more of the vertical domains, and after the first intentions are determined, the target vertical domain is determined according to vertical domains to which the first intentions point;
wherein the first entity recognition result comprises an entity recognition result of at least one first slot, and wherein converting the first entity recognition result into the second entity recognition result in the target vertical domain comprises:
obtaining a corresponding relation between all the second slots and the first slots in the target vertical domain; and
determining an entity recognition result of the corresponding second slots according to the entity recognition result of the first slots so as to generate the second entity recognition result in the target vertical domain.
|