Skip to content

feat(neuro): split channel names into words and add Chinese topic words - #1350

Merged
A-EDev merged 1 commit into
Flow-Tube:mainfrom
Chiehx0220:neuro-channel-name-segmentation
Oct 19, 2026
Merged

A-EDev merged 1 commit into
Flow-Tube:mainfrom
Chiehx0220:neuro-channel-name-segmentation

Conversation

@Chiehx0220

Copy link
Copy Markdown
Contributor

Summary

Channel names were split on whitespace only, so a name written without spaces (央視新聞) was one word and could never match alwaysTopical, which holds English words only.

This segments channel names with NeuroText.words, uses the same segmentation in buildContextWordList, and adds a Chinese topic list as data in resources/neuro/topical/zh.txt (Traditional and Simplified spellings, 109 entries).

Every entry comes out as a single word from the platform word breaker on an Android device. Candidates that the breaker splits (動漫, 評測, 人工智慧, …) were left out, so every entry can match.

Channel name Before After
央視新聞 [] [新聞]
阿滴英文 [] [英文]
英文教室 科技 [] [英文, 科技]
Linus Tech Tips [tech] [tech]

No key spec change: only the topic words taken from channel names are affected.

Related issue

Part of #1341 (point 2).

Change type

  • Bug fix
  • Feature
  • Refactor or maintenance
  • Build, packaging, or CI
  • Documentation

Validation

  • ./gradlew :app:assembleGithubDebug
  • ./gradlew :app:testGithubDebugUnitTest: 4179 tests, 0 failed, 47 skipped, on a clean checkout of this commit (includes NeuroBenchmarkTest)
  • ./gradlew ktlintCheck spotlessCheck
  • I manually tested the affected behavior on an Android device or emulator.

Device checks:

  • tokenizeChannelName was called from the built APK on the device through app_process, on main (before) and on this branch (after), with the results in the table above.
  • NeuroTextSegmentationTest, including the new case, was run on the device and all 5 tests pass. HiltTestRunner crashes at start-up on this device (HiltTestApplication not found), so the test methods were invoked directly instead of through connectedAndroidTest.
  • Not tested through the app UI.

Test device and Android version: Pixel 6, Android 16

Risk and compatibility

No key, preference or schema change. A channel name that contains a listed word now contributes a topic; other names are unchanged. Trimming now keeps combining marks, so Thai and Devanagari names are no longer cut at a tone or vowel mark.

  • The change does not introduce secrets, private data, or unexpected telemetry.
  • No new user-facing text.
  • No dependency or lockfile changes.
  • No Room schema change.
  • No breaking changes.

@A-EDev

A-EDev commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

Thanks, merging. I checked every entry in zh.txt against ICU and each one stays a single word. The channel names I tried also come out right: 東森新聞, 華視新聞, TVBS新聞, 科技美學 and 美食作家王刚.

Two follow-ups. Either can go in the key spec PR:

  1. Broad words and dislikes. English channel names never produce news, and news, music, game, tech and education are in REJECTION_BROAD_TOPICS in NeuroScoring.kt, so "not interested" never records them. The Chinese equivalents have neither guard. Every video from a news channel now carries 新聞, so two dislikes on news channels can hide all Chinese news. Please add the broad ones to REJECTION_BROAD_TOPICS: 新聞/新闻, 音樂/音乐, 遊戲/游戏, 科技, 電影/电影, 教育, 美食, 旅遊/旅游. Nothing stems Chinese, so this shouldn't change any keys, but please confirm.
  2. A JVM test for the Chinese path. CI compiles androidTest but never runs it, so nothing on CI checks that a Chinese topic comes out of tokenizeChannelName. The JDK breaker splits at the script boundary, so this works in NeuroChannelNameTest:
    assertThat(tokenizer.tokenizeChannelName("TVBS新聞")).containsExactly("新聞")

@A-EDev
A-EDev merged commit c8bdb07 into Flow-Tube:main Oct 19, 2026
6 checks passed
@Chiehx0220
Chiehx0220 deleted the neuro-channel-name-segmentation branch October 22, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

algorithm Recommendation engine and math

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants