Closed barak-11 closed 5 years ago
@barak-11 I encouraged you to have a look a the tutorial part of documentation as everything is explained here.
Once you have trained and persisted an NLU engine, as you did, you can load it as follow:
from snips_nlu import SnipsNLUEngine
loaded_engine = SnipsNLUEngine.from_path("path/to/persisted_engine")
print(loaded_engine.parse("hello world")
Beginner question, I use Chatito to generate jsons, I get from there two jsons, one is for training and the other is for testing. After I run the following command:
snips-nlu train path/to/chatito/training.json path/to/persisted_engine
I get a new folder called 'persisted_engine', I navigate to the new folder and there there are few folders:builtin_entity_parser
lookup_intent_parser
probabilistic_intent_parser custom_entity_parser
nlu_engine.json
resources
My question is, how do I use the trained model above in my code? I tried the following:
I also tried referencing the nlu_engine.json file but same results
but got the following error:
snips_nlu.exceptions.DatasetFormatError: Expected dataset to have key: 'intents'
Of course if I use the training file downloaded from Chatito instead, it works fine.Please assist