From 9823e29d349261ac28cf010698415cbbb79e7416 Mon Sep 17 00:00:00 2001 From: finn <finn@hillengass.de> Date: Thu, 29 Feb 2024 19:24:44 +0100 Subject: [PATCH] Add slot accuracy README --- metrics/slot_accuracy/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 metrics/slot_accuracy/README.md diff --git a/metrics/slot_accuracy/README.md b/metrics/slot_accuracy/README.md new file mode 100644 index 0000000..57a7786 --- /dev/null +++ b/metrics/slot_accuracy/README.md @@ -0,0 +1,23 @@ +# Slot Accuracy + +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. + +### 💻 Usage + +```bash +python slot_accuracy.py --input_file <input_path> --output_file <output_path> +``` + +| Parameter | Description | +|-----------------|-------------| +| `--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. \ No newline at end of file -- GitLab