Generating recommendations by using communicative discourse trees of conversations
Abstract
Techniques are disclosed for improved autonomous agents that can provide a recommendation in a non-intrusive, conversational manner. In an aspect, a method determines a first sentiment score for a first utterance and a second sentiment score for a second utterance, each sentiment score indicating an emotion indicated by the respective utterance. The method further identifies that a difference between the first sentiment score and the second sentiment score is greater than a threshold. The method further extracts a noun phrase from the second utterance. The method identifies a text fragment that includes an entity that corresponds to the noun phrase. The method identifies that the text fragment addresses a claim of the second utterance. The method forms a third utterance that includes the a recommendation related to the second utterance and adds the third utterance to the sequence of utterances after the second utterance.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for providing a recommendation in conversational form, the method comprising:
determining a first sentiment score for a first utterance; determining a second sentiment score for a second utterance, wherein the first sentiment score and the second sentiment score individually indicate an emotion indicated by a respective utterance, and wherein determining the first sentiment score and the second sentiment score comprises:
creating a communicative discourse tree from text comprising an utterance, wherein the communicative discourse tree comprises a discourse tree with elementary discourse units that are annotated with verb signatures;
providing the communicative discourse tree to a machine-learning model, the machine-learning model being trained to identify emotions based on input communicative discourse trees for which emotion associations are known; and
receiving a sentiment score from the machine-learning model;
identifying that a difference between the first sentiment score and the second sentiment score is greater than a threshold; extracting a noun phrase from the second utterance; identifying, in an entity database, a text fragment that comprises an entity that corresponds to the noun phrase; verifying that the text fragment addresses a claim of the second utterance; forming a third utterance that comprises the text fragment; and outputting the third utterance to a user device.
2 . The method of claim 1 , wherein verifying that the text fragment addresses the claim of the second utterance comprises:
generating a first discourse tree from the text fragment and a second discourse tree from the second utterance, wherein each of the text fragment and the second utterance comprise respective elementary discourse units; translating the first discourse tree into a first reason-conclusion logical formula and the second discourse tree into a second reason-conclusion logical formula; and identifying that the first reason-conclusion logical formula supports the second reason-conclusion logical formula.
3 . The method of claim 2 , wherein the translating the first discourse tree comprises:
identifying logical atoms that correspond to text of an elementary discourse unit of the first discourse tree; identifying a rhetorical relation that (i) corresponds to a nucleus elementary discourse unit and a satellite elementary discourse unit and (ii) is included in a subset of rhetorical relations in the first discourse tree; constructing, from the rhetorical relation, a reason-conclusion logical formula by mapping the nucleus elementary discourse unit to a reason and the satellite elementary discourse unit to a conclusion; substituting logical atoms associated with the nucleus elementary discourse unit to the reason; and substituting logical atoms associated with the satellite elementary discourse unit to the conclusion.
4 . The method of claim 1 , wherein verifying that the text fragment addresses the claim of the second utterance comprises:
generating a first communicative discourse tree from the text fragment and a second communicative discourse tree from the second utterance, wherein each of the text fragment and the second utterance comprise respective elementary discourse units, wherein generating the first communicative discourse tree comprises:
generating a discourse tree that represents rhetorical relationships between elementary discourse units; and
matching each elementary discourse unit that has a verb to a verb signature;
translating the first communicative discourse tree into a first reason-conclusion logical formula and the second communicative discourse tree into a second reason-conclusion logical formula; and identifying that the first reason-conclusion logical formula supports the second reason-conclusion logical formula.
5 . The method of claim 4 , wherein the matching comprises:
accessing a plurality of verb signatures, wherein each verb signature comprises the verb of an elementary discourse unit and a sequence of thematic roles, wherein thematic roles describe a relationship between the verb and related words; determining, for each verb signature of the plurality of verb signatures, a plurality of thematic roles of the respective signature that match a role of a word in the elementary discourse unit; selecting a particular verb signature from the plurality of verb signatures based on the particular verb signature comprising a highest number of matches; and associating the particular verb signature with the elementary discourse unit.
6 . The method of claim 1 , further comprising constructing the entity database by:
determining, from a training text corpus, a particular entity corresponding to the noun phrase; obtaining a result by verifying the noun phrase against a database; and adding the result to the entity database.
7 . The method of claim 6 , wherein adding the result to the database includes traversing an ontology of the database to add the result to a location corresponding to the noun phrase.
8 . A non-transitory computer-readable storage medium storing computer-executable program instructions, wherein when executed by a processing device, the program instructions cause the processing device to perform operations comprising:
determining a first sentiment score for a first utterance; determining a second sentiment score for a second utterance, wherein the first sentiment score and the second sentiment score individually indicate an emotion indicated by a respective utterance, and wherein determining the first sentiment score and the second sentiment score comprises:
creating a communicative discourse tree from text comprising an utterance, wherein the communicative discourse tree comprises a discourse tree with elementary discourse units that are annotated with verb signatures;
providing the communicative discourse tree to a machine-learning model, the machine-learning model being trained to identify emotions based on input communicative discourse trees for which emotion associations are known; and
receiving a sentiment score from the machine-learning model;
identifying that a difference between the first sentiment score and the second sentiment score is greater than a threshold; extracting a noun phrase from the second utterance; identifying, in an entity database, a text fragment that comprises an entity that corresponds to the noun phrase; verifying that the text fragment addresses a claim of the second utterance; forming a third utterance that comprises the text fragment; and outputting the third utterance to a user device.
9 . The non-transitory computer-readable storage medium of claim 8 , wherein verifying that the text fragment addresses the claim of the second utterance comprises:
generating a first discourse tree from the text fragment and a second discourse tree from the second utterance, wherein each of the text fragment and the second utterance comprise respective elementary discourse units; translating the first discourse tree into a first reason-conclusion logical formula and the second discourse tree into a second reason-conclusion logical formula; and identifying that the first reason-conclusion logical formula supports the second reason-conclusion logical formula.
10 . The non-transitory computer-readable storage medium of claim 9 , wherein the translating the first discourse tree comprises:
identifying logical atoms that correspond to text of an elementary discourse unit of the first discourse tree; identifying a rhetorical relation that (i) corresponds to a nucleus elementary discourse unit and a satellite elementary discourse unit and (ii) is included in a subset of rhetorical relations in the first discourse tree; constructing, from the rhetorical relation, a reason-conclusion logical formula by mapping the nucleus elementary discourse unit to a reason and the satellite elementary discourse unit to a conclusion; substituting logical atoms associated with the nucleus elementary discourse unit to the reason; and substituting logical atoms associated with the satellite elementary discourse unit to the conclusion.
11 . The non-transitory computer-readable storage medium of claim 8 , wherein verifying that the text fragment addresses the claim of the second utterance comprises:
generating a first communicative discourse tree from the text fragment and a second communicative discourse tree from the second utterance, wherein each of the text fragment and the second utterance comprise respective elementary discourse units, wherein generating the first communicative discourse tree comprises:
generating a discourse tree that represents rhetorical relationships between elementary discourse units; and
matching each elementary discourse unit of the discourse tree that has a verb to a verb signature;
translating the first communicative discourse tree into a first reason-conclusion logical formula and the second communicative discourse tree into a second reason-conclusion logical formula; and identifying that the first reason-conclusion logical formula supports the second reason-conclusion logical formula.
12 . The non-transitory computer-readable storage medium of claim 11 , wherein the matching comprises:
accessing a plurality of verb signatures, wherein each verb signature comprises the verb of an elementary discourse unit and a sequence of thematic roles, wherein thematic roles describe a relationship between the verb and related words; determining, for each verb signature of the plurality of verb signatures, a plurality of thematic roles of the respective signature that match a role of a word in the elementary discourse unit; selecting a particular verb signature from the plurality of verb signatures based on the particular verb signature comprising a highest number of matches; and associating the particular verb signature with the elementary discourse unit.
13 . The non-transitory computer-readable storage medium of claim 8 , further comprising constructing the entity database by:
determining, from a training text corpus, a particular entity corresponding to the noun phrase; obtaining a result by verifying the noun phrase against a database; and adding the result to the entity database.
14 . The non-transitory computer-readable storage medium of claim 13 , wherein adding the result to the database includes traversing an ontology of the database to add the result to a location corresponding to the noun phrase.
15 . A system comprising:
a non-transitory computer-readable medium storing computer-executable program instructions; and a processing device communicatively coupled to the non-transitory computer-readable medium for executing the computer-executable program instructions, wherein executing the computer-executable program instructions configures the processing device to perform operations comprising: determining a first sentiment score for a first utterance; determining a second sentiment score for a second utterance, wherein the first sentiment score and the second sentiment score individually indicate an emotion indicated by a respective utterance, and wherein determining the first sentiment score and the second sentiment score comprises:
creating a communicative discourse tree from text comprising an utterance, wherein the communicative discourse tree comprises a discourse tree with elementary discourse units that are annotated with verb signatures;
providing the communicative discourse tree to a machine-learning model, the machine-learning model being trained to identify emotions based on input communicative discourse trees for which emotion associations are known; and
receiving a sentiment score from the machine-learning model;
identifying that a difference between the first sentiment score and the second sentiment score is greater than a threshold; extracting a noun phrase from the second utterance; identifying, in an entity database, a text fragment that comprises an entity that corresponds to the noun phrase; verifying that the text fragment addresses a claim of the second utterance; forming a third utterance that comprises the text fragment; and outputting the third utterance to a user device.
16 . The system of claim 15 , wherein verifying that the text fragment addresses the claim of the second utterance comprises:
generating a first communicative discourse tree from the text fragment and a second communicative discourse tree corresponding to the second utterance; translating the first communicative discourse tree into a first reason-conclusion logical formula and the communicative discourse tree corresponding to the second utterance into a second reason-conclusion logical formula; and identifying that the first reason-conclusion logical formula supports the second reason-conclusion logical formula.
17 . The system of claim 16 , wherein the translating comprises:
identifying logical atoms that correspond to text of an elementary discourse unit; identifying a rhetorical relation that (i) corresponds to a nucleus elementary discourse unit and a satellite elementary discourse unit and (ii) is included in a subset of rhetorical relations in the respective communicative discourse tree; constructing, from the rhetorical relation, a reason-conclusion logical formula by mapping the nucleus elementary discourse unit to a reason and the satellite elementary discourse unit to a conclusion; substituting logical atoms associated with the nucleus elementary discourse unit to the reason; and substituting logical atoms associated with the satellite elementary discourse unit to the conclusion.
18 . The system of claim 15 , wherein generating the communicative discourse tree comprises:
generating a discourse tree that represents rhetorical relationships between elementary discourse units; accessing a plurality of verb signatures, wherein each verb signature comprises a verb of the elementary discourse unit and a sequence of thematic roles, wherein thematic roles describe a relationship between the verb and related words; determining, for each verb signature of the plurality of verb signatures, a plurality of thematic roles of the respective signature that match a role of a word in the elementary discourse unit; selecting a particular verb signature from the plurality of verb signatures based on the particular verb signature comprising a highest number of matches; and associating the particular verb signature with the elementary discourse unit.
19 . The system of claim 15 , wherein executing the computer-executable program instructions configures the processing device to perform additional operations comprising constructing the entity database by:
determining, from a training text corpus, a particular entity corresponding to the noun phrase, wherein the entity comprises attributes; forming a search query comprising the entity and the attributes; submitting the search query to a search engine; obtaining a result from the search engine; and adding the result into the entity database.
20 . The system of claim 19 , wherein adding the result to the entity database includes traversing an ontology of the entity database to add the result to a location corresponding to the noun phrase.Join the waitlist — get patent alerts
Track US12488192B2 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.