Skip to content

Commit

Permalink
adding example 1
Browse files Browse the repository at this point in the history
  • Loading branch information
saransh-mehta committed Jun 9, 2020
1 parent d40e4bd commit 250cfc2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 6 deletions.
32 changes: 32 additions & 0 deletions docs/source/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
Examples
===========
Here you can find various conversational AI tasks as examples and can train multi-task models
in simple steps mentioned in the notebooks.

Example-1 Intent detection, NER, Fragment detection
---------------------------------------------------

**Tasks Description**

``Intent Detection`` :- This is a single sentence classification task where an `intent` specifies which class the data sample belongs to.
Intent detection is one of the fundamental components for conversational system as it gives a broad understand of the category/domain the sentence/query belongs to.

``NER`` :- This is a Named Entity Recognition/ Sequence Labelling/ Slot filling task where individual words of the sentence are tagged with an entity label it belongs to.
The words which don't belong to any entity label are simply labeled as "O". NER helps in extracting values for required entities (eg. location, date-time) from query.

``Fragment Detection`` :- This is modeled as a single sentence classification task which detects whether a sentence is incomplete (fragment) or not (non-fragment).
This is a very useful piece in conversational system as knowing if a query/sentence is incomplete can aid in discarding bad queries beforehand.

**Data** :- In this example, we are using the `SNIPS <"https://snips-nlu.readthedocs.io/en/latest/dataset.html">`_ data for intent and entity detection. For the sake of simplicity, we provide
the data in simpler form under ``snips_data`` directory taken from `here <"https://github.com/LeePleased/StackPropagation-SLU/tree/master/data/snips">`_.

**Transform file** :- `transform_file_snips <https://github.com/hellohaptik/multi-task-NLP/blob/master/examples/intent_ner_fragment/transform_file_snips.yml>`_

**Tasks file** :- `tasks_file_snips <https://github.com/hellohaptik/multi-task-NLP/blob/master/examples/intent_ner_fragment/tasks_file_snips.yml>`_

**Notebook** :- `intent_ner_fragment <https://github.com/hellohaptik/multi-task-NLP/blob/master/examples/intent_ner_fragment/intent_ner_fragment.ipynb>`_

Example-2 Textual entailment
----------------------------


6 changes: 5 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ and with **no requirement to code!!**
Examples
--------
We provide exemplar notebooks to demonstrate some conversational AI tasks which can be perfomed using our library.
You can follow along the to understand and train a multi-task model for the tasks.
You can follow along the `notebooks <https://github.com/hellohaptik/multi-task-NLP/tree/master/examples/>`_ to understand and train a multi-task model for the tasks.

.. toctree::
:maxdepth: 2

examples

Step by Step Guide
------------------
Expand Down
9 changes: 4 additions & 5 deletions examples/intent_ner_fragment/intent_ner_fragment.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@
"\n",
"``Intent Detection`` :- This is a single sentence classification task where an `intent` specifies which class the data sample belongs to. Intent detection is one of the fundamental components for conversational system as it gives a broad understand of the category/domain the sentence/query belongs to. \n",
"\n",
"``NER`` :- This is a Named Entity Recognition/ Sequence Labelling/ Slot filling task where individual words of the sentence are tagged with an entity label it belongs to. The words which don't belong to any entity label are simply labeled as \"O\". NER\n",
"``NER`` :- This is a Named Entity Recognition/ Sequence Labelling/ Slot filling task where individual words of the sentence are tagged with an entity label it belongs to. The words which don't belong to any entity label are simply labeled as \"O\". NER helps in extracting values for required entities (eg. location, date-time) from query.\n",
"\n",
"``Fragment Detection`` :- This is modeled as a single sentence classification task which detects whether a sentence is incomplete (fragment) or not (non-fragment). This is a very useful piece in conversational system as knowing if a query/sentence is incomplete beforehand aids in \n",
"``Fragment Detection`` :- This is modeled as a single sentence classification task which detects whether a sentence is incomplete (fragment) or not (non-fragment). This is a very useful piece in conversational system as knowing if a query/sentence is incomplete can aid in discarding bad queries beforehand.\n",
"\n",
"\n",
"**Data** :- In this example, we are using the <a href= \"https://snips-nlu.readthedocs.io/en/latest/dataset.html\">SNIPS</a> data for intent and entity detection. For the sake of simplicity, we provide \n",
"the data in simpler form under ``snips_data`` directory taken from <a href = \"https://github.com/LeePleased/StackPropagation-SLU/tree/master/data/snips\">here</a>.\n"
"**Data** :- In this example, we are using the <a href=\"https://snips-nlu.readthedocs.io/en/latest/dataset.html\">SNIPS</a> data for intent and entity detection. For the sake of simplicity, we provide \n",
"the data in simpler form under ``snips_data`` directory taken from <a href=\"https://github.com/LeePleased/StackPropagation-SLU/tree/master/data/snips\">here</a>.\n"
]
},
{
Expand Down

0 comments on commit 250cfc2

Please sign in to comment.