Applying pipeline “tensorflow_embedding” of Rasa NLU - The Koch Family
The Koch Family The Koch Family

Latest news

جاري التحميل ...

Applying pipeline “tensorflow_embedding” of Rasa NLU


According to this nice article, there was a new pipeline released using a different approach from the standard one (spacy_sklearn). I wanted to give it a try to see whether it can help with improving bot’s accuracy.

After applying done, I gave an evaluation of “tensorflow_embedding”. It seemed to work better a bit. For example, I defined intents “greet” and “goodbye” with some following messages in my training data.

## intent:greet
- Hey! How are you?
- Hi! How can I help you?
- Good to see you!
- Nice to see you!
- Hi
- Hello
- Hi there

## intent:goodbye
- Bye
- Bye Bye
- See you later
- Take care
- Peace

In order to play around with Rasa NLU, I created a project here. You can have a look at this change from this pull request. Yay!

When I entered message “hi bot”, then bot with “tensorflow_embedding” could detect intent “greet” with better confidence scores rather than bot with “spacy_sklearn”. The following are responses after executing curl -X POST localhost:5000/parse -d '{"q": "Hi bot", "project": "ctraubot", "model": "nlu"}' | python -m json.tool
A response of bot with pipeline spacy_sklearn
{

"intent": {

"name": "greet",

"confidence": 0.8687479112327237

},

"entities": [],

"intent_ranking": [

{

"name": "greet",

"confidence": 0.8687479112327237

},

{

"name": "goodbye",

"confidence": 0.13125208876727643

}

],

"text": "Hi bot",

"project": "ctraubot",

"model": "nlu"

}
A response of bot with pipeline tensorflow_embedding
{

"intent": {

"name": "greet",

"confidence": 0.9777982831001282

},

"entities": [],

"intent_ranking": [

{

"name": "greet",

"confidence": 0.9777982831001282

},

{

"name": "goodbye",

"confidence": -0.08299092948436737

}

],

"text": "Hi bot",

"project": "ctraubot",

"model": "nlu"

}
By the way, I still need modules spacy and sklearn for a further usage of entity extraction.

Comments



If you like the content of our blog, we hope to stay in constant communication, just enter your email to subscribe to the blog's express mail to receive new blog updates, and you can send a message by clicking on the button next ...

إتصل بنا

About the site

author The Koch Family <<  Welcome! I'm so glad that you stopped by Your Modern Family blog. Together, we will talk about raising kids, organizing the home and saving money! and Tips & tricks and more…

< Learn more ←

Blog stats

Sparkline 2513183

All Copyrights Reserved

The Koch Family

2020