Create a conda env, install dependencies.
- Create a file with the templates that you want to test in TSV format. Ex
templates_123.tsv
. - Place your template file inside
assets/data
. Exassets/data/templates_123.tsv
orassets/data/Experiment name/templates_123.tsv
. - (Optional) Create a TSV file with a the list of models that your experiment will run. Any
Fill mask
model on HuggingFace should work. - Run FillTemplate.py
python src/FillTemplate.py 'Experiment name' 'templates_123.tsv' 'models.tsv' 10
. - This will generate an output inside
assets/result/Experiment name/FillTemplate
. The interesting file isFillTemplate.json
.
- Grab the result of the latest experiment in
assets/result/Experiment name/FillTemplate/FillTemplate.json
- Head to the Category Tool
- (Optional) If you already had categorized adjetives, you can drop them in the
Filled box
so you only have to categorize the new words. If not just start clear. - Drag and drop
Adjectives.json
into the box with the same name. - Use the "New category" input to add as many categories as needed.
- You will be categorizing the word that is pointed by an arrow. To move its category just click a column.
- When you are done, just click the
Save to file
button. It will be saved in your browser's default downloads folder asdllas-categorizedwords.json
. You can check and edit this json file to tweak category name or contents.
Changes will be saved as you work in localStorage. If you want to continue later, you can Drop again the Adjectives.json
file and click the Load last session
button to recover your changes.
- Move the categorization result from the previous phase (
dllas-categorizedwords.json
) it to the folderassets/data
with some nice name. ExYulia.json
. - Run
python src/EvaluateCategories.py 'Experiment name' 'Yulia.json'
. It will generate some result files onassets/result/Experiment name/EvaluateCategories
- git clone the project
- Run FillTemplate.py without params
- Run EvaluateCategories without params
cd dllas-evaluator
python src/FillTemplate.py
python src/EvaluateCategories.py
You should follow the folder convertion, you can check the folder structure of the default experiment:
- The base folder is on the root of the projects, named
assets
. Inside we have two foldersdata
andresult
. data
folder, for ourinput data
. Inside you should add your data in the folder matching thescript
name, ex placesome_templates.tsv
insideFillTemplates
folder.result
folder is for ourexperiment results
. Every experiment should have aunique label
that you will be passing as a cli param. Insideresult
we will have one folder for each experiment, not much to worry here as they will be created when you run the scripts.
chmod -x ./tests/TestEvaluateCategories.py
nosetests --with-watch --rednose --nologcapture src.tests