This version of the Word Vector Interface represents a thorough refactoring of the R code behind the application.
The code has been improved in a number of small ways to aid maintainability:
- Variables were renamed to better reflect their contents;
- Repeated code has been abstracted out into functions;
- Comments were added to explain parts of the code and to signpost major sections; and
- HTML content has been moved into templates.
Other significant changes:
- We added a version of the catalog with only two models. This is useful for running the WVI app on computers without a lot of resources, or for adding your own custom models.
- We added the “Pair Plot” to the Visualization tab. The pair plot takes two input words and generates a plot of the words most similar to them. This visualization was taken from our “Word Vectors Visualization” tutorial.
- We removed the “Query Term Scatterplot” and “Cluster Scatterplot” visualizations.
- We updated the Clusters tab:
- Each model's clusters persist, even when the number of words is increased or the model is changed. You can still use the “Reset clusters” buttons to get a new set of 10 clusters.
- The column headings include the cluster number, out of the 150 generated for the selected model.
- The downloaded CSVs also have these headers, so you can easily get to a cluster you were interested in.
- We added a slider to control the number of words returned in the Operations tab.
- We tweaked some of the dashboard components to ensure that they stay legible and usable on smaller screens.
- We also improved color contrast in several areas, including the header.
- We fixed the hamburger menu button so that it actually does display the Women Writers Vector Toolkit navigation menu when toggled open.
- We also created resources for building a Docker image of the Word Vector Interface, greatly simplifying the work needed to get the app running. (The app at lab.wwp.northeastern.edu uses this setup.)