mirror of
https://github.com/Horizontal42/Sort_YM.git
synced 2026-11-10 15:42:02 +03:00
drop ru-specific wording from lyrics digest headers
This commit is contained in:
parent
93127e37d8
commit
a56cc9a4f1
2 changed files with 5 additions and 5 deletions
|
|
@ -304,8 +304,8 @@ def lyrics_block(analysis: dict[str, dict]) -> list[str]:
|
|||
pov_part = " / ".join(f"{name} {n}" for name, n in sorted(povs.items(), key=lambda kv: (-kv[1], kv[0])))
|
||||
|
||||
return [
|
||||
"## Лирика (RU-подмножество)",
|
||||
f"Разбор текстов {len(entries)} RU-треков локальной моделью; подробнее — out/{LYRICS_DIGEST_FILE}.",
|
||||
"## Лирика",
|
||||
f"Разбор текстов {len(entries)} треков локальной моделью; подробнее — out/{LYRICS_DIGEST_FILE}.",
|
||||
f"- Настроения: {moods}",
|
||||
f"- Темы: {themes}",
|
||||
f"- Тон: {stance_part}",
|
||||
|
|
@ -452,7 +452,7 @@ def render_lyrics_digest(tracks_cache: dict[str, dict], analysis: dict[str, dict
|
|||
failed = len(analysis) - len(analyzed_entries(analysis))
|
||||
|
||||
lines = [
|
||||
"# Разбор текстов (RU-треки)",
|
||||
"# Разбор текстов",
|
||||
"",
|
||||
f"Разобрано треков: {len(entries)}. Группировка по основному настроению; "
|
||||
"цитата приводится только если сверена с текстом дословно.",
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ def test_analyzed_entries_excludes_error_markers():
|
|||
def test_lyrics_block_is_compact():
|
||||
lines = digest.lyrics_block(ANALYSIS)
|
||||
|
||||
assert lines[0] == "## Лирика (RU-подмножество)"
|
||||
assert lines[0] == "## Лирика"
|
||||
assert len(lines) <= 7, "агрегат в digest.md должен оставаться компактным"
|
||||
assert any("melancholy 2" in line for line in lines)
|
||||
assert any("city 2" in line for line in lines)
|
||||
|
|
@ -329,7 +329,7 @@ def test_render_digest_with_analysis_includes_lyrics_section():
|
|||
|
||||
text = digest.render_digest(rows, tracks_cache, {}, top_artists=10, top_albums=10, analysis=ANALYSIS)
|
||||
|
||||
assert "## Лирика (RU-подмножество)" in text
|
||||
assert "## Лирика" in text
|
||||
|
||||
|
||||
LYRICS_TRACKS = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue