You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rather than compiling for all possible element + key variations and then trying to match it to the user input, doesn't it make more sense to cut the user input and look up at a hash table for the right knowledge data? It should be much faster.
Current way:
Currently, we're going through all possible keys of a knowledge ([websites], for example) and pushing their respective element_plus_key to words_with_knowledge.
command: open [webssites] please
input: open new york times please
[websites]:
reddit: https:://
twitter: https:://
facebook: https:://
new york times: https:://
words_with_knowledge:
open reddit please
open twitter please
open facebook please
open new york times please
This method then compares every item in words_with_knowledge with the current [NAME] element node. This is not efficient.
The suggested and more efficient method is:
if we find brackets ([])
Get the respective data from the user input based on the current [NAME] element node by:
Matching the string before the start bracket '[' and after the end bracket ']' and taking the string the middle of them. In our example, we need to remove from the user input "open " from the start and " please" from the end of the string.
Then using a hash table we check if the string in the middle exists as a key in the knowledge file. In our example, we check if "new york times" exist in the knowledge file.
If it does, we push it to the bestMatch ElementPlusKnoeledgeData and continue regularly.
The text was updated successfully, but these errors were encountered:
Rather than compiling for all possible
element + key
variations and then trying to match it to the user input, doesn't it make more sense to cut the user input and look up at a hash table for the right knowledge data? It should be much faster.Current way:
Currently, we're going through all possible keys of a knowledge ([websites], for example) and pushing their respective element_plus_key to
words_with_knowledge
.[websites]:
reddit: https:://
twitter: https:://
facebook: https:://
new york times: https:://
words_with_knowledge:
open reddit please
open twitter please
open facebook please
open new york times please
This method then compares every item in
words_with_knowledge
with the current [NAME] element node. This is not efficient.The suggested and more efficient method is:
The text was updated successfully, but these errors were encountered: