Skip to content

support Kugou LRC, optimize navigation, and add context-aware romanizer#2030

Merged
theovilardo merged 5 commits into
theovilardo:masterfrom
Amonoman:master
May 17, 2026
Merged

support Kugou LRC, optimize navigation, and add context-aware romanizer#2030
theovilardo merged 5 commits into
theovilardo:masterfrom
Amonoman:master

Conversation

@Amonoman
Copy link
Copy Markdown
Contributor

@Amonoman Amonoman commented May 17, 2026

Description

This PR introduces comprehensive updates to lyrics handling, page navigation animations, and language romanization.

Key Changes

  • Lyrics & Navigation:

    • Added support for Kugou word-by-word LRC format.
    • Optimized page transitions using Material Design 3 Expressive motion profiles.
  • Context-Aware Romanizer:

    • Chinese: Implemented a POLYPHONE_OVERRIDE table and CONTEXT_PINYIN map for neighbor-based disambiguation (resolving common duōyīnzì like 行/长/重/乐/得). Added handling for tonal sandhi (一/不) and Erhua (儿化) suffix merging. Falls back to Pinyin4j.
    • Japanese: Added support for irregular compounds (今日/明日/昨日), Hepburn-style 'ん' conversion ($n \rightarrow m$ before b/p), sokuon variants (ッ/っ), and non-independent (hi-jiritsu) morpheme spacing.
    • Cyrillic: Added ь palatalization handling (e.g., нь $\rightarrow$ ny), silenced ъ, context-split е (ye vs. e), and strict ё $\rightarrow$ yo conversion.

Closes #1895

Amonoman added 4 commits May 17, 2026 14:37
…rillic

Chinese: tonal sandhi for 一/不, Erhua (儿化) suffix merging.
Japanese: irregular compounds (今日/明日/昨日), ん→m before b/p (Hepburn),
  both ッ/っ sokuon variants, 非自立 morpheme spacing.
Cyrillic: ь palatalization of preceding consonant output (нь→ny, ть→ty…),
  ъ hard sign silenced, е context-split (ye vs e), ё always yo.
Add POLYPHONE_OVERRIDE table (50 entries) and CONTEXT_PINYIN map for
neighbor-based disambiguation. getPinyin() now checks context and
override before falling back to Pinyin4j, fixing common 多音字 errors
in song lyrics (行/长/重/乐/得 etc.).
@Amonoman Amonoman changed the title Support Kugou LRC format and optimize page transitions support Kugou LRC, optimize navigation, and add context-aware romanizer May 17, 2026
- Fix compile error: Regex("\s+") → Regex("""\s+""") (raw string) in
  romanizeChinese — \s is not a valid Kotlin string escape (line 423)
- Replace all java.lang.StringBuilder usages with Kotlin StringBuilder
  (romanizeKorean, romanizeHindi, romanizePunjabi, romanizeChinese,
  processCyrillicWordByWord, processUkrainian, processBelarusian)
- Remove unused variable origTrans in parseLyrics
- Deduplicate double matrix.map(Offset(...)) calls in
  List<PathNode>.transform — each MoveTo/LineTo now computed once
- Translate all Spanish comments and KDocs to English for consistency
@theovilardo theovilardo merged commit 7e8d8f0 into theovilardo:master May 17, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug?/Feature Request]Cannot parse word‑level timestamps from inline <start,end> markers – missing word‑duration recognition

2 participants