azure.cognitiveservices.language.textanalytics.models module¶
-
exception
azure.cognitiveservices.language.textanalytics.models.ErrorResponseException(deserialize, response, *args)[source]¶ Bases:
msrest.exceptions.HttpOperationErrorServer responsed with exception of type: ‘ErrorResponse’.
Parameters: - deserialize – A deserializer
- response – Server response to be deserialized.
-
class
azure.cognitiveservices.language.textanalytics.models.MultiLanguageInput(*, language: str = None, id: str = None, text: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelMultiLanguageInput.
Parameters: - language (str) – This is the 2 letter ISO 639-1 representation of a language. For example, use “en” for English; “es” for Spanish etc.,
- id (str) – Unique, non-empty document identifier.
- text (str) –
-
class
azure.cognitiveservices.language.textanalytics.models.MultiLanguageBatchInput(*, documents=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelMultiLanguageBatchInput.
Parameters: documents (list[MultiLanguageInput]) –
-
class
azure.cognitiveservices.language.textanalytics.models.MatchRecord(*, wikipedia_score: float = None, entity_type_score: float = None, text: str = None, offset: int = None, length: int = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelMatchRecord.
Parameters: - wikipedia_score (float) – (optional) If a well-known item with Wikipedia link is recognized, a decimal number denoting the confidence level of the Wikipedia info will be returned.
- entity_type_score (float) – (optional) If an entity type is recognized, a decimal number denoting the confidence level of the entity type will be returned.
- text (str) – Entity text as appears in the request.
- offset (int) – Start position (in Unicode characters) for the entity match text.
- length (int) – Length (in Unicode characters) for the entity match text.
-
class
azure.cognitiveservices.language.textanalytics.models.EntityRecord(*, name: str = None, matches=None, wikipedia_language: str = None, wikipedia_id: str = None, bing_id: str = None, type: str = None, sub_type: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelEntityRecord.
Variables are only populated by the server, and will be ignored when sending a request.
Parameters: - name (str) – Entity formal name.
- matches (list[MatchRecord]) – List of instances this entity appears in the text.
- wikipedia_language (str) – Wikipedia language for which the WikipediaId and WikipediaUrl refers to.
- wikipedia_id (str) – Wikipedia unique identifier of the recognized entity.
- bing_id (str) – Bing unique identifier of the recognized entity. Use in conjunction with the Bing Entity Search API to fetch additional relevant information.
- type (str) – Entity type from Named Entity Recognition model
- sub_type (str) – Entity sub type from Named Entity Recognition model
Variables: wikipedia_url (str) – URL for the entity’s Wikipedia page.
-
class
azure.cognitiveservices.language.textanalytics.models.DocumentStatistics(*, characters_count: int = None, transactions_count: int = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelDocumentStatistics.
Parameters: - characters_count (int) – Number of text elements recognized in the document.
- transactions_count (int) – Number of transactions for the document.
-
class
azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItem(*, id: str = None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelEntitiesBatchResultItem.
Variables are only populated by the server, and will be ignored when sending a request.
Parameters: - id (str) – Unique, non-empty document identifier.
- statistics (DocumentStatistics) – (Optional) if showStats=true was specified in the request this field will contain information about the document payload.
Variables: entities (list[EntityRecord]) – Recognized entities in the document.
-
class
azure.cognitiveservices.language.textanalytics.models.ErrorRecord(*, id: str = None, message: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelErrorRecord.
Parameters: - id (str) – Input document unique identifier the error refers to.
- message (str) – Error message.
-
class
azure.cognitiveservices.language.textanalytics.models.RequestStatistics(*, documents_count: int = None, valid_documents_count: int = None, erroneous_documents_count: int = None, transactions_count: int = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelRequestStatistics.
Parameters: - documents_count (int) – Number of documents submitted in the request.
- valid_documents_count (int) – Number of valid documents. This excludes empty, over-size limit or non-supported languages documents.
- erroneous_documents_count (int) – Number of invalid documents. This includes empty, over-size limit or non-supported languages documents.
- transactions_count (long) – Number of transactions for the request.
-
class
azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResult(**kwargs)[source]¶ Bases:
msrest.serialization.ModelEntitiesBatchResult.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - documents (list[EntitiesBatchResultItem]) – Response by document
- errors (list[ErrorRecord]) – Errors and Warnings by document
- statistics (RequestStatistics) – (Optional) if showStats=true was specified in the request this field will contain information about the request payload.
-
class
azure.cognitiveservices.language.textanalytics.models.InternalError(*, code: str = None, message: str = None, inner_error=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelInternalError.
Parameters: - code (str) –
- message (str) –
- inner_error (InternalError) –
-
class
azure.cognitiveservices.language.textanalytics.models.ErrorResponse(*, code: str = None, message: str = None, target: str = None, inner_error=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelErrorResponse.
Parameters: - code (str) –
- message (str) –
- target (str) –
- inner_error (InternalError) –
-
class
azure.cognitiveservices.language.textanalytics.models.KeyPhraseBatchResultItem(*, id: str = None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelKeyPhraseBatchResultItem.
Variables are only populated by the server, and will be ignored when sending a request.
Parameters: - id (str) – Unique, non-empty document identifier.
- statistics (DocumentStatistics) – (Optional) if showStats=true was specified in the request this field will contain information about the document payload.
Variables: key_phrases (list[str]) – A list of representative words or phrases. The number of key phrases returned is proportional to the number of words in the input document.
-
class
azure.cognitiveservices.language.textanalytics.models.KeyPhraseBatchResult(**kwargs)[source]¶ Bases:
msrest.serialization.ModelKeyPhraseBatchResult.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - documents (list[KeyPhraseBatchResultItem]) – Response by document
- errors (list[ErrorRecord]) – Errors and Warnings by document
- statistics (RequestStatistics) – =(Optional) if showStats=true was specified in the request this field will contain information about the request payload.
-
class
azure.cognitiveservices.language.textanalytics.models.LanguageInput(*, country_hint: str = None, id: str = None, text: str = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelLanguageInput.
Parameters: - country_hint (str) –
- id (str) – Unique, non-empty document identifier.
- text (str) –
-
class
azure.cognitiveservices.language.textanalytics.models.LanguageBatchInput(*, documents=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelLanguageBatchInput.
Parameters: documents (list[LanguageInput]) –
-
class
azure.cognitiveservices.language.textanalytics.models.DetectedLanguage(*, name: str = None, iso6391_name: str = None, score: float = None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelDetectedLanguage.
Parameters: - name (str) – Long name of a detected language (e.g. English, French).
- iso6391_name (str) – A two letter representation of the detected language according to the ISO 639-1 standard (e.g. en, fr).
- score (float) – A confidence score between 0 and 1. Scores close to 1 indicate 100% certainty that the identified language is true.
-
class
azure.cognitiveservices.language.textanalytics.models.LanguageBatchResultItem(*, id: str = None, detected_languages=None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelLanguageBatchResultItem.
Parameters: - id (str) – Unique, non-empty document identifier.
- detected_languages (list[DetectedLanguage]) – A list of extracted languages.
- statistics (DocumentStatistics) – (Optional) if showStats=true was specified in the request this field will contain information about the document payload.
-
class
azure.cognitiveservices.language.textanalytics.models.LanguageBatchResult(**kwargs)[source]¶ Bases:
msrest.serialization.ModelLanguageBatchResult.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - documents (list[LanguageBatchResultItem]) – Response by document
- errors (list[ErrorRecord]) – Errors and Warnings by document
- statistics (RequestStatistics) – (Optional) if showStats=true was specified in the request this field will contain information about the request payload.
-
class
azure.cognitiveservices.language.textanalytics.models.SentimentBatchResultItem(*, id: str = None, score: float = None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.ModelSentimentBatchResultItem.
Parameters: - id (str) – Unique, non-empty document identifier.
- score (float) – A decimal number between 0 and 1 denoting the sentiment of the document. A score above 0.7 usually refers to a positive document while a score below 0.3 normally has a negative connotation. Mid values refer to neutral text.
- statistics (DocumentStatistics) – (Optional) if showStats=true was specified in the request this field will contain information about the document payload.
-
class
azure.cognitiveservices.language.textanalytics.models.SentimentBatchResult(**kwargs)[source]¶ Bases:
msrest.serialization.ModelSentimentBatchResult.
Variables are only populated by the server, and will be ignored when sending a request.
Variables: - documents (list[SentimentBatchResultItem]) – Response by document
- errors (list[ErrorRecord]) – Errors and Warnings by document
- statistics (RequestStatistics) – (Optional) if showStats=true was specified in the request this field will contain information about the request payload.