Skip to content

Research: genre taxonomy and relationships #39

Open

Description

@DutchJaFO

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:

  1. No hierarchy — a user filtering for fiction does not get sci-fi or fantasy results, even though those are subsets of fiction.
  2. 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 /search endpoint accept a genre filter that automatically expands to children? (e.g. ?genre=fiction returns quotes tagged sci-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/ or data/, a table in SQLite, or hardcoded constants in Quotinator.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 /search endpoint 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

  1. added this to the Data Enrichment milestone on Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    researchInvestigation or design spike

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions