All Projects → RasaHQ → rasa-nlu-examples

RasaHQ / rasa-nlu-examples

Licence: Apache-2.0 License
This repository contains examples of custom components for educational purposes.

Programming Languages

python
139335 projects - #7 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to rasa-nlu-examples

rasa-bert-finetune
支持rasa-nlu 的bert finetune
Stars: ✭ 46 (-63.49%)
Mutual labels:  rasa-nlu, rasa
clofus-chatbot
Clofus® Chat bot Platform using rasa core and rasa nlu similar to rasa x but opensource demo https://clofus.github.io/clofus-chatbot/
Stars: ✭ 61 (-51.59%)
Mutual labels:  rasa-nlu, rasa
Django-Rasa-Bot
Integrating Rasa Core with Django backend and finally using Webchat for chatbot user interface
Stars: ✭ 30 (-76.19%)
Mutual labels:  rasa-nlu, rasa
GSTFAQChatbot
Set of scripts to build a chatbot which will answer FAQ about Goods and Services Tax (GST) India.
Stars: ✭ 37 (-70.63%)
Mutual labels:  rasa-nlu, rasa
rasa-action-server-gha
A GitHub Action that simplifies using Rasa Actions and helps to prepare a Docker image with custom actions.
Stars: ✭ 36 (-71.43%)
Mutual labels:  rasa
rasa ch faq
用 rasa 实现 rasa demo 机器人,有一些惊奇的功能,faq,图谱,多轮等
Stars: ✭ 156 (+23.81%)
Mutual labels:  rasa
rasa-docker-arm
Rasa Docker image for ARMv7. Runs on a Raspberry Pi.
Stars: ✭ 19 (-84.92%)
Mutual labels:  rasa
rasa-train-test-gha
A GitHub action to run easily rasa train and rasa test in the CIs.
Stars: ✭ 26 (-79.37%)
Mutual labels:  rasa
rasa milktea chatbot
Chatbot with bert chinese model, base on rasa framework(中文聊天机器人,结合bert意图分析,基于rasa框架)
Stars: ✭ 97 (-23.02%)
Mutual labels:  rasa
rasa-chatbot
Sample chatbot with rasa stack
Stars: ✭ 29 (-76.98%)
Mutual labels:  rasa
bot
Python Bot using RASA for NLP
Stars: ✭ 28 (-77.78%)
Mutual labels:  rasa-nlu
opensnips
Open source projects related to Snips https://snips.ai/.
Stars: ✭ 50 (-60.32%)
Mutual labels:  rasa
Jatbot
自动聊天软件,支持中英文,采用最新版rasa引擎,可进行意图识别、多轮对话、动作跟踪等功能,自动引导客户消费,应答客户咨询。【Automatic chat software, supporting Chinese and English, using the latest version of Rasa engine, can carry out intention recognition, multi-round dialogue, action tracking and other functions, automatically guide customers to consume, respond to customer consultation.】
Stars: ✭ 22 (-82.54%)
Mutual labels:  rasa
rasa-agent-bot-demo
A sample Implementation of agent bot APIs in chatwoot using rasa
Stars: ✭ 21 (-83.33%)
Mutual labels:  rasa
FAQ Chatbot Rasa
FAQ's answering chatbot using open source chatbot framework Rasa Stack
Stars: ✭ 33 (-73.81%)
Mutual labels:  rasa-nlu
CHIT-CHAT
A Covid-19 Chatbot that aims to serve humans queries and give a feasible answer to their queries.
Stars: ✭ 18 (-85.71%)
Mutual labels:  rasa
app rasa chat bot
a stateless chat bot to perform natural language queries against the App Store top charts
Stars: ✭ 20 (-84.13%)
Mutual labels:  rasa
lockebot
LockeBot: a demonstration of implementing a basic question answering bot with use of Rasa and a database
Stars: ✭ 91 (-27.78%)
Mutual labels:  rasa
BotFlow
BotFlow - visual content manager for simple Rasa chatbots
Stars: ✭ 27 (-78.57%)
Mutual labels:  rasa
rasa-site-bot
A chatbot that fetches events details from a conference's website
Stars: ✭ 81 (-35.71%)
Mutual labels:  rasa-nlu

Rasa NLU Examples

This repository contains Rasa compatible machine learning components. These components are open sourced in order to encourage experimentation and to quickly offer support to more tools. By hosting these components here they do not need to go through the same vetting process as the components in Rasa and we hope that this makes it easier for people to contribute new ideas.

The components in the repository are not officially supported. There will be units tests as well as documentation but this project should be considered a community project, not something that is part of core Rasa. If there's a component here that turns out to be useful to the larger Rasa community then we might port features from this repository to Rasa.

Install

To use these tools locally you need to install via git.

python -m pip install "rasa_nlu_examples @ git+https://github.com/RasaHQ/rasa-nlu-examples.git"

Note that if you want to install optional dependencies as well that you'll need to run:

python -m pip install "rasa_nlu_examples[flashtext] @ git+https://github.com/RasaHQ/rasa-nlu-examples.git"
python -m pip install "rasa_nlu_examples[dateparser] @ git+https://github.com/RasaHQ/rasa-nlu-examples.git"
python -m pip install "rasa_nlu_examples[thai] @ git+https://github.com/RasaHQ/rasa-nlu-examples.git"
python -m pip install "rasa_nlu_examples[fasttext] @ git+https://github.com/RasaHQ/rasa-nlu-examples.git"
python -m pip install "rasa_nlu_examples[all] @ git+https://github.com/RasaHQ/rasa-nlu-examples.git"

If you're using any models that depend on spaCy you'll need to install the Rasa dependencies for spaCy first.

python -m pip install rasa[spacy]

Documentation

You can find the documentation for this project here.

Compatibility

This project currently supports components for Rasa 3.0. For older versions, see the list below.

Tokenizers

Tokenizers can split up the input text into tokens. Depending on the Tokenizer that you pick you can also choose to apply lemmatization. For languages that have rich grammatical features this might help reduce the size of all the possible tokens.

  • rasa_nlu_examples.tokenizers.BlankSpacyTokenizer docs
  • rasa_nlu_examples.tokenizers.ThaiTokenizer docs

Featurizers

Dense featurizers attach dense numeric features per token as well as to the entire utterance. These features are picked up by intent classifiers and entity detectors later in the pipeline.

  • rasa_nlu_examples.featurizers.dense.FastTextFeaturizer docs
  • rasa_nlu_examples.featurizers.dense.BytePairFeaturizer docs
  • rasa_nlu_examples.featurizers.dense.GensimFeaturizer docs
  • rasa_nlu_examples.featurizers.sparse.TfIdfFeaturizer docs
  • rasa_nlu_examples.featurizers.sparse.HashingFeaturizer docs

Intent Classifiers

Intent classifiers are models that predict an intent from a given user message text. The default intent classifier in Rasa NLU is the DIET model which can be fairly computationally expensive, especially if you do not need to detect entities. We provide some examples of alternative intent classifiers here.

  • rasa_nlu_examples.classifiers.NaiveBayesClassifier docs
  • rasa_nlu_examples.classifiers.LogisticRegressionClassifier docs

Entity Extractors

  • rasa_nlu_examples.extractor.FlashTextEntityExtractor docs
  • rasa_nlu_examples.extractor.DateparserEntityExtractor docs

Name Lists

Language models are typically trained on Western datasets. That means that the reported benchmarks might not apply to your use-case. For example; detecting names in texts from France is not the same thing as detecting names in Madagascar. Even though French is used actively in both countries, the names of it's citizens might be so different that you cannot assume that the benchmarks apply universally.

To remedy this we've started collecting name lists. These can be used as a lookup table which can be picked up by Rasa's RegexEntityExtractor or our FlashTextEntityExtractor. It won't be 100% perfect but it should give a reasonable starting point.

You can find the namelists here. We currently offer namelists for the United States, Germany as well as common Arabic names. Feel free to submit PRs for more languages. We're also eager to receive feedback.

Usage

You can install the examples from this repo via pip. Let's say you download the standard tools.

pip install git+https://github.com/RasaHQ/rasa-nlu-examples

Once installed you can add tools to your config.yml file, here's an example;

language: en
pipeline:
- name: WhitespaceTokenizer
- name: CountVectorsFeaturizer
  OOV_token: oov.txt
  analyzer: word
- name: CountVectorsFeaturizer
  analyzer: char_wb
  min_ngram: 1
  max_ngram: 4
- name: rasa_nlu_examples.featurizers.dense.BytePairFeaturizer
  lang: en
  vs: 1000
  dim: 25
- name: DIETClassifier
  epochs: 200

An example config for using the Thai tokenizer would look like:

language: th
pipeline:
  - name: rasa_nlu_examples.tokenizers.ThaiTokenizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: char_wb
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 200

And you can use this file to run benchmarks. From the root folder of the project typically that means running something like;

rasa test nlu --config basic-bytepair-config.yml \
          --cross-validation --runs 1 --folds 2 \
          --out gridresults/basic-bytepair-config

Open an Issue

If you've spotted a bug then you can submit an issue here. GitHub issues allow us to keep track of a conversation about this repository and it is the preferred communication channel for bugs related to this project.

Contribute

There are many ways you can contribute to this project.

  • You can suggest new features.
  • You can let us know if there are bugs.
  • You can share the results of an experiment you ran using these tools.
  • You can let us know if the components in this library help you.

Feel free to start the discussion by opening an issue on this repository. Before submitting code to the repository it would help if you first create an issue so that the maintainers can disucss the changes you would like to contribute. A more in-depth contribution guide can be found here.

To get started locally you can run:

python -m pip install -e ".[dev]"
pre-commit install
python tests/scripts/prepare_fasttext.py

Alternatively you may also run this via the Makefile:

make install

Documentation

If you want to build the documentation locally you can do so via;

mkdocs serve

If you want to deplot the docs to GitHub you can run;

mkdocs gh-deploy

This will deploy a new version to the docs branch, which is picked up by GitHub pages.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].