These docs are for version 1.x of Rasa Open Source.

## User Guide

- [Installation](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/installation/)
- [Tutorial: Rasa Basics](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/rasa-tutorial/)
- [Tutorial: Building Assistants](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/building-assistants/)
- [Command Line Interface](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/command-line-interface/)
- [Architecture](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/architecture/)
- [Messaging and Voice Channels](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/messaging-and-voice-channels/)
- [Testing Your Assistant](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/testing-your-assistant/)
- [Setting up CI/CD](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/setting-up-ci-cd/)
- [Validate Data](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/validate-files/)
- [Configuring the HTTP API](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/configuring-http-api/)
- [Deploying Your Rasa Assistant](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/how-to-deploy/)
- [Cloud Storage](https://legacy-docs-v1.rasa.com/1.10.15/user-guide/cloud-storage/)

## NLU

- [About](https://legacy-docs-v1.rasa.com/1.10.15/nlu/about/)
- [Using NLU Only](https://legacy-docs-v1.rasa.com/1.10.15/nlu/using-nlu-only/)
- [Training Data Format](https://legacy-docs-v1.rasa.com/1.10.15/nlu/training-data-format/)
- [Language Support](https://legacy-docs-v1.rasa.com/1.10.15/nlu/language-support/)
- [Choosing a Pipeline](https://legacy-docs-v1.rasa.com/1.10.15/nlu/choosing-a-pipeline/)
- [Components](https://legacy-docs-v1.rasa.com/1.10.15/nlu/components/)
- [Entity Extraction](https://legacy-docs-v1.rasa.com/1.10.15/nlu/entity-extraction/)

## Core

- [About](https://legacy-docs-v1.rasa.com/1.10.15/core/about/)
- [Stories](https://legacy-docs-v1.rasa.com/1.10.15/core/stories/)
- [Domains](https://legacy-docs-v1.rasa.com/1.10.15/core/domains/)
- [Responses](https://legacy-docs-v1.rasa.com/1.10.15/core/responses/)
- [Actions](https://legacy-docs-v1.rasa.com/1.10.15/core/actions/)
- [Reminders and External Events](https://legacy-docs-v1.rasa.com/1.10.15/core/reminders-and-external-events/)
- [Policies](https://legacy-docs-v1.rasa.com/1.10.15/core/policies/)
- [Slots](https://legacy-docs-v1.rasa.com/1.10.15/core/slots/)
- [Forms](https://legacy-docs-v1.rasa.com/1.10.15/core/forms/)
- [Retrieval Actions](https://legacy-docs-v1.rasa.com/1.10.15/core/retrieval-actions/)
- [Interactive Learning](https://legacy-docs-v1.rasa.com/1.10.15/core/interactive-learning/)
- [Fallback Actions](https://legacy-docs-v1.rasa.com/1.10.15/core/fallback-actions/)
- [Knowledge Base Actions](https://legacy-docs-v1.rasa.com/1.10.15/core/knowledge-bases/)

## Conversation Design

- [Dialogue Elements](https://legacy-docs-v1.rasa.com/1.10.15/dialogue-elements/dialogue-elements/)
- [Small Talk](https://legacy-docs-v1.rasa.com/1.10.15/dialogue-elements/small-talk/)
- [Completing Tasks](https://legacy-docs-v1.rasa.com/1.10.15/dialogue-elements/completing-tasks/)
- [Guiding Users](https://legacy-docs-v1.rasa.com/1.10.15/dialogue-elements/guiding-users/)

## API Reference

- [Action Server](https://legacy-docs-v1.rasa.com/1.10.15/api/action-server/)
- [HTTP API](https://legacy-docs-v1.rasa.com/1.10.15/api/http-api/)
- [Jupyter Notebooks](https://legacy-docs-v1.rasa.com/1.10.15/api/jupyter-notebooks/)
- [Agent](https://legacy-docs-v1.rasa.com/1.10.15/api/agent/)
- [Custom NLU Components](https://legacy-docs-v1.rasa.com/1.10.15/api/custom-nlu-components/#)
- [Rasa SDK](https://legacy-docs-v1.rasa.com/1.10.15/api/rasa-sdk/)
- [Events](https://legacy-docs-v1.rasa.com/1.10.15/api/events/)
- [Tracker](https://legacy-docs-v1.rasa.com/1.10.15/api/tracker/)
- [Tracker Stores](https://legacy-docs-v1.rasa.com/1.10.15/api/tracker-stores/)
- [Event Brokers](https://legacy-docs-v1.rasa.com/1.10.15/api/event-brokers/)
- [Lock Stores](https://legacy-docs-v1.rasa.com/1.10.15/api/lock-stores/)
- [Training Data Importers](https://legacy-docs-v1.rasa.com/1.10.15/api/training-data-importers/)
- [Featurization of Conversations](https://legacy-docs-v1.rasa.com/1.10.15/api/core-featurization/)
- [TensorFlow Configuration](https://legacy-docs-v1.rasa.com/1.10.15/api/tensorflow_usage/)
- [Migration Guide](https://legacy-docs-v1.rasa.com/1.10.15/migration-guide/)
- [Rasa Open Source Change Log](https://legacy-docs-v1.rasa.com/1.10.15/changelog/)

## Migrate from (beta)

- [Dialogflow](https://legacy-docs-v1.rasa.com/1.10.15/migrate-from/google-dialogflow-to-rasa/)
- [Wit.ai](https://legacy-docs-v1.rasa.com/1.10.15/migrate-from/facebook-wit-ai-to-rasa/)
- [LUIS](https://legacy-docs-v1.rasa.com/1.10.15/migrate-from/microsoft-luis-to-rasa/)
- [IBM Watson](https://legacy-docs-v1.rasa.com/1.10.15/migrate-from/ibm-watson-to-rasa/)

## Reference

- [Glossary](https://legacy-docs-v1.rasa.com/1.10.15/glossary/)

# Custom NLU Components

You can create a custom component to perform a specific task which NLU doesn’t currently offer (for example, sentiment analysis). Below is the specification of the [`rasa.nlu.components.Component`](https://legacy-docs-v1.rasa.com/1.10.15/api/custom-nlu-components/#rasa.nlu.components.Component "rasa.nlu.components.Component") class with the methods you’ll need to implement.

Note: There is a detailed tutorial on building custom components [here](https://blog.rasa.com/enhancing-rasa-nlu-with-custom-components/).

You can add a custom component to your pipeline by adding the module path. So if you have a module called `sentiment` containing a `SentimentAnalyzer` class:

```
pipeline:
- name: "sentiment.SentimentAnalyzer"
```

Also be sure to read the section on the [Component Lifecycle](https://legacy-docs-v1.rasa.com/1.10.15/nlu/choosing-a-pipeline/#component-lifecycle).

To get started, you can use this skeleton that contains the most important methods that you should implement:

|     |     |
| --- | --- |
| ```<br>import typing<br>from typing import Any, Optional, Text, Dict, List, Type<br>from rasa.nlu.components import Component<br>from rasa.nlu.config import RasaNLUModelConfig<br>from rasa.nlu.training_data import Message, TrainingData<br>if typing.TYPE_CHECKING:<br>    from rasa.nlu.model import Metadata<br>class MyComponent(Component):<br>    """A new component"""<br>    @classmethod<br>    def required_components(cls) -> List[Type[Component]]:<br>        return []<br>    defaults = {}<br>    supported_language_list = None<br>    not_supported_language_list = None<br>    def __init__(self, component_config: Optional[Dict[Text, Any]] = None) -> None:<br>        super().__init__(component_config)<br>    def train(<br>        self,<br>        training_data: TrainingData,<br>        config: Optional[RasaNLUModelConfig] = None,<br>        **kwargs: Any,<br>    ) -> None:<br>        pass<br>    def process(self, message: Message, **kwargs: Any) -> None:<br>        pass<br>    def persist(self, file_name: Text, model_dir: Text) -> Optional[Dict[Text, Any]]:<br>        pass<br>    @classmethod<br>    def load(<br>        cls,<br>        meta: Dict[Text, Any],<br>        model_dir: Optional[Text] = None,<br>        model_metadata: Optional["Metadata"] = None,<br>        cached_component: Optional["Component"] = None,<br>        **kwargs: Any,<br>    ) -> "Component":<br>        if cached_component:<br>            return cached_component<br>        else:<br>            return cls(meta)<br>``` |

Note: If you create a custom tokenizer you should implement the methods of `rasa.nlu.tokenizers.tokenizer.Tokenizer`. The `train` and `process` methods are already implemented and you simply need to overwrite the `tokenize` method. `train` and `process` will automatically add a special token `__CLS__` to the end of list of tokens, which is needed further down the pipeline.

Note: If you create a custom featurizer you should return a sequence of features. E.g. your featurizer should return a matrix of size (number-of-tokens x feature-dimension). The feature vector of the `__CLS__` token should contain features for the complete message.
