Skip to content
Snippets Groups Projects
Commit 847f8e0d authored by linh's avatar linh
Browse files

Merge branch 'main' of gitlab.cs.uni-duesseldorf.de:general/dsml/gentus-public into main

parents 6a800c44 590b9c9e
No related branches found
No related tags found
No related merge requests found
......@@ -3,15 +3,29 @@
**GenTUS** is a user simulator for task-oriented dialogues, which consists of an encoder-decoder structure and is able to optimise both the user policy and natural language generation jointly. GenTUS generates both semantic actions and natural language utterances, preserving interpretability and enhancing language variation. In addition, by representing the inputs and outputs as word sequences and by using a large pre-trained language model we can achieve generalisability in feature representation.
## Training
Building dataset
* Building dataset
```
python3 convlab2/policy/genTUS/build_data.py --add-history
```
Train the model
The data will be under `convlab2/policy/genTUS/data` as default.
* Train the model
```
python3 convlab2/policy/genTUS/train_model.py --batch-size 8
```
The result `YOUR_MODEL_DIR` may be named as `genTUS-YY-MM-DD-hh-mm` as default.
* Evaluate the semantic level performance
The test data `TEST_DATA` will be `convlab2/policy/genTUS/data/data_test_v1.json` as default.
```
python3 convlab2/policy/genTUS/evaluate.py --do-semantic --dataset multiwoz21 --model-checkpoint YOUR_MODEL_DIR --evaluate-file TEST_DATA --only-action
```
* Evaluate the natural language performance
```
python3 convlab2/nlg/corpus_evaluation.py --model-checkpoint YOUR_MODEL_DIR --input-fname TEST_DATA --do-generation --model-name gentus
```
## Citing
If you use GenTUS in your research, please cite:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment