Repository navigation
feat(neuro): split channel names into words and add Chinese topic words - #1350
Merged
A-EDev merged 1 commit intoOct 19, 2026
Merged
Conversation
2 tasks done
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:
|
9 of 14 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Channel names were split on whitespace only, so a name written without spaces (
央視新聞) was one word and could never matchalwaysTopical, which holds English words only.This segments channel names with
NeuroText.words, uses the same segmentation inbuildContextWordList, and adds a Chinese topic list as data inresources/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.
[][新聞][][英文][][英文, 科技][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
Validation
./gradlew :app:assembleGithubDebug./gradlew :app:testGithubDebugUnitTest: 4179 tests, 0 failed, 47 skipped, on a clean checkout of this commit (includesNeuroBenchmarkTest)./gradlew ktlintCheck spotlessCheckDevice checks:
tokenizeChannelNamewas called from the built APK on the device throughapp_process, onmain(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.HiltTestRunnercrashes at start-up on this device (HiltTestApplicationnot found), so the test methods were invoked directly instead of throughconnectedAndroidTest.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.