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
Each sentence the user inputs is converted into a list of every possible combination of divisions of the sentence by word. For example, "I love you" becomes
[["I", "love", "you"]]
[["I", "love"], ["you"]]
[["I"], ["love", "you"]]
[["I"], ["love"], ["you"]]
Once the number of words in the sentences enters the double digits, the number of combinations begins to grow at a tremendous rate and the process becomes extremely inefficient (especially through Python). That is why, currently, the user can only enter sentences with a length of 10 words or less. The current implementation could probably tweaked to be more somewhat efficient, but we should be avoiding brute force methods anyways. And while it's certainly comprehensive, we shouldn't be searching phrases that are extremely unlikely to have a matching track.
A natural language processing library such as NLTK could be a useful tool for breaking down sentences only into recognizable phrases and therefore narrow down the list of phrases worth searching.
The text was updated successfully, but these errors were encountered:
Each sentence the user inputs is converted into a list of every possible combination of divisions of the sentence by word. For example, "I love you" becomes
Once the number of words in the sentences enters the double digits, the number of combinations begins to grow at a tremendous rate and the process becomes extremely inefficient (especially through Python). That is why, currently, the user can only enter sentences with a length of 10 words or less. The current implementation could probably tweaked to be more somewhat efficient, but we should be avoiding brute force methods anyways. And while it's certainly comprehensive, we shouldn't be searching phrases that are extremely unlikely to have a matching track.
A natural language processing library such as NLTK could be a useful tool for breaking down sentences only into recognizable phrases and therefore narrow down the list of phrases worth searching.
The text was updated successfully, but these errors were encountered: