Egrove's picture
Upload README.md with huggingface_hub
c34c09a verified
|
Raw History Blame Contribute Delete
2.32 kB
---
license: apache-2.0
library_name: sklearn
pipeline_tag: text-classification
tags:
- keyword-intent
- search-intent
- seo
---
# Keyword Intent Classifier
A search-intent classification model trained on **1,000,000 keyword records (10 lakh rows)** for SEO keyword analysis.
The model classifies keywords into four categories:
| Label | Meaning | Example |
|---|---|---|
| informational | Seeking information or answers | what is artificial intelligence |
| navigational | Looking for a specific website or page | facebook login |
| commercial | Researching or comparing before buying | best crm software |
| transactional | Intending to purchase or take action | buy laptop online |
## Installation
Use Python 3.12. Download `requirements.txt` from this repository and install the dependencies:
```bash
python -m pip install -r requirements.txt
```
## Usage
Download the model and its required supporting module, then predict keyword intent:
```python
import sys
from pathlib import Path
import joblib
from huggingface_hub import snapshot_download
folder = snapshot_download(
repo_id="Egrove/keyword-intent-classifier",
allow_patterns=[
"keyword_intent_model.pkl",
"intent_preprocess.py",
],
)
sys.path.insert(0, folder)
model = joblib.load(
Path(folder) / "keyword_intent_model.pkl"
)
keywords = [
"facebook login",
"buy laptop online",
"what is artificial intelligence",
"best crm software",
]
predictions = model.predict(keywords)
for keyword, intent in zip(keywords, predictions):
print(f"{keyword} -> {intent}")
```
### Example output
```text
facebook login -> navigational
buy laptop online -> transactional
what is artificial intelligence -> informational
best crm software -> commercial
```
Keep `intent_preprocess.py` available when loading the model.
## Limitations
Keywords can have multiple or ambiguous meanings. Evaluate predictions on your own keywords before production use. No benchmark accuracy or F1 score is claimed.
## Security
Only load this model and its supporting Python module if you trust their source. Loading pickle/joblib files and importing Python modules can execute code.
## License
This model is released under the **Apache License, Version 2.0**. See [LICENSE.txt](LICENSE.txt) for the full terms.