azure.cognitiveservices.language.luis.runtime.models module

exception azure.cognitiveservices.language.luis.runtime.models.APIErrorException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘APIError’.

Parameters:
  • deserialize – A deserializer
  • response – Server response to be deserialized.
class azure.cognitiveservices.language.luis.runtime.models.IntentModel(*, intent: str = None, score: float = None, **kwargs)[source]

Bases: msrest.serialization.Model

An intent detected from the utterance.

Parameters:
  • intent (str) – Name of the intent, as defined in LUIS.
  • score (float) – Associated prediction score for the intent (float).
class azure.cognitiveservices.language.luis.runtime.models.EntityModel(*, entity: str, type: str, start_index: int, end_index: int, additional_properties=None, **kwargs)[source]

Bases: msrest.serialization.Model

An entity extracted from the utterance.

All required parameters must be populated in order to send to Azure.

Parameters:
  • additional_properties (dict[str, object]) – Unmatched properties from the message are deserialized this collection
  • entity (str) – Required. Name of the entity, as defined in LUIS.
  • type (str) – Required. Type of the entity, as defined in LUIS.
  • start_index (int) – Required. The position of the first character of the matched entity within the utterance.
  • end_index (int) – Required. The position of the last character of the matched entity within the utterance.
class azure.cognitiveservices.language.luis.runtime.models.CompositeChildModel(*, type: str, value: str, **kwargs)[source]

Bases: msrest.serialization.Model

Child entity in a LUIS Composite Entity.

All required parameters must be populated in order to send to Azure.

Parameters:
  • type (str) – Required. Type of child entity.
  • value (str) – Required. Value extracted by LUIS.
class azure.cognitiveservices.language.luis.runtime.models.CompositeEntityModel(*, parent_type: str, value: str, children, **kwargs)[source]

Bases: msrest.serialization.Model

LUIS Composite Entity.

All required parameters must be populated in order to send to Azure.

Parameters:
  • parent_type (str) – Required. Type/name of parent entity.
  • value (str) – Required. Value for composite entity extracted by LUIS.
  • children (list[CompositeChildModel]) – Required. Child entities.
class azure.cognitiveservices.language.luis.runtime.models.Sentiment(*, label: str = None, score: float = None, **kwargs)[source]

Bases: msrest.serialization.Model

Sentiment of the input utterance.

Parameters:
  • label (str) – The polarity of the sentiment, can be positive, neutral or negative.
  • score (float) – Score of the sentiment, ranges from 0 (most negative) to 1 (most positive).
class azure.cognitiveservices.language.luis.runtime.models.LuisResult(*, query: str = None, altered_query: str = None, top_scoring_intent=None, intents=None, entities=None, composite_entities=None, sentiment_analysis=None, **kwargs)[source]

Bases: msrest.serialization.Model

Prediction, based on the input query, containing intent(s) and entities.

Parameters:
  • query (str) – The input utterance that was analized.
  • altered_query (str) – The corrected utterance (when spell checking was enabled).
  • top_scoring_intent (IntentModel) –
  • intents (list[IntentModel]) – All the intents (and their score) that were detected from utterance.
  • entities (list[EntityModel]) – The entities extracted from the utterance.
  • composite_entities (list[CompositeEntityModel]) – The composite entities extracted from the utterance.
  • sentiment_analysis (Sentiment) –
class azure.cognitiveservices.language.luis.runtime.models.EntityWithScore(*, entity: str, type: str, start_index: int, end_index: int, score: float, additional_properties=None, **kwargs)[source]

Bases: azure.cognitiveservices.language.luis.runtime.models.entity_model_py3.EntityModel

EntityWithScore.

All required parameters must be populated in order to send to Azure.

Parameters:
  • additional_properties (dict[str, object]) – Unmatched properties from the message are deserialized this collection
  • entity (str) – Required. Name of the entity, as defined in LUIS.
  • type (str) – Required. Type of the entity, as defined in LUIS.
  • start_index (int) – Required. The position of the first character of the matched entity within the utterance.
  • end_index (int) – Required. The position of the last character of the matched entity within the utterance.
  • score (float) – Required. Associated prediction score for the intent (float).
class azure.cognitiveservices.language.luis.runtime.models.EntityWithResolution(*, entity: str, type: str, start_index: int, end_index: int, resolution, additional_properties=None, **kwargs)[source]

Bases: azure.cognitiveservices.language.luis.runtime.models.entity_model_py3.EntityModel

EntityWithResolution.

All required parameters must be populated in order to send to Azure.

Parameters:
  • additional_properties (dict[str, object]) – Unmatched properties from the message are deserialized this collection
  • entity (str) – Required. Name of the entity, as defined in LUIS.
  • type (str) – Required. Type of the entity, as defined in LUIS.
  • start_index (int) – Required. The position of the first character of the matched entity within the utterance.
  • end_index (int) – Required. The position of the last character of the matched entity within the utterance.
  • resolution (object) – Required. Resolution values for pre-built LUIS entities.
class azure.cognitiveservices.language.luis.runtime.models.APIError(*, status_code: str = None, message: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Error information returned by the API.

Parameters:
  • status_code (str) – HTTP Status code
  • message (str) – Cause of the error.