How jyz922/joke_identification works
DoubleTake is an age-aware detector of humor built on homographic ambiguity and compound splits. A request enters the runner, passes through scope, surface, sense retrieval, candidate ranking, anchoring, form-specific resolution, distinctness, comprehension, and appropriateness checks, then produces a structured verdict. The README documents genre-specific resolution and two-axis age assessment. Sampled source confirms runner orchestration, lexical resources, and provider use; some individual layer wiring is inferred from the documented pipeline and layer registry, so uncertain links are omitted.
Main entry points: layers.py Layer registry · runner.py Pipeline runner · providers.py Provider abstraction · l2_senses.py Sense retrieval
Components 18
Wordplay analysis
- Scope declaration
src/doubletake/l0_scope.py - Surface and genre
src/doubletake/l1_surface.py - Sense retrieval
src/doubletake/l2_senses.py - Candidate ranking
src/doubletake/l3_candidates.py - Sense anchoring
src/doubletake/l4_anchoring.py - Semantic resolution
src/doubletake/l5_resolution.py - Sense distinctness
src/doubletake/l6_distinctness.py - Layer registry
src/doubletake/layers.py
Age evaluation
- Comprehension
src/doubletake/l7_comprehension.py - Appropriateness
src/doubletake/l8_appropriateness.py
Model integration
- Provider abstraction
src/doubletake/providers.py
Request and results
- Pipeline runner
src/doubletake/runner.py - Settings
src/doubletake/config.py - Analysis schema
src/doubletake/schema.py - Structured verdict
Other components
- Text and age
- Lexical resources
- LLM providers
Connections 21
- Text and age → Pipeline runner: submits
- Pipeline runner → Scope declaration: preprocesses
- Pipeline runner → Layer registry: dispatches
- Layer registry → Surface and genre: runs
- Layer registry → Sense retrieval: runs
- Layer registry → Candidate ranking: runs
- Layer registry → Sense anchoring: runs
- Layer registry → Semantic resolution: runs
- Layer registry → Sense distinctness: runs
- Layer registry → Comprehension: runs
- Layer registry → Appropriateness: runs
- Sense retrieval → Lexical resources: retrieves from
- Sense anchoring → Provider abstraction: calls
- Semantic resolution → Provider abstraction: calls
- Sense distinctness → Provider abstraction: calls
- Comprehension → Provider abstraction: calls
- Appropriateness → Provider abstraction: calls
- Provider abstraction → LLM providers: calls
- Pipeline runner → Settings: uses
- Pipeline runner → Analysis schema: builds records
- Pipeline runner → Structured verdict: renders