Method and system for processing multilingual user inputs via application programming interface
Abstract
The disclosure relates to system and method for processing multilingual user inputs using a Single Natural Language Processing (SNLP) model. The method includes receiving a user input in a source language and translating the user input to generate a plurality of translated user inputs in an intermediate language. The method includes using the SNLP model configured only using the intermediate language to generate a plurality of sets of intermediate input vectors in the intermediate language. The method includes processing, via an Application Programming Interface (API), the plurality of sets of intermediate input vectors using a predefined mechanism. The API is associated with a domain from a plurality of domains. Further, the method includes retrieving a predetermined response from the API based on processing the plurality of sets of intermediate input vectors. The method includes translating the predetermined response to generate a translated response that is rendered to the user.
Claims
exact text as granted — not AI-modifiedWhat is claimed is:
1 . A method for processing user inputs in multiple languages using a Single Natural Language Processing (SNLP) model, the method comprising:
receiving, via a communication device, a user input from a user in a source language, wherein the user input is at least one of a textual input and a verbal input; translating, using a machine translation model, the user input to generate a plurality of translated user inputs in an intermediate language, wherein a confidence score is associated with each of the plurality of translated user inputs, and wherein each of the plurality of translated user inputs is in text form; generating for the plurality of translated user inputs, by the SNLP model configured only using the intermediate language, a plurality of sets of intermediate input vectors in the intermediate language; processing, via an Application Programming Interface (API), the plurality of sets of intermediate input vectors using a predefined mechanism, wherein the API is associated with a domain from a plurality of domains; retrieving a predetermined response from the API based on processing the plurality of sets of intermediate input vectors, wherein the predefined mechanism comprises an elastic stretching mechanism, and wherein the elastic stretching mechanism comprises:
generating for the plurality of sets of intermediate input vectors, a plurality of sets of input intent maps in the intermediate language, wherein each of the plurality of sets of input intent maps is associated with one of the plurality of translated user inputs;
matching each of the plurality of sets of input intent maps in the intermediate language with each of a plurality of pre-stored sets of intent maps in the intermediate language, wherein each of the plurality of pre-stored sets of intent maps is generated from a single predefined training input in the intermediate language and is mapped to a predefined intent and the predetermined response retrieved from the API in the intermediate language;
determining a distance of each of the plurality of sets of input intent maps relative to each of the plurality of pre-stored sets of intent maps;
identifying a pre-stored intent map from the plurality of pre-stored sets of intent maps closest to the plurality of sets of input intent maps;
translating the predetermined response mapped to the pre-stored intent map into the source language to generate a translated response; and
rendering, to the user, the translated response.
2 . The method of claim 1 , wherein the predefined response comprises at least one of providing a service, or performing an action.
3 . The method of claim 1 , wherein the predefined mechanism comprises at least one of a statistical mechanism, an artificial intelligence (AI) mechanism, and a machine learning (ML) mechanism.
4 . The method of claim 1 , further comprising:
generating the plurality of sets of input intent maps based on the plurality of sets of intermediate input vectors, wherein generating the plurality of sets of input intent maps comprises processing the plurality of sets of intermediate input vectors through at least one of a plurality of intent map transforming algorithms.
5 . The method of claim 1 , further comprising: converting the verbal input in the source language into a plurality of source textual inputs in the source language using a Speech-to-Text (STT) mechanism.
6 . The method of claim 5 , wherein each of the plurality of source textual inputs in the source language is translated to the intermediate language to generate the plurality of translated user inputs.
7 . The method of claim 5 , wherein the confidence score associated with a translated user input from the plurality of translated user inputs corresponds to at least one of:
accuracy of conversion of the verbal input in the source language into a source textual input associated with the translated user input; and accuracy of the translation of the translated user input in the intermediate language.
8 . The method of claim 1 , wherein the at least one verbal input from the user is in form of a sentence, a phrase, a word, or a phoneme in context.
9 . A system for processing multilingual user inputs using a Single Natural Language Processing (SNLP) model, the system comprising:
a processor; and a memory communicatively coupled to the processor, wherein the memory stores processor-executable instructions, which, on execution, causes the processor to:
receive, via a communication device, a user input from a user in a source language, wherein the user input is at least one of a textual input and a verbal input;
translate, using a machine translation model, the user input to generate a plurality of translated user inputs in an intermediate language, wherein a confidence score is associated with each of the plurality of translated user inputs, and wherein each of the plurality of translated user inputs is in text form;
generate for the plurality of translated user inputs, by the SNLP model configured only using the intermediate language, a plurality of sets of intermediate input vectors in the intermediate language;
process, via an Application Programming Interface (API), the plurality of sets of intermediate input vectors using a predefined mechanism, wherein the API is associated with a domain from a plurality of domains; retrieving a predetermined response from the API based on processing the plurality of sets of intermediate input vectors,
wherein the predefined mechanism comprises an elastic stretching mechanism, and wherein the elastic stretching mechanism comprises:
generating for the plurality of sets of intermediate input vectors, a plurality of sets of input intent maps in the intermediate language, wherein each of the plurality of sets of input intent maps is associated with one of the plurality of translated user inputs;
matching each of the plurality of sets of input intent maps in the intermediate language with each of a plurality of pre-stored sets of intent maps in the intermediate language, wherein each of the plurality of pre-stored sets of intent maps is generated from a single predefined training input in the intermediate language and is mapped to a predefined intent and the predetermined response retrieved from the API in the intermediate language;
determining a distance of each of the plurality of sets of input intent maps relative to each of the plurality of pre-stored sets of intent maps;
identifying a pre-stored intent map from the plurality of pre-stored sets of intent maps closest to the plurality of sets of input intent maps;
translating the predetermined response mapped to the pre-stored intent map into the source language to generate a translated response; and
rendering, to the user, the translated response.
10 . The method of claim 9 , wherein the predefined response comprises at least one of providing a service, or performing an action.
11 . The system of claim 9 , wherein the predefined mechanism comprises at least one of a statistical mechanism, an artificial intelligence (AI) mechanism, and a machine learning (ML) mechanism.
12 . The system of claim 9 , wherein the processor-executable instructions further cause the processor to:
generate the plurality of sets of input intent maps based on the plurality of sets of intermediate input vectors, wherein generating the plurality of sets of input intent maps comprises processing the plurality of sets of intermediate input vectors through at least one of a plurality of intent map transforming algorithms.
13 . The system of claim 9 , wherein the processor-executable instructions further comprise converting the verbal input in the source language into a plurality of source textual inputs in the source language using a Speech-to-Text (STT) mechanism.
14 . The system of claim 13 , wherein each of the plurality of source textual inputs in the source language is translated to the intermediate language to generate the plurality of translated user inputs.
15 . The system of claim 13 , wherein the confidence score associated with a translated user input from the plurality of translated user inputs corresponds to at least one of:
accuracy of conversion of the verbal input in the source language into a source textual input associated with the translated user input; and accuracy of the translation of the translated user input in the intermediate language.
16 . The system of claim 9 , wherein the at least one verbal input from the user is in form of a sentence, a phrase, a word, or a phoneme in context.
17 . A computer program product being embodied in a non-transitory computer readable storage medium of a computing device and comprising computer instructions for processing multilingual user inputs using a Single Natural Language Processing (SNLP) model, the computer program product comprising:
receiving, via a communication device, a user input from a user in a source language, wherein the user input is at least one of a textual input and a verbal input; translating, using a machine translation model, the user input to generate a plurality of translated user inputs in an intermediate language, wherein a confidence score is associated with each of the plurality of translated user inputs, and wherein each of the plurality of translated user inputs is in text form; generating for the plurality of translated user inputs, by the SNLP model configured only using the intermediate language, a plurality of sets of intermediate input vectors in the intermediate language; processing, via an Application Programming Interface (API), the plurality of sets of intermediate input vectors using a predefined mechanism, wherein the API is associated with a domain from a plurality of domains; retrieving a predetermined response from the API based on processing the plurality of sets of intermediate input vectors, wherein the predefined mechanism comprises an elastic stretching mechanism, and wherein the elastic stretching mechanism comprises:
generating for the plurality of sets of intermediate input vectors, a plurality of sets of input intent maps in the intermediate language, wherein each of the plurality of sets of input intent maps is associated with one of the plurality of translated user inputs;
matching each of the plurality of sets of input intent maps in the intermediate language with each of a plurality of pre-stored sets of intent maps in the intermediate language, wherein each of the plurality of pre-stored sets of intent maps is generated from a single predefined training input in the intermediate language and is mapped to a predefined intent and the predetermined response retrieved from the API in the intermediate language;
determining a distance of each of the plurality of sets of input intent maps relative to each of the plurality of pre-stored sets of intent maps;
identifying a pre-stored intent map from the plurality of pre-stored sets of intent maps closest to the plurality of sets of input intent maps;
translating the predetermined response mapped to the pre-stored intent map into the source language to generate a translated response; and
rendering, to the user, the translated response.
18 . The computer program product of claim 17 , wherein the predefined response comprises at least one of providing a service, or performing an action.
19 . The computer program product of claim 17 , wherein the predefined mechanism comprises at least one of a statistical mechanism, an artificial intelligence (AI) mechanism, and a machine learning (ML) mechanism.
20 . The computer program product of claim 17 , further comprising:
generating the plurality of sets of input intent maps based on the plurality of sets of intermediate input vectors, wherein generating the plurality of sets of input intent maps comprises processing the plurality of sets of intermediate input vectors through at least one of a plurality of intent map transforming algorithms.Join the waitlist — get patent alerts
Track US2023334265A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.