Skip to content

botshot/botshot-nlu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Botshot NLU

A tiny NLU wrapper/library for Botshot.

Training

To train your model, you will need a nlu_config.yml file and some training examples.

bots-nlu train --config examples/dataset-2/nlu-config.yml --model-path model

Parsing from CLI

To test your NLU model, you can run:

bots-nlu parse --model-path model

Then you can pass sentences from stdin.

hello world
{'intent': [{'value': ['"greeting"'], 'confidence': 0.97691810131073}]}
cyan
{'intent': [{'value': [None], 'confidence': 0.7010939121246338}], 'color': [{'value': 'cyan', 'similar_to': 'blue', 'confidence': 0.7178704203026286}]}
red apples
{'intent': [{'value': [None], 'confidence': 0.7010939121246338}], 'color': [{'value': 'red', 'similar_to': 'red', 'confidence': 1.0}], 'fruit': [{'value': 'apples', 'similar_to': 'apple', 'confidence': 0.8046471605767275}]}

Running as a server

You will need a web server like gunicorn.

gunicorn 'botshot_nlu.server:api("model_dir")'

Then you can call for example http://localhost:8000/parse?text=Hello world.

License

(c) Matus Zilinec 2019. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages