A Python interface to Microsoft LUIS.
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
luis-2.0.2.tar.gz
(5.3 kB
view details)
File details
Details for the file luis-2.0.2.tar.gz
.
File metadata
- Download URL: luis-2.0.2.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f548f88001d821bb22764f2e55c5bb873f1c11361cfb6ed702580c50d0a94f5b |
|
MD5 | 3cfc4c0126904e2feb9075b843603cfa |
|
BLAKE2b-256 | 3a498e6a31e1ddb1673e2e6e912ffb5abc7d1da97d9d79b1aa8a37d0732b756b |