Training is offline
-
for intent_classifier training python intent_classifier.py
training is done using hindiR
-
for ner training python train.py
-
all data files are in their corresponding folders hindi - native hindi data hindiR - hindi WX data (converted using wxc converter)
Prediction is done using api
- tornado server is used (will run on 8000 port by default)
- python BotServer.py will start the server
there are total 4 service
- ner (will do ner tagging)
curl -X POST
http://localhost:8000/ner/predict
-H 'Cache-Control: no-cache'
-H 'Postman-Token: 2b51822b-aa2e-b503-4ebf-e6a59e7c7f7a'
-H 'content-type: application/json'
-d '{ "queries":["मैं इंदिरानगर से यशवंतपुर रेलवे स्टेशन जाना चाहता हूं"] } '
result - { "data": { "output": [ { "Person": "मैं" }, { "Loc": "इंदिरानगर" }, { "Loc": "यशवंतपुर रेलवे स्टेशन" } ] } }
-
intent classification (smalltalk/cab_book) curl -X POST
http://localhost:8000/intent/predict
-H 'Cache-Control: no-cache'
-H 'Postman-Token: 32549c36-614c-5303-16a6-fddd523b7441'
-H 'content-type: application/json'
-d '{ "queries":["मैं इंदिरानगर से यशवंतपुर रेलवे स्टेशन जाना चाहता हूं"] } ' result - { "data": { "output": "cab_book" } } -
smalltalk response curl -X POST
http://localhost:8000/smalltalk/predict
-H 'Cache-Control: no-cache'
-H 'Postman-Token: d86247fa-3ad2-5d85-4012-e9f7305dd827'
-H 'content-type: application/json'
-d '{ "queries":["आप कैसे हैं?"] } ' result - { "data": { "output": "मैं ठीक हूं, आपके क्या हाल हैं?" } } -
all (it will run evrything in pipeline) curl -X POST
http://localhost:8000/smalltalk/predict
-H 'Cache-Control: no-cache'
-H 'Postman-Token: d86247fa-3ad2-5d85-4012-e9f7305dd827'
-H 'content-type: application/json'
-d '{ "queries":["आप कैसे हैं?"] } ' result - { "data": { "output": "मैं ठीक हूं, आपके क्या हाल हैं?" } }