| Metadata | Value |
|---|---|
| Status | Completed |
| Version | 1.0.0 |
| Last Updated | 2026-03-20 |
| Author | Sangeetha Grantha Team |
ID: TRACK-103 Status: Not Started Owner: Sangita Grantha Architect Created: 2026-03-20 Updated: 2026-03-20 Parent: TRACK-093 (Trinity Krithi Import)
Add standalone “Back” text to the boilerplate filter in StructureParser._is_boilerplate(). Dikshitar blog pages include “Back” navigation links between script sections that currently leak into lyric text.
database/for_import/EXTRACTION-INVESTIGATION-REPORT.mdtools/krithi-extract-enrich-worker/src/structure_parser.py_is_boilerplate() (line 878) checks for "back to" in its marker list but not standalone "Back" or "back". A line containing just "Back" passes the boilerplate filter and enters lyric text."Back" lines should be filtered as navigation boilerplate._build_blocks() (line 315) calls _is_boilerplate() for each non-empty line (line 334)_is_boilerplate() (line 878) checks lowered against a list of marker strings"link to this post", "newer post", "older post" etc."back" — the string "back to" would only match if followed by more text"Back" text (from <a>Back</a> navigation links) between every script sectionAdd to _is_boilerplate():
if lowered == "back":
return True
This is a standalone-line-only check (exact match on "back") to avoid false positives where “back” appears within legitimate lyric text.
Also add "Meaning of Kriti" navigation link pattern — the report notes Dikshitar pages have "Meaning of Kriti-1" style links:
if re.match(r"^meaning of kriti", lowered):
return True
if lowered == "back": return True to _is_boilerplate() (early return, before the any() check)if lowered.startswith("meaning of kriti"): return True for Dikshitar navigation links"Back" → boilerplate=True"back" → boilerplate=True"go back to the beginning" → still passes through (contains “back” but not standalone)"Meaning of Kriti-1" → boilerplate=TrueUsing exact match (lowered == "back") is safer than substring match to avoid false positives. The word “back” is unlikely to appear as a standalone lyric line in Carnatic compositions.
tools/krithi-extract-enrich-worker/src/structure_parser.py — _is_boilerplate() methodtools/krithi-extract-enrich-worker/tests/test_structure_parser.py — add boilerplate filter test cases