src/jarvis_proto/jarvis_nlp.proto -------------------------------------------------- .. cpp:var:: service JarvisNLP Jarvis NLP Services implement task-specific APIs for popular NLP tasks including intent recognition (as well as slot filling), and entity extraction. .. cpp:var:: rpc TokenClassResponse AnalyzeEntities(AnalyzeEntitiesRequest) AnalyzeEntities accepts an input string and returns all named entities within the text, as well as a category and likelihood. .. cpp:var:: rpc AnalyzeIntentResponse AnalyzeIntent(AnalyzeIntentRequest) AnalyzeIntent accepts an input string and returns the most likely intent as well as slots relevant to that intent. The model requires that a valid "domain" be passed in, and optionally supports including a previous intent classification result to provide context for the model. .. cpp:var:: rpc TextTransformResponse PunctuateText(TextTransformRequest) PunctuateText takes text with no- or limited- punctuation and returns the same text with corrected punctuation and capitalization. .. cpp:var:: rpc NaturalQueryResponse NaturalQuery(NaturalQueryRequest) NaturalQuery is a search function that enables querying one or more documents or contexts with a query that is written in natural language. .. cpp:var:: message AnalyzeEntitiesOptions AnalyzeEntitiesOptions is an optional configuration message to be sent as part of an AnalyzeEntitiesRequest with query metadata .. cpp:var:: string lang Optional language field. Assumed to be "en-US" if not specified. .. cpp:var:: message AnalyzeEntitiesRequest AnalyzeEntitiesRequest is the input message for the AnalyzeEntities service .. cpp:var:: string query The string to analyze for intent and slots .. cpp:var:: AnalyzeEntitiesOptions options Optional configuration for the request, including providing context from previous turns and hardcoding a domain/language .. cpp:var:: message AnalyzeIntentContext AnalyzeIntentContext is reserved for future use when we may send context back in a a variety of different formats (including raw neural network hidden states) Reserved for future use .. cpp:var:: message AnalyzeIntentOptions AnalyzeIntentOptions is an optional configuration message to be sent as part of an AnalyzeIntentRequest with query metadata .. cpp:var:: string previous_intent .. cpp:var:: AnalyzeIntentContext vectors .. cpp:var:: string domain Optional domain field. Domain must be supported otherwise an error will be returned. If left blank, a domain detector will be run first and then the query routed to the appropriate intent classifier (if it exists) .. cpp:var:: string lang Optional language field. Assumed to be "en-US" if not specified. .. cpp:var:: message AnalyzeIntentRequest AnalyzeIntentRequest is the input message for the AnalyzeIntent service .. cpp:var:: string query The string to analyze for intent and slots .. cpp:var:: AnalyzeIntentOptions options Optional configuration for the request, including providing context from previous turns and hardcoding a domain/language .. cpp:var:: message AnalyzeIntentResponse AnalyzeIntentResponse is returned by the AnalyzeIntent service, and includes information related to the query's intent, (optionally) slot data, and its domain. .. cpp:var:: Classification intent Intent classification result, including the label and score .. cpp:var:: TokenClassValue slots (repeated) List of tokens explicitly marked as filling a slot relevant to the intent, where the tokens may not exactly match the input (based on the recombined values after tokenization) .. cpp:var:: string domain_str Returns the inferred domain for the query if not hardcoded in the request. In the case where the domain was hardcoded in AnalyzeIntentRequest, the returned domain is an exact match to the request. In the case where no domain matches the query, intent and slots will be unset. DEPRECATED, use Classification domain field. .. cpp:var:: Classification domain Returns the inferred domain for the query if not hardcoded in the request. In the case where the domain was hardcoded in AnalyzeIntentRequest, the returned domain is an exact match to the request. In the case where no domain matches the query, intent and slots will be unset. .. cpp:var:: message NaturalQueryRequest .. cpp:var:: string query The natural language query .. cpp:var:: uint32 top_n Maximum number of answers to return for the query. Defaults to 1 if not set. .. cpp:var:: string context Context to search with the above query .. cpp:var:: message NaturalQueryResponse .. cpp:var:: NaturalQueryResult results (repeated) .. cpp:var:: message NaturalQueryResult .. cpp:var:: string answer text which answers the query .. cpp:var:: float score Score representing confidence in result