LatentDictionary is a unique visualization tool that leverages the power of word embeddings to showcase the semantic relationships of words in an interactive 3D space. By inputting a word, users can explore its closest semantic neighbors. The app fetches word embeddings for the Oxford 3000 list and can dynamically retrieve embeddings for new words using the OpenAI API, ensuring a rich and expanding vocabulary landscape.
- 3D Visualization: See and explore the semantic space of words in three dimensions.
- Dynamic Embedding Retrieval: Introduce a new word, and the app will fetch its embedding and seamlessly incorporate it into the visualization.
- Interactivity: Click on a word in the 3D space to shift the focus and explore its semantic neighbors.
- Python 3
- OpenAI API Key
-
Clone the repository:
git clone https://github.com/EmilianoGarciaLopez/Latent-Dictionary.git cd Latent-Dictionary
-
Install the required packages:
pip install -r requirements.txt
-
Set up the environment variable for OpenAI API:
echo "OPENAI_KEY=your_openai_api_key" > .env
-
Run the application:
python index.py
-
Open your browser and visit
http://localhost:8050
.
- Enter a word in the search bar.
- The 3D visualization will display the word's closest semantic neighbors.
- Click on any word to reorient the visualization around that word.
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License.
- Emiliano García-López: Main Developer - GitHub
- Grant: Original Concept - Twitter Post
If you have any feedback or run into issues, please file an issue on the GitHub repository.