Closed touretzkyds closed 2 years ago
Note that if we have multiple words, some might be additions and some deletions. The "active" word should be the first word that is an addition. If there are no additions then deactivate any currently active word.
We are currently supporting words separated by spaces, commas, full stops, semi-colons
Resolved
Resolved the bug where if we had for eg. fox fox added and removed simultaneously, the highlighting did not handle it earlier. Now we use a set to keep track of net added words and decides the same accordingly
Still not resolved. Try this input: "fish sticks fish fry".
It correctly adds and removes "fish" but leaves the similarity display active.
Sorry about the bugs. In such a case, what would correct behavior be? I was thinking in the case of "fish sticks fish fry", we could keep sticks ie., the first valid word active. In case no valid word exists other than the word that has been removed, for eg., "fish fish fry fry" or "fish notaword fish" (nothing added to the vocab, so nothing highlighted), we turn off the mode. I think so because it might help the user spot valid words that they would add to the plot.
I would say we should keep the last word added, not the first one. Giving a list of words should produce the same behavior as if we had entered the words sequentially. The problem is that the label says "Similarity to fish", not "Similarity to fry".
Got it, I believe I have this implemented. I was reading off the wrong array which was leading to that behavior. I tested this now with quite a few different test cases, it showed expected behavior.
Works great now!
To save time, it would be helpful if the user could type multiple words in the Add/Remove Word text box, separated by spaces and/or commas, and have all of them processed at once. We should display an appropriate confirmation message, e.g.,