Skip to content

Command line interface

SimGus edited this page Jan 11, 2019 · 19 revisions

This page will thoroughly present the command line interface of Chatette.

Environment

Chatette is available for both Python 2.7 and 3.x (>=3.3). In all the commands shown below, we use python as an interpreter. Depending on your operating system and particular settings, this command can run any version of Python. Some operating systems use python3 to directly refer to Python 3.x.

Executing Chatette

To execute the script on a template file, you can run the following command:

python -m chatette <path-to-template-file>

Several flags can be used with this command:

  • -h or --help prints the help for the Chatette package.
  • -v or --version prints the version number of the Chatette package.
  • -o or --output followed by the directory in which the output files should be saved.
  • -s or --seed followed by any string of characters (without whitespaces). This string will be used as a seed for the random generator: using the same seed on the same input file(s) will generate the same output(s).
  • -l or --local changes the output path to be specified with respect to the directory in which the template file is, rather than the current working directory.
  • -a or --adapter followed by the name of an adapter, allows to change the format of the generated examples. 2 adapters are currently available: jsonl and rasa. The first one outputs a representation of the generated examples with few repetitions, in a .jsonl file; the second one makes a .json file which can be directly fed to Rasa NLU.

Generated output

If no output directory was provided, the outputs will by default be in the directory output/ (within the directory Chatette was called from). Within this directory (or the provided directory), 2 new directories will be created: train/ that will contain the training datasets, and test/ which will contain the testing datasets (if any). The datasets contain the generated examples (and possibly a list of entity synonyms) and will be in a file called output.json or output.jsonl. If more than 10'000 examples are generated, several files will contain them and will be named output.X.json or output.X.jsonl where X is a number.

Clone this wiki locally