Keyword-Cluster-SEO: Intent-Based Keyword Clustering for Content Strategy
Type: Commercial | Domain: SEO, Content Strategy
Hugging Face: syeedalireza/keyword-cluster-seo
Cluster keywords by intent and topic for content hubs and silos using semantic embeddings and clustering.
Author
Alireza Aminzadeh
- Hugging Face: syeedalireza
- LinkedIn: alirezaaminzadeh
- Email: alireza.aminzadeh@hotmail.com
Problem
Large keyword lists need grouping by intent and theme to map to content and internal linking.
Approach
- Input: List of keywords (and optional search volume, difficulty).
- Output: Cluster labels and optional cluster names (e.g. from centroid keywords).
- Models: sentence-transformers embeddings + KMeans/HDBSCAN; optional UMAP for visualization.
Tech Stack
| Category | Tools |
|---|---|
| NLP | sentence-transformers |
| Clustering | scikit-learn (KMeans, HDBSCAN) |
| Data | pandas, NumPy |
Setup
pip install -r requirements.txt
Usage
python train.py
python inference.py --input data/keywords.csv --output data/clustered.csv
Project structure
06_keyword-cluster-seo/
βββ config.py
βββ train.py # Fit encoder + KMeans; save to models/
βββ inference.py # Assign cluster to keywords CSV
βββ requirements.txt
βββ .env.example
βββ data/
β βββ keywords.csv # Sample: one column "keyword"
βββ models/
Data
- Sample data (included):
data/keywords.csvβ single columnkeyword. Optional:volume,difficulty. - Set
DATA_PATHandN_CLUSTERSin.envif needed.
License
MIT.
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support