How moonwalker199/kuku-recruitment-assignment-iitr26 works
Kuku FM Promotional Moment Discovery is a pipeline for turning screenplay episodes into explainable, ranked promo recommendations. Users provide episode scripts through the CLI or Streamlit app; scripts are parsed or loaded, analyzed for story moments, structurally shortlisted, boundary-optimized, evaluated, deduplicated, ranked, and exported for review. The graph includes the documented stages and major source-index modules. Some orchestration details are unsampled, so documented relationships use README evidence and uncertain links are omitted.
Main entry points: main.py CLI pipeline · semantic_analyzer.py Semantic analyzer · app.py Interactive UI · screenplay_parser.py Screenplay parser
Components 20
User entry
- CLI pipeline
main.py - Interactive UI
app.py
Episode processing
- Raw scripts
data/raw - Screenplay parser
src/preprocessing/screenplay_parser.py - Processed episodes
data/processed - Episode loader
src/ingestion/episode_loader.py - Candidate windows
src/candidate_generation/window_generator.py
AI and scoring
- Semantic analyzer
src/llm/semantic_analyzer.py - Analysis prompts
src/llm/prompts.py - LLM client
src/llm/client.py - Feature extraction
src/feature_extraction/feature_extractor.py - Promo lexicons
src/feature_extraction/lexicons.py - Pipeline config
src/config.py
Ranking and outputs
- Candidate scoring
src/ranking/scorer.py - Ranking and decisions
src/ranking/ranker.py - Overlap deduplication
src/ranking/deduplicator.py - Recommendation explanations
src/ranking/explainer.py - Pipeline outputs
outputs
Other components
- Operator
- LLM provider
Connections 24
- Operator → CLI pipeline: runs
README.md - Operator → Interactive UI: uses
README.md - Raw scripts → Screenplay parser: parses
README.md - Interactive UI → Screenplay parser: parses uploads
app.py - Screenplay parser → Processed episodes: writes JSON
README.md - Processed episodes → Episode loader: loads JSON
src/ingestion/episode_loader.py - CLI pipeline → Episode loader: loads episodes
main.py - CLI pipeline → Semantic analyzer: analyzes episodes
main.py - Semantic analyzer → Analysis prompts: builds prompts
src/llm/semantic_analyzer.py - Semantic analyzer → LLM client: requests analysis
src/llm/semantic_analyzer.py - LLM client → LLM provider: sends requests
README.md - Semantic analyzer → Candidate windows: optimizes boundaries
src/llm/semantic_analyzer.py - Candidate windows → Feature extraction: provides candidates
src/feature_extraction/feature_extractor.py - Feature extraction → Promo lexicons: uses vocabulary
src/feature_extraction/feature_extractor.py - CLI pipeline → Candidate scoring: shortlists candidates
README.md - Candidate scoring → Semantic analyzer: prioritizes candidates
README.md - CLI pipeline → Semantic analyzer: evaluates promos
README.md - CLI pipeline → Ranking and decisions: ranks results
README.md - Ranking and decisions → Overlap deduplication: removes overlaps
src/ranking/ranker.py - CLI pipeline → Recommendation explanations: creates explanations
README.md - CLI pipeline → Pipeline outputs: exports results
README.md - Interactive UI → Pipeline outputs: shows results
app.py - Pipeline config → CLI pipeline: configures pipeline
README.md - Pipeline config → Semantic analyzer: sets LLM stages
src/config.py