This project is a Hashtag Recommendation System, developed as a browser extension. It helps users get relevant hashtag recommendations for posts, tweets, or any input text entered into textboxes on the web. The extension works seamlessly in the background, similar to Grammarly, by analyzing the input text and suggesting hashtags to boost reach and relevance.
- Nishant Holla - PES1UG23CS401 Github
- Pranav Hemanth - PES1UG23CS433 Github
- Pranav Rajesh Narayan - PES1UG23CS435 Github
- Roshini Ramesh - PES1UG23CS488 Github
- Real-time hashtag recommendations based on the text input.
- Works across multiple platforms (e.g., Twitter, Instagram, LinkedIn) in any text input field.
- Intelligent filtering using BERT embeddings, spaCy models, and GloVe embeddings to recommend relevant hashtags.
- Named Entity Recognition (NER) to identify key topics such as organizations or places from the text.
- Integrated backend API to analyze input text and suggest hashtags dynamically.
- Stopword removal and POS filtering to focus on important terms (nouns, verbs, adjectives, etc.).
- Simple and intuitive UI that mimics the functionality of Grammarly’s suggestions.
- Input Text Extraction: The browser extension captures any input text in real-time from a textbox.
- Text Analysis: The backend processes the text using spaCy to extract important words and named entities.
- Embedding Generation:
- BERT model generates word embeddings for deeper semantic understanding.
- GloVe embeddings provide similarity scores to find related hashtags.
- Hashtag Recommendation:
- The system filters recommended words based on POS (Parts of Speech) tags (e.g., nouns, adjectives).
- Suggestions include related words and named entities (ORG, GPE) to make hashtags meaningful.
- Interactive Suggestions:
- The extension displays recommendations inline, allowing users to click and add hashtags directly.
- Python (FastAPI for building APIs)
- BERT (via Huggingface Transformers)
- GloVe embeddings for similarity search
- spaCy for NLP tasks (NER, POS tagging)
- scikit-learn for cosine similarity
- Browser Extension with JavaScript for real-time text extraction
- HTML/CSS for UI elements
-
Clone the repository:
git clone https://github.com/your-repository/hashtag-recommendation-extension.git cd hashtag-recommendation-extension
-
Set up Python environment:
python -m venv venv source venv/bin/activate # For Linux/Mac venv\\Scripts\\activate # For Windows
-
Install dependencies:
pip install -r requirements.txt
-
Download spaCy model:
python -m spacy download en_core_web_sm
-
Load GloVe embeddings: Place the glove.6B.300d.txt file inside the glove/ folder. You can download it from GloVe
-
Start the FastAPI server:
uvicorn main:app --reload
-
Install the browser extension:
- Go to your browser’s extensions page (e.g., chrome://extensions for Chrome).
- Enable Developer Mode.
- Click on Load Unpacked and select the extension/ folder from this repository.
- After installing the extension, go to any text area on social platforms (e.g., Twitter, Instagram).
- Start typing your post or tweet.
- The extension will analyze the text in real-time and recommend hashtags.
- Click on any recommended hashtag to add it directly to your post.
- /api/ping
- Method: GET
- Description: Health check endpoint to verify the API is running.
- Response:
{
"status": 200,
"message": "Ping!"
}
- /api/query/text
- Method: POST
- Description: Accepts input text and returns recommended hashtags.
- Request Body:
{
"query": "This is an example tweet about artificial intelligence"
}
- Response:
{
"status": 200,
"message": ["#AI", "#ArtificialIntelligence", "#Technology"]
}
We welcome contributions! If you’d like to contribute:
- Fork the repository.
- Create a new branch (git checkout -b feature-branch).
- Commit your changes (git commit -m 'Add a new feature').
- Push to the branch (git push origin feature-branch).
- Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.