Skip to content

Commit

Permalink
Merge branch 'master' into 6505_rasa_convert_bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
rasabot authored Sep 9, 2020
2 parents 3b73648 + c3b5ccb commit 752382a
Show file tree
Hide file tree
Showing 38 changed files with 3,547 additions and 2,602 deletions.
4 changes: 4 additions & 0 deletions .typo-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,16 @@ dictionaries:
excluded_files:
- "*.py"
- "*.css"
- "*.scss"
- "*.yml"
- "*.yaml"
- "*.html"
- "*.json"
- "*.lock"
- "*.js"
- "*.jsx"
- "*.ts"
- "*.tsx"
- "*.md"
- "CHANGELOG.mdx"
- "CODE_OF_CONDUCT.md"
Expand Down
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Local Netlify folder
.netlify
3 changes: 3 additions & 0 deletions docs/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
11 changes: 3 additions & 8 deletions docs/docs/index.mdx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
---
id: index
sidebar_label: Docs Home
slug: /
sidebar_label: Introduction
title: Contextual assistants with Rasa Open Source
description: Learn more about open-source natural language processing library Rasa for conversation handling, intent classification and entity extraction in on premise chatbots.
abstract: Rasa is an open source machine learning framework for automated text and voice-based conversations. Understand messages, hold conversations, and connect to messaging channels and APIs.
---
<!-- this file is version specific, do not use `@site/...` syntax -->

Rasa is an open source machine learning framework for automated text and voice-based
conversations. Understand messages, hold conversations, and connect to messaging
channels and APIs.

Let's get started and [prototype an assistant](prototype-an-assistant.mdx)!

Expand All @@ -20,4 +16,3 @@ Coming from Rasa Open Source 1.x? Check out our [1.x to 2.x migration guide](mig
These docs are for Rasa Open Source 2.0 and later. You can find documentation for Rasa
Open Source 1.x at [https://legacy-docs-v1.rasa.com](https://legacy-docs-v1.rasa.com).
:::

18 changes: 2 additions & 16 deletions docs/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ description: Install Rasa Open Source on premises to enable local and customizab
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import { Button } from '@theme/Button';

## Quick Installation

Expand All @@ -30,8 +31,6 @@ your machine and continue development locally.
<a className="button button--outline button button" href="prototype-an-assistant">Prototype an Assistant</a>
:::

<a aria-hidden="true" tabIndex="-1" className="anchor enhancedAnchor" id="installation-guide"></a>

## Step-by-step Installation Guide

Prefer following video instructions? Watch our installation series on
Expand Down Expand Up @@ -173,11 +172,7 @@ without root privileges.
Next step: Start prototyping your first assistant online and download it afterwards


<a className="button button--outline button--secondary button--lg" href="prototype-an-assistant">Prototype an Assistant</a>

---

<a aria-hidden="true" tabIndex="-1" className="anchor enhancedAnchor" id="build-from-source"></a>
<Button as="a" href="prototype-an-assistant">Prototype an Assistant</Button>

## Building from Source

Expand All @@ -190,11 +185,6 @@ cd rasa
poetry install
```


---

<a aria-hidden="true" tabIndex="-1" className="anchor enhancedAnchor" id="pipeline-dependencies"></a>

## Additional Dependencies

For some machine learning algorithms you need to install additional python packages.
Expand All @@ -214,8 +204,6 @@ to install all needed dependencies for every configuration.

:::

<a aria-hidden="true" tabIndex="-1" className="anchor enhancedAnchor" id="install-spacy"></a>

### Dependencies for spaCy

For more information on spaCy, check out the [spaCy docs](https://spacy.io/usage/models).
Expand All @@ -234,8 +222,6 @@ for the English language. We recommend using at least the
default small `en_core_web_sm` model. Small models require less
memory to run, but will somewhat reduce intent classification performance.

<a aria-hidden="true" tabIndex="-1" className="anchor enhancedAnchor" id="install-mitie"></a>

### Dependencies for MITIE

First, run
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/prototype-an-assistant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_label: 'Prototype an Assistant'
title: 'Prototype an Assistant'
---
import useBaseUrl from '@docusaurus/useBaseUrl';
import Prototyper, { Chat, DownloadButton, TrainButton } from '@site/src/components/prototyper';
import Prototyper, { DownloadButton, TrainButton } from '@theme/Prototyper';

Get started with Rasa Open Source and learn how to create an assistant from scratch!

Expand Down
25 changes: 5 additions & 20 deletions docs/docs/testing-your-assistant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ sidebar_label: Testing Your Assistant
title: Testing Your Assistant
description: Test your Rasa Open Source assistant to validate and improve your conversations
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

Rasa Open Source lets you test dialogues end-to-end by running through
test stories. The test makes sure that user messages are processed correctly
Expand All @@ -16,7 +14,6 @@ separately.
:::note
If you are looking to tune the hyperparameters of your NLU model,
check out this [tutorial](https://blog.rasa.com/rasa-nlu-in-depth-part-3-hyperparameters/).

:::

## End-to-End Testing
Expand Down Expand Up @@ -201,25 +198,13 @@ called `nlu_comparison_results`.

### Intent Classification

The evaluation script will produce a report, confusion matrix,
and confidence histogram for your model.
The evaluation script will produce a report, confusion matrix, and confidence histogram for your model.

The report logs precision, recall and f1 measure for
each intent and entity, as well as providing an overall average.
You can save these reports as JSON files using the `--report` argument.
The report logs precision, recall and f1 measure for each intent and entity, as well as providing an overall average. You can save these reports as JSON files using the `--report` argument.

The confusion matrix shows you which intents are mistaken for others; any samples which have been incorrectly predicted are logged and saved to a file called `errors.json` for easier debugging.

The confusion matrix shows you which
intents are mistaken for others; any samples which have been
incorrectly predicted are logged and saved to a file
called `errors.json` for easier debugging.

The histogram that the script produces allows you to visualise the
confidence distribution for all predictions,
with the volume of correct and incorrect predictions being displayed by
blue and red bars respectively.
Improving the quality of your training data will move the blue
histogram bars to the right and the red histogram bars
to the left of the plot.
The histogram that the script produces allows you to visualise the confidence distribution for all predictions, with the volume of correct and incorrect predictions being displayed by blue and red bars respectively. Improving the quality of your training data will move the blue histogram bars to the right and the red histogram bars to the left of the plot.

:::caution
If any of your entities are incorrectly annotated, your evaluation may fail. One common problem
Expand Down
172 changes: 106 additions & 66 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,108 +1,148 @@
const path = require('path');
const remarkSources = require('remark-sources');
const remarkCollapse = require('remark-collapse');
const { remarkProgramOutput } = require("./plugins/program_output");
const { remarkProgramOutput } = require('./plugins/program_output');
const {
rehypePlugins: themeRehypePlugins,
remarkPlugins: themeRemarkPlugins,
} = require('@rasahq/docusaurus-theme-tabula');


// FIXME: remove "next/" when releasing + remove the "next/" in
// http://github.com/RasaHQ/rasa-website/blob/master/netlify.toml
const BASE_URL = '/docs/rasa/next/';
const SITE_URL = 'https://rasa.com';

// NOTE: this allows switching between local dev instances of rasa/rasa-x
const isDev = process.env.NODE_ENV === 'development';
const SWAP_URL = isDev ? 'http://localhost:3001' : SITE_URL;

/* VERSIONING: WIP */

const routeBasePath = '/';
let versions = [];
try {
versions = require('./versions.json');
} catch (ex) {
// Nothing to do here, in dev mode, only
// one version of the doc is available
}
try { versions = require('./versions.json'); } catch (ex) { console.info('no versions.json file found; assuming dev mode.') }

const legacyVersion = {
label: 'Legacy 1.x',
to: 'https://legacy-docs-v1.rasa.com',
href: 'https://legacy-docs-v1.rasa.com',
target: '_self',
};

const allVersions = {
label: 'Versions',
to: '/', // "fake" link
position: 'left',
items: versions.length > 0 ? [
{
label: versions[0],
to: '/',
activeBaseRegex: versions[0],
},
...versions.slice(1).map((version) => ({
label: version,
to: `${version}/`,
activeBaseRegex: version,
})),
{
label: 'Master/Unreleased',
to: 'next/',
activeBaseRegex: `next`,
},
legacyVersion,
]
: [
{
label: 'Master/Unreleased',
to: '/',
activeBaseRegex: `/`,
},
legacyVersion,
],
}

module.exports = {
customFields: {
// NOTE: all non-standard options should go in this object
},
title: 'Rasa Open Source Documentation',
tagline: 'Rasa Open Source Documentation',
url: 'https://rasa.com',
// FIXME: when deploying this for real, change to '/docs/rasa/'
baseUrl: '/docs/rasa/next/',
favicon: 'img/favicon.ico',
tagline: 'An open source machine learning framework for automated text and voice-based conversations',
url: SITE_URL,
baseUrl: BASE_URL,
favicon: '/img/favicon.ico',
organizationName: 'RasaHQ',
projectName: 'rasa',
themeConfig: {
colorMode: {
defaultMode: 'light',
disableSwitch: true,
},
navbar: {
hideOnScroll: false,
title: 'Rasa Open Source',
logo: {
alt: 'Rasa',
src: 'https://rasa.com/static/60e441f8eadef13bea0cc790c8cf188b/rasa-logo.svg',
alt: 'Rasa Logo',
src: `/img/rasa-logo.svg`,
href: SITE_URL,
},
items: [
{
label: 'Docs',
to: '/', // "fake" link
label: 'Rasa Open Source',
to: path.join('/', BASE_URL),
position: 'left',
},
{
label: 'Rasa X',
position: 'left',
items: versions.length > 0 ? [
{
label: versions[0],
to: '/',
activeBaseRegex: versions[0],
},
...versions.slice(1).map((version) => ({
label: version,
to: `${version}/`,
activeBaseRegex: version,
})),
{
label: 'Master/Unreleased',
to: 'next/',
activeBaseRegex: `next`,
},
legacyVersion,
] : [
{
label: 'Master/Unreleased',
to: '/',
activeBaseRegex: `/`,
},
legacyVersion,
],
href: `${SWAP_URL}/docs/rasa-x/next/`,
target: '_self',
},
{
href: 'https://github.com/rasahq/rasa',
label: 'GitHub',
target: '_self',
href: 'http://blog.rasa.com/',
label: 'Blog',
position: 'right',
},
{
target: '_self',
href: `${SITE_URL}/community/join/`,
label: 'Community',
position: 'right',
},
],
},
footer: {
style: 'dark',
copyright: `Copyright © ${new Date().getFullYear()} Rasa Technologies GmbH`,
},
gtm: {
containerID: 'GTM-PK448GB',
},
},
themes: [
['@docusaurus/theme-classic', {
customCss: require.resolve('./src/css/custom.css'),
}],
path.resolve(__dirname, './themes/theme-live-codeblock'),
'@rasahq/docusaurus-theme-tabula',
path.resolve(__dirname, './themes/theme-custom')
],
plugins: [
['@docusaurus/plugin-content-docs', {
// https://v2.docusaurus.io/docs/next/docs-introduction/#docs-only-mode
routeBasePath: '/',
// It is recommended to set document id as docs home page (`docs/` path).
homePageId: 'index',
['@docusaurus/plugin-content-docs/', {
routeBasePath,
sidebarPath: require.resolve('./sidebars.js'),
editUrl: 'https://github.com/rasahq/rasa/edit/master/docs/',
showLastUpdateTime: true,
showLastUpdateAuthor: true,
rehypePlugins: [
...themeRehypePlugins,
],
remarkPlugins: [
[ remarkCollapse, { test: '' }],
remarkSources,
remarkProgramOutput
...themeRemarkPlugins,
remarkProgramOutput,
],
}],
['@docusaurus/plugin-sitemap', {
cacheTime: 600 * 1000, // 600 sec - cache purge period
changefreq: 'weekly',
priority: 0.5,
}],
path.resolve(__dirname, './plugins/google-tagmanager'),
],
['@docusaurus/plugin-content-pages', {}],
['@docusaurus/plugin-sitemap',
{
cacheTime: 600 * 1000, // 600 sec - cache purge period
changefreq: 'weekly',
priority: 0.5,
}],
isDev && ['@docusaurus/plugin-debug', {}],
[path.resolve(__dirname, './plugins/google-tagmanager'), {}],
].filter(Boolean),
};
Loading

0 comments on commit 752382a

Please sign in to comment.