RasaHQ / rasa

💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
https://rasa.com/docs/rasa/
Apache License 2.0
18.87k stars 4.63k forks source link

Load custom components by module & class Name #600

Closed TDehaene closed 7 years ago

TDehaene commented 7 years ago

Issue:

Hi,

On the website (http://bit.ly/2fkn4Ls) it is mentioned that there is currently no ability to integrate custom components, but they do reference the rasa.nlu_components.Component class to already have a look how to do this.

This had me a bit confused: does this mean it is possible or not?

Specifically, we have a lot of other (both NLP and non-NLP) Python components that we need to host, but we are asking ourselves the question if this can all be integrated in Rasa to have one stack.

For example: we would for instance like to implement a scoring algorithm that we have developed in Python, as well as a pre-trained Support Vector Machine model (via sklearn) that we have developed to classify the type of cuisine of a dish.

Furthermore, we would like to use TreeTagger as the main POS-tagging algorithm.

In your expertises, would you say Rasa can be configured and modified in a way to allow for these extra 'components', or not yet?

Thank you for any help or insight you could provide on this.

tmbo commented 7 years ago

@TDehaene alright, so we did a lot of work to make Rasa as modular as possible to allow extensions as you want to do them. Here are a few notes on what is possible right now:

tmbo commented 7 years ago

Just added that. You should be able to specify your component as part of the pipeline by just providing the module path, e.g.: "pipeline": ["nlp_spacy", "my_custom.module.MyComponent", "intent_classifier_sklearn"]

TDehaene commented 7 years ago

Thanks for the feedback, I'll definitely look deeper into the Custom Component class