Context-based natural language processing
A method for context-based natural language processing is disclosed herein. The method comprises maintaining a plurality of dialog system rules, receiving a user request from a Dialog System Interface, receiving one or more attributes associated with the user request from the Dialog System Interface or a user device, and identifying a type of context associated with the user request based on the user request and the one or more attributes. A context label is assigned to the user request associated with the type of context. Based on the context label and the user request, a particular dialog system rule is selected from the plurality of dialog system rules. A response to the user request is generated by applying the dialog system rule to at least a part of the user request.
1 . A method implemented by one or more processors, the method comprising:
determining user request text for a user request that is based on input provided by a user during a current user session via a dialog system interface, wherein the dialog system interface is integrated into one or more applications of a client device;
determining a current conversational context for the current user session, wherein determining the current conversational context is based on a given application being active on the client device, wherein the given application that is active on the client device is one of the one or more applications into which the dialog system interface is integrated, and wherein the current conversational context includes content associated specifically with the given application;
generating, based on both the user request text and the current conversational context, including the content associated specifically with the given application, a computer-implementable instruction that is responsive to the user request, wherein the computer-implementable instruction comprises an actionable command for the given application that is active on the client device; and
causing the client device to implement the computer-implementable instruction responsive to the user request, wherein causing the client device to implement the computer-implementable instruction comprises causing execution of the actionable command for the given application that is active on the client device.
2 . The method of claim 1 , wherein the content associated specifically with the given application includes terms, keywords, and/or phrases associated specifically with the given application.
3 . The method of claim 2 , wherein the terms, keywords, and/or phrases associated specifically with the given application are established by a developer of the given application.
4 . The method of claim 2 , wherein the content associated specifically with the given application includes variables and/or expressions associated specifically with the given application.
5 . The method of claim 4 , wherein the variables and/or expressions associated specifically with the given application are established by a developer of the given application.
6 . The method of claim 1 , wherein the content associated specifically with the given application includes variables and/or expressions associated specifically with the given application.
7 . The method of claim 1 , wherein the input provided by the user is speech input.
8 . The method of claim 7 , wherein determining the user request text for the user request comprises:
performing speech recognition on the speech input provided by the user; and
converting the speech input to the user request text.
9 . A system, comprising:
one or more computers each including at least one processor and a memory storing processor-executable code, one or more of the computers configured to:
determine user request text for a user request that is based on input provided by a user during a current user session via a dialog system interface, wherein the dialog system interface is integrated into one or more applications of a client device;
determine a current conversational context for the current user session, wherein determining the current conversational context is based on a given application being active on the client device, wherein the given application that is active on the client device is one of the one or more applications into which the dialog system interface is integrated, and wherein the current conversational context includes content associated specifically with the given application;
generate, based on both the user request text and the current conversational context, including the content associated specifically with the given application, a response to the user request; and
cause the response to be rendered at the client device responsive to the user request.
10 . The system of claim 9 , wherein the content associated specifically with the given application includes terms, keywords, and/or phrases associated specifically with the given application.
11 . The system of claim 10 , wherein the terms, keywords, and/or phrases associated specifically with the given application are established by a developer of the given application.
12 . The system of claim 10 , wherein the content associated specifically with the given application includes variables and/or expressions associated specifically with the given application.
13 . The system of claim 12 , wherein the variables and/or expressions associated specifically with the given application are established by a developer of the given application.
14 . The system of claim 9 , wherein the content associated specifically with the given application includes variables and/or expressions associated specifically with the given application.
15 . The system of claim 9 , wherein the input provided by the user is speech input.
16 . The system of claim 15 , wherein in determining the user request text for the user request, one or more of the computers are further configured to:
perform speech recognition on the speech input provided by the user; and
convert the speech input to the user request text.
17 . A non-transitory processor-readable medium having instructions stored thereon, which when executed by one or more processors, cause one or more of the processors to:
determine user request text for a user request that is based on input provided by a user during a current user session via a dialog system interface, wherein the dialog system interface is integrated into one or more applications of a client device;
determine a current conversational context for the current user session, wherein determining the current conversational context is based on a given application being active on the client device, wherein the given application that is active on the client device is one of the one or more applications into which the dialog system interface is integrated, and wherein the current conversational context includes content associated specifically with the given application;
generate, based on both the user request text and the current conversational context, including the content associated specifically with the given application, a computer-implementable instruction that is responsive to the user request, wherein the computer-implementable instruction comprises an actionable command for the given application that is active on the client device; and
cause the client device to implement the computer-implementable instruction responsive to the user request, wherein in causing the client device to implement the computer-implementable instruction, one or more of the processors are to cause execution of the actionable command for the given application that is active on the client device.
18 . The non-transitory processor-readable medium of claim 17 , wherein the content associated specifically with the given application includes terms, keywords, and/or phrases associated specifically with the given application.
19 . The non-transitory processor-readable medium of claim 18 , wherein the terms, keywords, and/or phrases associated specifically with the given application are established by a developer of the given application.
20 . The non-transitory processor-readable medium of claim 18 , wherein the content associated specifically with the given application includes variables and/or expressions associated specifically with the given application.