Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .text_analytics_api import TextAnalyticsAPI
from .text_analytics_client import TextAnalyticsClient
from .version import VERSION

__all__ = ['TextAnalyticsAPI']
__all__ = ['TextAnalyticsClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,44 @@
# regenerated.
# --------------------------------------------------------------------------

from .multi_language_input import MultiLanguageInput
from .multi_language_batch_input import MultiLanguageBatchInput
from .key_phrase_batch_result_item import KeyPhraseBatchResultItem
from .error_record import ErrorRecord
from .key_phrase_batch_result import KeyPhraseBatchResult
from .internal_error import InternalError
from .error_response import ErrorResponse, ErrorResponseException
from .input import Input
from .batch_input import BatchInput
from .detected_language import DetectedLanguage
from .language_batch_result_item import LanguageBatchResultItem
from .language_batch_result import LanguageBatchResult
from .sentiment_batch_result_item import SentimentBatchResultItem
from .sentiment_batch_result import SentimentBatchResult
from .text_analytics_api_enums import (
AzureRegions,
)
try:
from .multi_language_input_py3 import MultiLanguageInput
from .multi_language_batch_input_py3 import MultiLanguageBatchInput
from .key_phrase_batch_result_item_py3 import KeyPhraseBatchResultItem
from .error_record_py3 import ErrorRecord
from .key_phrase_batch_result_py3 import KeyPhraseBatchResult
from .internal_error_py3 import InternalError
from .error_response_py3 import ErrorResponse, ErrorResponseException
from .input_py3 import Input
from .batch_input_py3 import BatchInput
from .detected_language_py3 import DetectedLanguage
from .language_batch_result_item_py3 import LanguageBatchResultItem
from .language_batch_result_py3 import LanguageBatchResult
from .sentiment_batch_result_item_py3 import SentimentBatchResultItem
from .sentiment_batch_result_py3 import SentimentBatchResult
from .match_record_py3 import MatchRecord
from .entity_record_py3 import EntityRecord
from .entities_batch_result_item_py3 import EntitiesBatchResultItem
from .entities_batch_result_py3 import EntitiesBatchResult
except (SyntaxError, ImportError):
from .multi_language_input import MultiLanguageInput
from .multi_language_batch_input import MultiLanguageBatchInput
from .key_phrase_batch_result_item import KeyPhraseBatchResultItem
from .error_record import ErrorRecord
from .key_phrase_batch_result import KeyPhraseBatchResult
from .internal_error import InternalError
from .error_response import ErrorResponse, ErrorResponseException
from .input import Input
from .batch_input import BatchInput
from .detected_language import DetectedLanguage
from .language_batch_result_item import LanguageBatchResultItem
from .language_batch_result import LanguageBatchResult
from .sentiment_batch_result_item import SentimentBatchResultItem
from .sentiment_batch_result import SentimentBatchResult
from .match_record import MatchRecord
from .entity_record import EntityRecord
from .entities_batch_result_item import EntitiesBatchResultItem
from .entities_batch_result import EntitiesBatchResult

__all__ = [
'MultiLanguageInput',
Expand All @@ -42,5 +63,8 @@
'LanguageBatchResult',
'SentimentBatchResultItem',
'SentimentBatchResult',
'AzureRegions',
'MatchRecord',
'EntityRecord',
'EntitiesBatchResultItem',
'EntitiesBatchResult',
]
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ class BatchInput(Model):
'documents': {'key': 'documents', 'type': '[Input]'},
}

def __init__(self, documents=None):
super(BatchInput, self).__init__()
self.documents = documents
def __init__(self, **kwargs):
super(BatchInput, self).__init__(**kwargs)
self.documents = kwargs.get('documents', None)
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@
# regenerated.
# --------------------------------------------------------------------------

from enum import Enum
from msrest.serialization import Model


class AzureRegions(Enum):
class BatchInput(Model):
"""BatchInput.

westus = "westus"
westeurope = "westeurope"
southeastasia = "southeastasia"
eastus2 = "eastus2"
westcentralus = "westcentralus"
westus2 = "westus2"
eastus = "eastus"
southcentralus = "southcentralus"
northeurope = "northeurope"
eastasia = "eastasia"
australiaeast = "australiaeast"
brazilsouth = "brazilsouth"
:param documents:
:type documents:
list[~azure.cognitiveservices.language.textanalytics.models.Input]
"""

_attribute_map = {
'documents': {'key': 'documents', 'type': '[Input]'},
}

def __init__(self, *, documents=None, **kwargs) -> None:
super(BatchInput, self).__init__(**kwargs)
self.documents = documents
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class DetectedLanguage(Model):
'score': {'key': 'score', 'type': 'float'},
}

def __init__(self, name=None, iso6391_name=None, score=None):
super(DetectedLanguage, self).__init__()
self.name = name
self.iso6391_name = iso6391_name
self.score = score
def __init__(self, **kwargs):
super(DetectedLanguage, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.iso6391_name = kwargs.get('iso6391_name', None)
self.score = kwargs.get('score', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class DetectedLanguage(Model):
"""DetectedLanguage.

:param name: Long name of a detected language (e.g. English, French).
:type name: str
:param iso6391_name: A two letter representation of the detected language
according to the ISO 639-1 standard (e.g. en, fr).
:type iso6391_name: str
:param score: A confidence score between 0 and 1. Scores close to 1
indicate 100% certainty that the identified language is true.
:type score: float
"""

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'iso6391_name': {'key': 'iso6391Name', 'type': 'str'},
'score': {'key': 'score', 'type': 'float'},
}

def __init__(self, *, name: str=None, iso6391_name: str=None, score: float=None, **kwargs) -> None:
super(DetectedLanguage, self).__init__(**kwargs)
self.name = name
self.iso6391_name = iso6391_name
self.score = score
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class EntitiesBatchResult(Model):
"""EntitiesBatchResult.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar documents:
:vartype documents:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItem]
:ivar errors:
:vartype errors:
list[~azure.cognitiveservices.language.textanalytics.models.ErrorRecord]
"""

_validation = {
'documents': {'readonly': True},
'errors': {'readonly': True},
}

_attribute_map = {
'documents': {'key': 'documents', 'type': '[EntitiesBatchResultItem]'},
'errors': {'key': 'errors', 'type': '[ErrorRecord]'},
}

def __init__(self, **kwargs):
super(EntitiesBatchResult, self).__init__(**kwargs)
self.documents = None
self.errors = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class EntitiesBatchResultItem(Model):
"""EntitiesBatchResultItem.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Unique document identifier.
:vartype id: str
:ivar entities: Recognized entities in the document.
:vartype entities:
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecord]
"""

_validation = {
'id': {'readonly': True},
'entities': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'entities': {'key': 'entities', 'type': '[EntityRecord]'},
}

def __init__(self, **kwargs):
super(EntitiesBatchResultItem, self).__init__(**kwargs)
self.id = None
self.entities = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class EntitiesBatchResultItem(Model):
"""EntitiesBatchResultItem.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Unique document identifier.
:vartype id: str
:ivar entities: Recognized entities in the document.
:vartype entities:
list[~azure.cognitiveservices.language.textanalytics.models.EntityRecord]
"""

_validation = {
'id': {'readonly': True},
'entities': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'entities': {'key': 'entities', 'type': '[EntityRecord]'},
}

def __init__(self, **kwargs) -> None:
super(EntitiesBatchResultItem, self).__init__(**kwargs)
self.id = None
self.entities = None
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class EntitiesBatchResult(Model):
"""EntitiesBatchResult.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar documents:
:vartype documents:
list[~azure.cognitiveservices.language.textanalytics.models.EntitiesBatchResultItem]
:ivar errors:
:vartype errors:
list[~azure.cognitiveservices.language.textanalytics.models.ErrorRecord]
"""

_validation = {
'documents': {'readonly': True},
'errors': {'readonly': True},
}

_attribute_map = {
'documents': {'key': 'documents', 'type': '[EntitiesBatchResultItem]'},
'errors': {'key': 'errors', 'type': '[ErrorRecord]'},
}

def __init__(self, **kwargs) -> None:
super(EntitiesBatchResult, self).__init__(**kwargs)
self.documents = None
self.errors = None
Loading