Repository navigation
Research: genre taxonomy and relationships #39
Description
Goal
Investigate how to model relationships between genre tags so that search, filtering, and tagging can be smarter — for example, understanding that sci-fi and fantasy are related, or that action commonly co-occurs with adventure.
Background
The current genre model is a flat array of tags per quote (e.g. ["action", "sci-fi"]). This is simple and works for exact-match filtering. It has two limitations:
- No hierarchy — a user filtering for
fictiondoes not getsci-fiorfantasyresults, even though those are subsets of fiction. - No relationships — there is no way to suggest related genres or expand a search to nearby tags.
As the genre vocabulary grows (TMDB alone adds crime, documentary, family, history, war, western, kids, reality, politics, music, tv-movie to the existing set), a flat model becomes harder to navigate.
Questions to answer
Hierarchy
Is a genre hierarchy useful? Candidate parent–child relationships:
| Parent | Children |
|---|---|
fiction |
sci-fi, fantasy, horror, thriller, mystery, romance, adventure |
non-fiction |
documentary, history, biography |
action |
(leaf — or parent of war, adventure?) |
- Is a two-level hierarchy (parent + leaf) enough, or do we need arbitrary depth?
- Should the hierarchy live in a config file, a DB table, or be hardcoded in the filter logic?
Relationships (non-hierarchical)
Beyond hierarchy, are there useful sibling/affinity relationships?
-
sci-fi↔fantasy(frequently co-tagged, often searched together) -
thriller↔mystery(overlapping audience) -
action↔adventure -
Should related genres be stored explicitly (a relationship table/map), or derived from co-occurrence in the dataset?
-
Is co-occurrence analysis on the existing 780+ quotes sufficient to produce meaningful relationships, or is the dataset too small?
Impact on search and filtering
- Should the
/searchendpoint accept agenrefilter that automatically expands to children? (e.g.?genre=fictionreturns quotes taggedsci-fi,fantasy, etc.) - Should the Blazor UI genre filter show a grouped/hierarchical picker rather than a flat list?
- Should the MCP tool expose genre relationships to help an AI assistant suggest related quotes?
Data storage
- A genre relationship map could be a static JSON file in
scripts/ordata/, a table in SQLite, or hardcoded constants inQuotinator.Constants. - What is the lowest-maintenance option that still allows the relationships to be updated without a code deploy?
Output
A short design note (can be a comment on this issue) covering:
- Whether a hierarchy, affinity relationships, or both are worth implementing
- Proposed storage approach
- Impact on the
/searchendpoint and Blazor filter UI - Whether co-occurrence analysis on the existing dataset is a useful starting point
This feeds into future issues for the search endpoint, Blazor UI genre filter, and potentially the MCP tool.
Activity