Lee Foot

AI Entity Visualiser

Extract the named entities in a text with GPT and explore them in a zoomable circle chart.

Launch the app → View the source

#about

Pulls the named entities out of a text into a zoomable circle chart, grouped by spaCy-style label and descriptive tag and sized by how often each appears.

Extraction runs on GPT Luna by default, or GPT Terra, one call per chunk of text (about 1,000 tokens by default).

Each entity gets a count and a context snippet from your text; its label and Wikipedia URL are the model's suggestions and are not checked.

Streamlit appRequires an API key

Platform
Browser-based (no installation required)
Input
OpenAI API keyText content to analyseModel: GPT Luna (default) or GPT TerraMax tokens: 500-2000 (default: 1000)
Output
Table and CSV (extracted_entities.csv): entity, spacy_label, descriptive_tag, wikipedia_url, context, count. A zoomable circle chart groups entities by label and tag, sized by count, and downloads as an HTML file.
Category
Content

Use cases

  • Content entity analysis
  • Semantic content optimisation
  • Visualising topic coverage

#features

  • GPT Luna (default) or GPT Terra model selection
  • Tiktoken batch processing for long documents
  • Three-level hierarchy: labels → tags → entities
  • Context snippet per entity (up to 5 words either side)
  • D3.js zoomable circle packing via Jinja2
  • A Wikipedia URL per entity, written by the model and not checked
  • stqdm progress tracking for batch processing

#how-to-use

  1. Enter your OpenAI API key
  2. Select model (GPT Luna by default, or GPT Terra)
  3. Configure max tokens (500-2000); this sets the batch size per API call
  4. Paste text content and click Process Text
  5. Explore the interactive D3 circle packing hierarchy
  6. Download the entity CSV or the standalone HTML chart

#faq

What does the Maximum Tokens slider actually control?
The batch size, not the response length. Your text is tokenised with tiktoken (the o200k_base encoding, so chunk sizes are approximate for the model) and split into chunks of that many tokens (500 to 2,000), and each chunk becomes one OpenAI call. A lower value means more, smaller calls, which the app notes can improve extraction fidelity on long texts, but entities that straddle a chunk boundary can be missed.
Are the Wikipedia links reliable?
No, treat them as suggestions. The model is asked to include a Wikipedia URL per entity and whatever it returns is written straight to the CSV without any validation, so links can 404 or point to the wrong article. Likewise the spacy_label is the model's guess at a spaCy-style label; spaCy itself is never run.
How are the occurrence counts calculated?
After extraction the app counts each entity in your original text with a whole-word, case-insensitive regex, processing the longest entity names first and removing matches as they are counted. So mentions of New York City are not also counted towards New York. The flip side: if the model returned an entity in a form that never appears verbatim in your text (an expanded acronym, a corrected spelling), its count is 0 and its context shows as not found.
What happens when the same entity appears in several batches?
The first occurrence wins: the label, descriptive tag and Wikipedia URL from the earliest batch are kept and later duplicates are discarded, so the hierarchy never double-counts an entity across batches.
Why are some entities missing from the chart?
The chart sizes each entity by how often its name appears in your text. An entity the model names in a form that does not appear in the text gets a count of zero and is drawn with no size, although it is still listed in the table and the CSV. The downloaded chart file also needs an internet connection, because it loads the D3 library from d3js.org.

/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.