This Folder contains the script to calculate the slot accuracy for our one shot approach. The slot accuracy is calculated by comparing the generated annotations with the true annotaions extracted from the MultiWOZ dataset.
## `slot_accuracy.py`
The script `slot_accuracy.py` is designed to calculate the slot accuracy between domain knowledge and annotations in a dataset. It reads data from a specified input CSV file, computes the slot accuracy for each entry, and then outputs the results to a designated output CSV file. The script handles JSON-formatted domain knowledge and annotations, and includes functions to evaluate partial string matches and convert string formats.
| `--input_file` | Path to the input CSV file containing domain knowledge and annotations. |
| `--output_file` | Path to the output CSV file where results will be saved. |
### 📊 Outputs
-**Modified CSV File**: This script outputs a modified version of the input CSV file, which includes additional columns for slot accuracy scores. These scores are calculated for both original and generated annotations when compared with domain knowledge.
-**File Location**: The output CSV file is saved to the path specified in the `--output_file` argument.