Skip to main content

**Dialog Flow Graph Construction** is python module add-on for [Dialog Flow Framework](https://github.com/deepmipt/dialog_flow_framework), a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.

Project description

Dialog Flow Graph Construction

Dialog Flow Graph Construction is python module add-on for Dialog Flow Framework, a free and open-source software stack for creating chatbots, released under the terms of Apache License 2.0.

Dialog Flow Graph Construction allows you to automatically generate dff scripts from example dialogues. Codestyle Tests License Apache 2.0 Python 3.8, 3.9

Quick Start

Installation

python setup.py install

Usage

df_gc --help
usage: df_gc [-h] (--pretrained-model PATH_TO_MODEL | --dataset-from-huggingface DATASET_NAME | --dataset-from-file DATASET_FILE) [--save-pretrained FILE_TO_SAVE_TO]
EXAMPLE_DIRECTORY OUTPUT_FILE

Use example dialogues to construct a dialog flow graph saved in output_file.

positional arguments:
EXAMPLE_DIRECTORY     directory containing example dialogues
OUTPUT_FILE           file with the resulting structure

optional arguments:
-h, --help            show this help message and exit
--pretrained-model PATH_TO_MODEL
file previously generated by --save_pretrained
--dataset-from-huggingface DATASET_NAME
train graph model on a dataset from huggingface
--dataset-from-file DATASET_FILE
train graph model on a dataset stored locally
--save-pretrained FILE_TO_SAVE_TO
file to save trained model to
df_gc --dataset-from-file examples/example_dataset.dialogues examples/example_dialogues examples/output.json

Dialogue formats

Dialogue files in the EXAMPLE_DIRECTORY folder should have the following structure:

{
"dialogue_id": "unique identifier",
"turns": {
"speaker": "array of 0 and 1 where 0 corresponds to a user utterance and 1 corresponds to a system utterance",
"utterance": "array of strings"
}
}

Dialogue dataset is a list of such dictionaries.

To get more advanced examples, take a look at examples on GitHub.

Contributing to the Dialog Flow Graph Construction

Please refer to CONTRIBUTING.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

df_graph_construction-0.1.0.tar.gz (24.3 kB view details)

Uploaded Source

Built Distribution

df_graph_construction-0.1.0-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file df_graph_construction-0.1.0.tar.gz.

File metadata

  • Download URL: df_graph_construction-0.1.0.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for df_graph_construction-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8493d5e89c3464c7d552dba1a17886b2fe6bc733ca776ad750e3ba5dc126324d
MD5 cef06b2a50a69b2aa6bc7bd4d24d3678
BLAKE2b-256 f87c537d8c26a3660cb5c770997ffda13898983389b3d76b8fa3bab91260d838

See more details on using hashes here.

File details

Details for the file df_graph_construction-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for df_graph_construction-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2b0fd617132df220a490c00564016e083bc2465422ec650c28f77e9a93f9b85
MD5 455beedc847c2473c9fdc0c9f895251c
BLAKE2b-256 1bdbf5e69fbcff771d55b45382f637b1c1ea7728beec8bf8006f040a9292644f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page