Closed mcavazotti closed 4 years ago
@mcavazotti Approach looks good. can you please document it properly too using comments and Doc strings to help understand what is happening in the code.
Also please try to use proper variable names in place of i
and j
in loops. I know we have used that at several places as the code was a lot immature at the beginning and now if we are improving it. It would be better to improve those things in the flow.
@mcavazotti That was some good work here, I tested the code and that worked well too. Thanks a lot for your contribution here!!
you're welcome
@all-contributors please add @mcavazotti for code
@ritwik12
I've put up a pull request to add @mcavazotti! :tada:
Now the Virtual Assistant creates an ordered array from the words in the knowledge base. To create this array, the complexity is the same as it was before. The improvement comes at the input analysis. Instead of looking through all the known words, the program now performs a binary search.
I also increased the
WORD_LEN
to 15 to avoid buffer overflow (this actually happened to me), added a header guard atdefines.h
and reordered the classifier list to matchcategories_str
.