azure.cognitiveservices.language.textanalytics.models module¶
-
exception
azure.cognitiveservices.language.textanalytics.models.
ErrorResponseException
(deserialize, response, *args)[source]¶ Bases:
msrest.exceptions.HttpOperationError
Server responded with exception of type: ‘ErrorResponse’.
- Parameters
deserialize – A deserializer
response – Server response to be deserialized.
-
class
azure.cognitiveservices.language.textanalytics.models.
DetectedLanguage
(*, name: Optional[str] = None, iso6391_name: Optional[str] = None, score: Optional[float] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
DetectedLanguage.
- 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.
DocumentStatistics
(*, characters_count: Optional[int] = None, transactions_count: Optional[int] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
DocumentStatistics.
-
class
azure.cognitiveservices.language.textanalytics.models.
EntitiesBatchResult
(**kwargs)[source]¶ Bases:
msrest.serialization.Model
EntitiesBatchResult.
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.
EntitiesBatchResultItem
(*, id: Optional[str] = None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
EntitiesBatchResultItem.
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.
EntityRecord
(*, name: Optional[str] = None, matches=None, wikipedia_language: Optional[str] = None, wikipedia_id: Optional[str] = None, bing_id: Optional[str] = None, type: Optional[str] = None, sub_type: Optional[str] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
EntityRecord.
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.
ErrorRecord
(*, id: Optional[str] = None, message: Optional[str] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
ErrorRecord.
-
class
azure.cognitiveservices.language.textanalytics.models.
ErrorResponse
(*, code: Optional[str] = None, message: Optional[str] = None, target: Optional[str] = None, inner_error=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
ErrorResponse.
- Parameters
code (str) –
message (str) –
target (str) –
inner_error (InternalError) –
-
class
azure.cognitiveservices.language.textanalytics.models.
InternalError
(*, code: Optional[str] = None, message: Optional[str] = None, inner_error=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
InternalError.
- Parameters
code (str) –
message (str) –
inner_error (InternalError) –
-
class
azure.cognitiveservices.language.textanalytics.models.
KeyPhraseBatchResult
(**kwargs)[source]¶ Bases:
msrest.serialization.Model
KeyPhraseBatchResult.
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.
KeyPhraseBatchResultItem
(*, id: Optional[str] = None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
KeyPhraseBatchResultItem.
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.
LanguageBatchInput
(*, documents=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
LanguageBatchInput.
- Parameters
documents (list[LanguageInput]) –
-
class
azure.cognitiveservices.language.textanalytics.models.
LanguageBatchResult
(**kwargs)[source]¶ Bases:
msrest.serialization.Model
LanguageBatchResult.
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.
LanguageBatchResultItem
(*, id: Optional[str] = None, detected_languages=None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
LanguageBatchResultItem.
- 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.
LanguageInput
(*, country_hint: Optional[str] = None, id: Optional[str] = None, text: Optional[str] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
LanguageInput.
-
class
azure.cognitiveservices.language.textanalytics.models.
MatchRecord
(*, wikipedia_score: Optional[float] = None, entity_type_score: Optional[float] = None, text: Optional[str] = None, offset: Optional[int] = None, length: Optional[int] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
MatchRecord.
- 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.
MultiLanguageBatchInput
(*, documents=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
MultiLanguageBatchInput.
- Parameters
documents (list[MultiLanguageInput]) –
-
class
azure.cognitiveservices.language.textanalytics.models.
MultiLanguageInput
(*, language: Optional[str] = None, id: Optional[str] = None, text: Optional[str] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
MultiLanguageInput.
-
class
azure.cognitiveservices.language.textanalytics.models.
RequestStatistics
(*, documents_count: Optional[int] = None, valid_documents_count: Optional[int] = None, erroneous_documents_count: Optional[int] = None, transactions_count: Optional[int] = None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
RequestStatistics.
- 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.
SentimentBatchResult
(**kwargs)[source]¶ Bases:
msrest.serialization.Model
SentimentBatchResult.
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.
-
class
azure.cognitiveservices.language.textanalytics.models.
SentimentBatchResultItem
(*, id: Optional[str] = None, score: Optional[float] = None, statistics=None, **kwargs)[source]¶ Bases:
msrest.serialization.Model
SentimentBatchResultItem.
- 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.