This program is made for automate Kata NL Testing. You can test the NL by preparing a .txt file format that includes sentences and the label that the NL should recognize. The output of the test will be an excel file with an important information about the result.
These instructions will get you a copy of the project up and running on your local machine.
Things you need to install:
A step by step series of examples that tell you how to get the program running
-
Clone this project (You know how to clone right?)
-
Once you already installed python, run:
pip install -r requirements.txt
-
After all the packages required in the
requirements.txt
already installed. Openpredict.py
In predict.py
, you'll find the following variables:
TXT_INPUT_FILENAME = "datatraining"
EXCEL_OUTPUT_FILENAME = "Test Result After Training"
EXCEL_WORKSHEET_NAME = "Test Result"
BASE_DIR = 'F:\\Some\\Path'
NL_ID = "YOUR-NL-ID"
NL_TOKEN = "YOUR-NL-TOKEN"
THRESHOLD = 0.5
API_ENDPOINT = "https://geist.kata.ai/nlus/" + NL_ID + "/predict"
You can utilize those variable based on their function:
TXT_INPUT_FILENAME
: file name with .txt extension for input
EXCEL_OUTPUT_FILENAME
: file name for the excel output
EXCEL_WORKSHEET_NAME
: worksheet name for the excel output
BASE_DIR
: the base directory for TXT_INPUT_FILENAME
NL_ID
: kata NL ID
NL_TOKEN
: kata NL Token
THRESHOLD
: minimum threshold for a sentence to passed the test
API_ENDPOINT
: kata prediction API Endpoint
If all looks good, you can run predict.py
and wait for the test result.
Is something missing/incorrect? Please let me know by contacting [email protected]. If you know how to fix it straight away, don’t hesitate to create a pull request on this GitHub repository.