Closed jxu closed 3 years ago
Yes, we definitely need to tell the user if the word is unknown. Maybe they just made a typo. Or maybe they're testing the demo to see how big the vocabulary is. In any case, we cannot just silently fail.
Here is how the vector explorer is supposed to work. The user first clicks on a point in the 3D plot. The selected point becomes the "current point" and turns red. Whenever there is a current point (a red point), the user can click on one of the 6 vector explorer slots, and that word's vector is copied into that slot, and the current point is cleared.
Aso, adding a word makes it the current point. Deleting a word (any word) clears the current point.
I added a message telling the user the result of the operation. Also the plot view angle changes every operation; do we want it to be preserved between operations?
Turns out it's quite simple to save the viewing angle between operations so I added that.
Please update the confirmation/failure message to include the word in question, e.g., it should say "Word 'oven' added" or "Word 'toaster' not found".
In the process of adding features, the way my code did plotly bindings seemed to cause more and more bindings to happen as a memory leak (I don't know the internals of d3). I think I've fixed it but clicking is still a bit slow due to redrawing the plot and the plotly bug in #10.
I added a button and text button for adding or removing words. If a word is present in the scatterplot, it is removed, otherwise it is added if it exists as a word vec. There is currently no message to the user if the word is not known - maybe there should be a message or alert popup.
Not sure how to sync scatter plot and vector explorer since the scatter plot shows 20 words and the vector display would only show 6. How would the user add or remove from the vector display?