-
Notifications
You must be signed in to change notification settings - Fork 56
Command line interface
This page will thoroughly present the command line interface of Chatette.
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.
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:
-
-hor--helpprints the help for the Chatette package. -
-vor--versionprints the version number of the Chatette package. -
-oor--outputfollowed by the directory in which the output files should be saved. -
-sor--seedfollowed 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). -
-lor--localchanges the output path to be specified with respect to the directory in which the template file is, rather than the current working directory. -
-aor--adapterfollowed by the name of an adapter, allows to change the format of the generated examples. 2 adapters are currently available:jsonlandrasa. The first one outputs a representation of the generated examples with few repetitions, in a.jsonlfile; the second one makes a.jsonfile which can be directly fed to Rasa NLU.
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.