This is a companion to the NLU concept guide, which is a detailed outline of the NLU module. Here weâll talk about usage issues specific to the Python client library.
ConfigurationAs mentioned in the concept guide, every NLU model will have three files:
vocab.txt
nlu.tflite
metadata.json
The path to the directory containing these files is passed as the model_dir
argument on initialization of the NLU.
As mentioned in the Getting Started guide, initializing the Spokestack NLU is just like other Spokestack components.
from spokestack.nlu.tflite import TFLiteNLU
nlu = TFLiteNLU("model_dir")
NLU Results
NLU results are returned in a wrapper that allows for easy access of the properties. The Result
class contains:
utterance
: unmodified transcript received by the NLUintent
: classified user intentconfidence
: model confidence in intent classificationslots
: slots tagged by the modelWant to dive deeper into the world of Android voice integration? We've got a lot to say on the subject:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4