https://github.com/estevesegura/glove-implementation
Simple implementation of GloVe, with corpus included.
https://github.com/estevesegura/glove-implementation
Last synced: 3 months ago
JSON representation
Simple implementation of GloVe, with corpus included.
- Host: GitHub
- URL: https://github.com/estevesegura/glove-implementation
- Owner: EsteveSegura
- License: mit
- Created: 2023-08-06T18:25:58.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-06T19:36:05.000Z (almost 2 years ago)
- Last Synced: 2025-02-01T20:29:37.307Z (5 months ago)
- Language: Python
- Size: 27.8 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GloVe Word Embeddings in Python
This repository contains a simple implementation of the GloVe technique for generating word embeddings in Python. GloVe (Global Vectors for Word Representation) is a popular unsupervised learning method that leverages co-occurrence information from large-scale corpora to produce dense word vectors.
## How to Install
Before using the package, you need to install the required dependencies. To do this, make sure you have a requirements.txt file in your project's root directory. Then, follow these steps:
1. Ensure you have Python installed on your system. This project is compatible with Python 3.x.
2. Install the required dependencies from the requirements.txt file:
```bash
pip install -r requirements.txt
```That's it! You've now installed the necessary dependencies for this project.
## Usage
To use the GloVe implementation in your project, follow these steps:
1. Modify the last lines in the code and add your words
```bash
similarity = get_word_similarity(embeddings, word2id, 'sun', 'sky')
print(f"The distance between the two words is: {similarity}")
```2. Run the code
```bash
python3 ./src/main.py
```