taipo util
¶
> python -m taipo util
Some utility commands.
Options:
--help Show this message and exit.
Commands:
csv-to-yml Turns a .csv file into nlu.yml for Rasa
yml-to-csv Turns a nlu.yml file into .csv
summary Displays summary tables for gridsearch results.
We host some utility methods to transform intent-based data from .csv to .yml. Be aware, these methods ignore entities!
taipo util csv-to-yml
¶
> python -m taipo util csv-to-yml --help
Usage: util csv-to-yml [OPTIONS] FILE
Turns a .csv file into nlu.yml for Rasa
Arguments:
FILE The csv file to convert [required]
Options:
--out PATH The path of the output file. [default: .]
--text-col TEXT Name of the text column. [default: text]
--label-col TEXT Name of the label column. [default: intent]
--help Show this message and exit.
taipo util yml-to-csv
¶
> python -m taipo util csv-to-yml --help
Usage: __main__.py util yml-to-csv [OPTIONS] FILE
Turns a nlu.yml file into .csv
Arguments:
FILE The csv file to convert [required]
Options:
--out PATH The path of the output file. [default: .]
--help Show this message and exit.
taipo util summary
¶
Usage: __main__.py util summary [OPTIONS] FOLDER
Displays summary tables for gridsearch results.
Arguments:
FOLDER Folder that contains grid-result folders. [required]
Options:
--help Show this message and exit.
Example Usage¶
Let's say that you've got a folder structure like so:
๐ gridresults
โฃโโ ๐ orig-model
โ โฃโโ ...
โ โโโ ๐ intent_report.json
โฃโโ ๐ finetuned-model
โ โฃโโ ...
โ โโโ ๐ intent_report.json
โฃโโ ๐ typo-orig-model
โ โฃโโ ...
โ โโโ ๐ intent_report.json
โโโ ๐ typo-finetuned-model
โฃโโ ...
โโโ ๐ intent_report.json
Then you can get a convenient summary via:
python -m taipo util summary gridresults
You may get a table that looks like this:
โโโโโโโโโโโโโโโโโโโโโโโโโณโโโโโโโโโโโณโโโโโโโโโโโโณโโโโโโโโโโณโโโโโโโโโโ
โ folder โ accuracy โ precision โ recall โ f1 โ
โกโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฉ
โ finetuned-model โ 0.9022 โ 0.90701 โ 0.9022 โ 0.90265 โ
โ orig-model โ 0.90018 โ 0.90972 โ 0.90018 โ 0.90192 โ
โ typo-finetuned-model โ 0.89965 โ 0.90302 โ 0.89965 โ 0.89984 โ
โ typo-orig-model โ 0.79419 โ 0.82945 โ 0.79419 โ 0.80266 โ
โโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโ