Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rasa NLU parser/matcher #336

Merged
merged 21 commits into from Jan 13, 2018
Merged

Conversation

jacobtomlinson
Copy link
Member

@jacobtomlinson jacobtomlinson commented Nov 8, 2017

Description

This is my first attempt at #335.

This change adds a new parser/matcher pair for Rasa NLU. This is pretty standard and follows the same format as Dialogflow/LUIS/Wit.

However Rasa can also be trained directly through the API so this PR adds the ability to include intents in your skills in the Rasa markdown format (see the rasa branch of the hello skill for an example). Then when opsdroid starts it runs an extra train_parsers method which sends the intents to Rasa NLU to be trained into a model which will be used when parsing messages. This simplifies the portability of NLU skills as the intents don't have to be recreated and retrained by each user. This has also been added as a standard section of startup in the hope that something similar could be added for the other NLU engines. I have a feeling that LUIS can also be trained via API, not sure about the others.

Fixes #335

Status

UNDER DEVELOPMENT

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

  • Run the Rasa NLU container docker run --rm -p 5000:5000 rasa/rasa_nlu:0.10.5-full.
  • Configure the hello skill but using the rasa branch.
  • Run opsdroid.

Checklist:

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (if applicable)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@codecov
Copy link

codecov bot commented Nov 9, 2017

Codecov Report

Merging #336 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #336    +/-   ##
======================================
  Coverage     100%   100%            
======================================
  Files          17     18     +1     
  Lines         877   1023   +146     
======================================
+ Hits          877   1023   +146
Impacted Files Coverage Δ
opsdroid/parsers/rasanlu.py 100% <100%> (ø)
opsdroid/core.py 100% <100%> (ø) ⬆️
opsdroid/loader.py 100% <100%> (ø) ⬆️
opsdroid/matchers.py 100% <100%> (ø) ⬆️
opsdroid/const.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4de77b8...fbe135a. Read the comment docs.

@opsdroid opsdroid deleted a comment from coveralls Jan 1, 2018
@opsdroid opsdroid deleted a comment from coveralls Jan 1, 2018
@opsdroid opsdroid deleted a comment from coveralls Jan 1, 2018
@jacobtomlinson jacobtomlinson changed the title [WIP] Add Rasa NLU parser/matcher Add Rasa NLU parser/matcher Jan 13, 2018
@jacobtomlinson jacobtomlinson merged commit 8064b9f into opsdroid:master Jan 13, 2018
@jacobtomlinson jacobtomlinson deleted the rasanlu branch January 13, 2018 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant