Representative Keyword Normaliser
Suggest a cleaner, search-style keyword for each keyword in a list, using a local or hosted LLM.
#about
Suggests a cleaner, more descriptive keyword for each row of a CSV, phrased as a search and kept in the source language.
Any OpenAI-compatible endpoint works, from a local Ollama server running qwen2.5:7b (the default, no API key needed) to the OpenAI API, with one call per keyword.
Characters outside printable ASCII, Arabic and Devanagari are stripped first, so accented letters and other scripts are lost.
Run it locallyAPI key or local model
- Platform
- Streamlit app you run on your own machine (needs Python 3.x)
- Input
- CSV with a keyword columnAPI endpoint URL and optional API key
- Output
- CSV with all original columns plus a Suggested Keyword column containing the normalised representative keyword for each row.
- Category
- Keyword Research
Use cases
- Cleaning messy or truncated keyword exports before clustering
- Normalising scraped page titles into search-style keywords
- Pre-processing multilingual keyword lists for grouping
#features
- Any OpenAI-compatible endpoint (Ollama qwen2.5:7b default, or OpenAI)
- Structured JSON schema response format
- tenacity retry on invalid JSON replies: 3 attempts with 2-second fixed wait
- Input cleaning: strips characters outside ASCII, Arabic and Devanagari
- Language preservation: output in the same language as input
- Changed-count and error-count metrics in results
#how-to-use
- Set the API base URL in the sidebar (Ollama default or OpenAI)
- Enter the model name and optional API key
- Upload your keyword CSV
- Select the keyword column
- Click Suggest Representative Keywords
- Download the CSV with the Suggested Keyword column
#faq
- Does it require an API key?
- Not if you use a local Ollama server (the default). The default base URL is http://127.0.0.1:11434/v1 with the api_key set to 'not-needed'. For OpenAI or other hosted endpoints, enter a real key in the sidebar.
- What model does it use by default?
- qwen2.5:7b via Ollama. This is a local model that runs without API costs. You can change it to any model name your endpoint supports, such as gpt-6-luna or gpt-6.1-terra for OpenAI.
- How does it handle non-Latin scripts?
- Before sending each keyword, it strips characters outside printable ASCII (0x20-0x7E), Arabic (0x0600-0x06FF) and Devanagari (0x0900-0x097F) ranges. Characters in other scripts are removed. The prompt instructs the model to respond in the same language as the source keyword.
- What happens when the API call fails?
- Replies that are not valid JSON and temporary API errors are retried, up to 3 attempts with a 2-second wait (using the tenacity library). Errors that will not clear on a retry, such as a bad API key or an unknown model, are not retried. Either way, the Suggested Keyword column for that row gets a message starting with 'Error:' and the run carries on with the next keyword.
- Does it batch keywords or process them one at a time?
- One API call per keyword. Each call uses structured JSON schema response format, so the output is a single JSON object with one 'keyword' field. This means processing time and cost scale linearly with keyword count.
/contact
Want me to run this for you? I run this tool as a managed service, or build something custom around your data. You get the insights without touching the code.