Dialogy

https://app.travis-ci.com/skit-ai/dialogy.svg?branch=master https://coveralls.io/repos/github/skit-ai/dialogy/badge.svg?branch=master https://app.codacy.com/project/badge/Grade/03ab1c93c9354def81de73ba04b0d94c https://badge.fury.io/py/dialogy.svg

Dialogy is a library for building and managing SLU applications.

Topics 📄

Listing sections by order of significance. Higher ranking items are helpful in understanding items that are ranked lower.

Description

1

Input

A fundamental unit that describes the inputs (along with their derivates) of the inference API.

2

Output

A fundamental unit that describes the output of the inference API.

3

Workflow

A workflow has an Input and an Output. It also contains plugins. The run(...) produces the inference API’s response.

4

Plugin

The base (abstract) class for all plugins.

[how to write plugins]

This class requires creation of a utility method of the following signature:

def utility(self, input_: Input, output: Output) -> Any:
   ...

DucklingPlugin

Connects to the Duckling API and returns entities of type:

  1. date

  2. time

  3. duration

  4. number

  5. people

  6. credit-card-number

  7. amount-of-money

MergeASROutput

Featurizer for the intent classifier model. Concatenates input.utterances.

XLMRMultiClass

The intent classifier model as a plugin. Requires input.clf_feature and returns List[Intent].

CombineDateTimeOverSlots

This plugin combines date/time entities tracked by the slot filler (previous turns) with time/date entities extracted in the current turn.

WERCalibrationPlugin

This plugin can only be used with the proprietary ASR of skit.ai. Uses lm_score and am_score to detect if the current set of code:input.utterances are too noisy for the intent classifier to use.

CombineDateTimeOverSlots

This plugin can only be used with the proprietary ASR of skit.ai. Uses lm_score and am_score to detect if the current set of code:input.utterances are too noisy for the intent classifier to use.

Installation

pip install dialogy

Test

make test

Getting started

Dialogy’s CLI supports building and migration of projects. Migration is hard because a few modules need a forced update but a few others should be retained by the developer. The lack of this expression makes it hard to migrate smoothly. Building new projects should be fairly simple.

dialogy -h
usage: dialogy [-h] {create,update,train} ...

positional arguments:
{create,update,train}
                        Dialogy project utilities.
   create              Create a new project.
   update              Migrate an existing project to the latest template version.
   train               Train a workflow.

optional arguments:
-h, --help            show this help message and exit

Project Creation

dialogy create -h
usage: dialogy create [-h] [--template TEMPLATE] [--dry-run] [--namespace NAMESPACE] [--master] project

positional arguments:
project               A directory with this name will be created at the root of command invocation.

optional arguments:
-h, --help            show this help message and exit
--template TEMPLATE
--dry-run             Make no change to the directory structure.
--namespace NAMESPACE
                        The github/gitlab user or organization name where the template project lies.
--master              Download the template's master branch (HEAD) instead of the latest tag.

Contributors

Clone the repository. We use [poetry] to setup dependencies.

git clone git@github.com:skit-ai/dialogy.git
cd dialogy
# Activate your virtualenv/conda/poetry.
poetry install
make test
  • Ensure tests are passing before you start working on your PRs.

  • Duckling server should be running for docs to produce code-blocks.

[Read more]

Index

Index