Skip to content

Commit

Permalink
docs: refactor structure, add tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolay-bushkov committed Jul 23, 2018
1 parent 3c10c31 commit 5e6633a
Show file tree
Hide file tree
Showing 19 changed files with 113 additions and 25 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
46 changes: 25 additions & 21 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
.. DeepPavlov documentation master file, created by
sphinx-quickstart on Mon Jul 16 10:56:14 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to DeepPavlov's documentation!
======================================

.. toctree::
:glob:
:maxdepth: 1
:caption: Getting Started
:caption: Intro

Installation <userdocs/installation>
Hello bot! <userdocs/hello_bot>
Pre-trained word vectors <userdocs/pretrained_vectors>
Parameters evolution <userdocs/parameters_evolution>
Hello bot! <intro/hello_bot>
Installation <intro/installation>
Pre-trained word vectors <intro/pretrained_vectors>
Parameters evolution <intro/parameters_evolution>
Tutorials <intro/tutorials>


.. toctree::
:glob:
:maxdepth: 1
:caption: Components

Classification <userdocs/classifiers>
Slot filling <userdocs/slot_filling>
Goal-Oriented Dialogue Bot <userdocs/go_bot>
Sequence-To-Sequence Dialogue Bot <userdocs/seq2seq_go_bot>
Named Entity Recognition <userdocs/ner>
Spelling Correction <userdocs/spelling_correction>
TF-IDF Ranking <userdocs/tfidf_ranking>
Neural Ranking <userdocs/neural_ranking>
Context Question Answering <userdocs/squad>
Open-Domain Question Answering <userdocs/odqa>
Morphological Tagger <userdocs/morphotagger>
Classification <components/classifiers>
Slot filling <components/slot_filling>
Goal-Oriented Dialogue Bot <components/go_bot>
Sequence-To-Sequence Dialogue Bot <components/seq2seq_go_bot>
Named Entity Recognition <components/ner>
Spelling Correction <components/spelling_correction>
TF-IDF Ranking <components/tfidf_ranking>
Neural Ranking <components/neural_ranking>
Context Question Answering <components/squad>
Morphological Tagger <components/morphotagger>


.. toctree::
:glob:
:maxdepth: 1
:caption: Skills

Pattern Matching <skills/pattern_matching>
Open-Domain Question Answering <skills/odqa>


.. toctree::
Expand Down
33 changes: 33 additions & 0 deletions docs/intro/hello_bot.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
This is "Hello, World!" example of simple bot implemented in DeepPavlov
=======================================================================

Import key components to build HelloBot.

.. code:: python
from deeppavlov.core.agent import Agent, HighestConfidenceSelector
from deeppavlov.skills.pattern_matching_skill import PatternMatchingSkill
Create skills as pre-defined responses for a user's input containing
specific keywords. Every skill returns response and confidence.

.. code:: python
hello = PatternMatchingSkill(responses=['Hello world! :)'], patterns=["hi", "hello", "good day"])
bye = PatternMatchingSkill(['Goodbye world! :(', 'See you around.'], ["bye", "chao", "see you"])
fallback = PatternMatchingSkill(["I don't understand, sorry :/", 'I can say "Hello world!" 8)'])
Agent executes skills and then takes response from the skill with the
highest confidence.

.. code:: python
HelloBot = Agent([hello, bye, fallback], skills_selector=HighestConfidenceSelector())
Give the floor to the HelloBot!

.. code:: python
print(HelloBot(['Hello!', 'Boo...', 'Bye.']))
`Jupyter notebook with HelloBot example. <https://github.com/deepmipt/DeepPavlov/blob/master/examples/hello_bot.ipynb>`__
File renamed without changes.
File renamed without changes.
File renamed without changes.
53 changes: 53 additions & 0 deletions docs/intro/tutorials.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
DeepPavlov tutorials
====================

Introduction to DeepPavlov
--------------------------

`Jupyter notebook <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/00_deeppavlov_intro.ipynb>`__ \|
`slides <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/00_deeppavlov_intro.pdf>`__

Install the library and understand a simple "Hello World!" Bot written
in 7 lines of code. Experiment with basic pattern matching rule-based
bot.

Data preparation in DeepPavlov
------------------------------

`Jupyter notebook <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/01_deeppavlov_data.ipynb>`__

Learn how to read and prepare data for trainable components.

Named Entity Recognition with DeepPavlov
----------------------------------------

`Jupyter notebook <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/02_deeppavlov_ner.ipynb>`__ \|
`slides <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/02_deeppavlov_ner.pdf>`__ \|
`video <https://youtu.be/6HlL87PWxXU>`__

Build a simple convolutional neural network to solve the named entity
recognition task. Master data downloading, preprocessing and batching
then train and score the model.

Task-oriented bot with DeepPavlov
---------------------------------

`Jupyter notebook <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/03_deeppavlov_gobot.ipynb>`__ \|
`slides <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/03_deeppavlov_gobot.pdf>`__ \|
`video <https://youtu.be/uvH1zB7qahI>`__

Intro to DeepPavlov configs - a powerfull method to stack models. Study
how to train 4 different task-oriented bots on DSTC2 dataset. These
include (1) a basic bot, (2) a bot with a database of restaurants, (3) a
bot with fasttext embeddings, (4) a bot with attention mechanism over
input words.

Chit-chat bot with DeepPavlov
-----------------------------

`Jupyter notebook <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/04_deeppavlov_chitchat.ipynb>`__ \|
`slides <https://github.com/deepmipt/DeepPavlov/tree/master/examples/tutorials/04_deeppavlov_chitchat.pdf>`__ \|
`video <https://youtu.be/G1TkCkoghC8>`__

Implement in DeepPavlov sequence-to-sequence encoder-decoder model with
attention mechanism and teacher forcing for chit-chat.
File renamed without changes.
2 changes: 2 additions & 0 deletions docs/skills/pattern_matching.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Pattern Matching Skill
======================
4 changes: 0 additions & 4 deletions docs/userdocs/hello_bot.rst

This file was deleted.

0 comments on commit 5e6633a

Please sign in to comment.