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:

python -m pip install -r requirements.txt

Usage

Download the model and its required supporting module, then predict keyword intent:

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

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 for the full terms.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support