Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] cognitiveservices/data-plane/LUIS/Runtime #4260

Merged
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
5 changes: 5 additions & 0 deletions azure-cognitiveservices-language-luis/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/cognitiveservices/__init__.py
include azure/cognitiveservices/language/__init__.py

22 changes: 3 additions & 19 deletions azure-cognitiveservices-language-luis/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand All @@ -41,3 +22,6 @@ Provide Feedback
If you encounter any bugs or have suggestions, please file an issue in the
`Issues <https://github.com/Azure/azure-sdk-for-python/issues>`__
section of the project.


.. image:: https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-cognitiveservices-language-luis%2FREADME.png
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class LuisResult(Model):
"""Prediction, based on the input query, containing intent(s) and entities.

:param query: The input utterance that was analized.
:param query: The input utterance that was analyzed.
:type query: str
:param altered_query: The corrected utterance (when spell checking was
enabled).
Expand All @@ -37,6 +37,9 @@ class LuisResult(Model):
:param sentiment_analysis:
:type sentiment_analysis:
~azure.cognitiveservices.language.luis.runtime.models.Sentiment
:param connected_service_result:
:type connected_service_result:
~azure.cognitiveservices.language.luis.runtime.models.LuisResult
"""

_attribute_map = {
Expand All @@ -47,6 +50,7 @@ class LuisResult(Model):
'entities': {'key': 'entities', 'type': '[EntityModel]'},
'composite_entities': {'key': 'compositeEntities', 'type': '[CompositeEntityModel]'},
'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'Sentiment'},
'connected_service_result': {'key': 'connectedServiceResult', 'type': 'LuisResult'},
}

def __init__(self, **kwargs):
Expand All @@ -58,3 +62,4 @@ def __init__(self, **kwargs):
self.entities = kwargs.get('entities', None)
self.composite_entities = kwargs.get('composite_entities', None)
self.sentiment_analysis = kwargs.get('sentiment_analysis', None)
self.connected_service_result = kwargs.get('connected_service_result', None)
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
class LuisResult(Model):
"""Prediction, based on the input query, containing intent(s) and entities.

:param query: The input utterance that was analized.
:param query: The input utterance that was analyzed.
:type query: str
:param altered_query: The corrected utterance (when spell checking was
enabled).
Expand All @@ -37,6 +37,9 @@ class LuisResult(Model):
:param sentiment_analysis:
:type sentiment_analysis:
~azure.cognitiveservices.language.luis.runtime.models.Sentiment
:param connected_service_result:
:type connected_service_result:
~azure.cognitiveservices.language.luis.runtime.models.LuisResult
"""

_attribute_map = {
Expand All @@ -47,9 +50,10 @@ class LuisResult(Model):
'entities': {'key': 'entities', 'type': '[EntityModel]'},
'composite_entities': {'key': 'compositeEntities', 'type': '[CompositeEntityModel]'},
'sentiment_analysis': {'key': 'sentimentAnalysis', 'type': 'Sentiment'},
'connected_service_result': {'key': 'connectedServiceResult', 'type': 'LuisResult'},
}

def __init__(self, *, query: str=None, altered_query: str=None, top_scoring_intent=None, intents=None, entities=None, composite_entities=None, sentiment_analysis=None, **kwargs) -> None:
def __init__(self, *, query: str=None, altered_query: str=None, top_scoring_intent=None, intents=None, entities=None, composite_entities=None, sentiment_analysis=None, connected_service_result=None, **kwargs) -> None:
super(LuisResult, self).__init__(**kwargs)
self.query = query
self.altered_query = altered_query
Expand All @@ -58,3 +62,4 @@ def __init__(self, *, query: str=None, altered_query: str=None, top_scoring_inte
self.entities = entities
self.composite_entities = composite_entities
self.sentiment_analysis = sentiment_analysis
self.connected_service_result = connected_service_result
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def resolve(
:param spell_check: Enable spell checking.
:type spell_check: bool
:param bing_spell_check_subscription_key: The subscription key to use
when enabling bing spell check
when enabling Bing spell check
:type bing_spell_check_subscription_key: str
:param log: Log query (default is true)
:type log: bool
Expand Down
2 changes: 2 additions & 0 deletions azure-cognitiveservices-language-luis/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
version=version,
description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME),
long_description=readme + '\n\n' + history,
long_description_content_type='text/x-rst',
license='MIT License',
author='Microsoft Corporation',
author_email='[email protected]',
Expand All @@ -79,6 +80,7 @@
]),
install_requires=[
'msrest>=0.5.0',
'msrestazure>=0.4.32,<2.0.0',
'azure-common~=1.1',
],
extras_require={
Expand Down