A tool used to categorise CATI verbatim responses into a set list of categories.
Inputted data should be in csv format, and outputted data retains all input data into a new file with the category column edited.
CATIgorise currently is based on the action of installing a new gas meter, but that is easily edited in the source code if needed.
To add another category, add it to the prompt variable in main.py.
You will also need your own API key from OpenAI, and a new file called env.py with the following line:
APIKEY = "YOUR_KEY_HERE" # replace with your own generated keyNote: The program is based on test data csv file with the format:
id,response,score,category
For actual use, update this to your actual format, but make sure the string component retains the name "response"
Make sure the inputted data filename is set correctly to your file name:
with open("YOUR_FILE_NAME.csv")To run the program, use the in-built IDE run button or execute it in the CLI as such:
python3 main.pypython main.pyOnly the OpenAI library is needed, install with the following commands.
pip3 install openaipip install openai