Open jeyadosstimothy opened 5 years ago
The problematic code from requests.c was moved to defines.h but the issue still stands. I would like to fix this. Thanks!
Actually, the code is ok it's just the name of defined limits that are wrong:
https://github.com/ritwik12/Virtual-Assistant/blob/3905ebdc57cf5833b3898c83f1775f951b884c12/utils/defines.h#L9-L10
in
https://github.com/ritwik12/Virtual-Assistant/blob/3905ebdc57cf5833b3898c83f1775f951b884c12/utils/defines.h#L44
It should be const char *classifier[LAST_FIELD][NUM_CLASS][NUM_WORDS]
This is not a functional bug but it could be misleading. Let me know if you would still want this fixed.
@simonastefan Lets give it a try, I was curious about hardcoded limits while merging that PR also. Please check if your suggestion works well.
In requests.c the class arrays are initialized with maximum word length 10, but for restaurant_class the word length is 11 for "restaurants" and 12 if '\0' is included (code below)
char *restaurant_class[10][10] = { {"Please", "find", "some", "restaurants"}, {"Find", " ", "some", "restaurants"}, {"Show", " ", " ", "restaurants"}, {"Find", "places", "to", "eat"} };