| Metadata | Value |
|---|---|
| Status | Completed |
| Version | 1.0.0 |
| Last Updated | 2026-03-15 |
| Author | Sangeetha Grantha Team |
Fix the guru-guha.blogspot.com extraction pipeline end-to-end so that all 26+ krithis imported from this source have correct structural sections (PALLAVI, ANUPALLAVI, CHARANAM) and clean lyrics — no metadata pollution, no navigation cruft, no URLs in lyric text.
Krithis imported from guru-guha.blogspot.com showed “abhayAmbA jagadambA - rAgaM kalyANi - tALaM Adi” as lyrics under an UNKNOWN section type. Root causes:
Navigation table pollution: Language-switch <table> elements (English |
Devanagari | Tamil | …) were extracted as lyric content |
<a href="#V1">text</a> rendered as "text (full-url#V1)"ExtractionQueueRepository.retry() reset status to PENDING but left attempts at max, so the claim query returned no rowshtml_extractor.py: Strip navigation <table> elements with language-switch linkshtml_extractor.py: Skip navigation boilerplate links (Meaning of Kriti, Notation, etc.)html_extractor.py: Omit URLs for fragment/same-page links in lyric contentstructure_parser.py: Add negative lookaheads to MEANING/NOTES boundary patternsstructure_parser.py: Add minimum-content guard (skip early boundaries < 200 chars)test_guru_guha_blog_navigation_stripped, test_structure_parser_no_false_meaning_boundaryLyricVariantPersistenceService.kt: Upgrade stale all-OTHER sections on re-extractionLyricVariantPersistenceService.kt: Backfill includes MAPPED and IN_REVIEW statusesImportRoutes.kt: Add POST /re-extract endpoint with typed ReExtractResponseKrithiLyricRepository.kt: Add deleteAllVariants() for clearing before re-extractionExtractionQueueRepository.kt: Reset attempts = 0 in retry() and retryAllFailed()POST /v1/admin/imports/backfill-lyrics — 26 processed, 0 errors| File | Change |
|---|---|
tools/krithi-extract-enrich-worker/src/html_extractor.py |
Navigation table stripping, link filtering |
tools/krithi-extract-enrich-worker/src/structure_parser.py |
Metadata boundary hardening, minimum-content guard |
tools/krithi-extract-enrich-worker/src/worker.py |
URL-based composer inference fallback |
tools/krithi-extract-enrich-worker/tests/test_html_extractor.py |
Guru-guha blog tests |
modules/backend/api/.../services/LyricVariantPersistenceService.kt |
Section upgrade, multi-status backfill |
modules/backend/api/.../routes/ImportRoutes.kt |
Re-extract endpoint, typed response DTOs |
modules/backend/dal/.../repositories/KrithiLyricRepository.kt |
deleteAllVariants() |
modules/backend/dal/.../repositories/ExtractionQueueRepository.kt |
Reset attempts in retry() |
Ref: application_documentation/10-implementations/track-097-guru-guha-blog-source-adapter.md