Metadata-Version: 2.0
Name: luis
Version: 0.0.1
Summary: A Python interface to Microsoft LUIS.
Home-page: https://github.com/wiseman/pyluis
Author: John Wiseman
Author-email: jjwiseman@gmail.com
License: MIT
Keywords: nlp nlu naturallanguage text classification development
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Human Machine Interfaces
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Requires-Dist: requests
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'

.. image:: https://travis-ci.org/wiseman/pyluis.svg?branch=master
    :target: https://travis-ci.org/wiseman/pyluis

pyluis
======

This is a Python interface to `Microsoft LUIS <https://luis.ai/>`
(Language Understanding Intelligent Service).

How to use it
-------------

After you have created and published your LUIS application, you can
use it to analyze text::

  >>> import luis

  # Use the URL LUIS gives you when you publish your app.
  >>> l = luis.Luis(url='https://https://api.projectoxford.ai/luis/...')

  # Send text to be analyzed:
  >>> r = l.analyze('fly forward 10 feet')

  # See all identified intents:
  >>> print r.intents
  [<Intent intent=u'TRANSLATE' score=1.0>,
   <Intent intent=u'None' score=0.015184097>,
   <Intent intent=u'ROTATE' score=0.00713030435>,
   ...]

  # See all identified entities:
  >>> print r.entities
  [<Entity entity=u'forward' type=u'FORWARD' score=0.9585199 start_index=4 end_index=10>,
   <Entity entity=u'10 feet' type=u'builtin.dimension' score=0.9829198 start_index=12 end_index=18>]

  # What was the highest-scored intent?
  >>> best = r.best_intent()
  >>> print best
  <Intent intent=u'TRANSLATE' score=1.0>
  >>> print best.intent
  u'TRANSLATE'
  >>> print best.score
  1.0


