Conversation
537fe55 to
658b02b
Compare
0bd89cb to
aac769f
Compare
|
Проблемни изречения:
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a new “Mind Reader” (next-word guessing) feature, integrates it into the IME suggestion flow, and exposes basic controls/stats via the debug/usage-stats settings screens.
Changes:
- Add a new
db.mindReadingmodule (tokenization, dictionary, n-gram storage, guessing, stats). - Integrate mind-reading guesses into the suggestions pipeline (including text-case handling and acceptance behavior).
- Add a debug toggle and usage-stats UI entries for mind-reading (including DB clear + stats display), plus localized strings.
Reviewed changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/xml/prefs_screen_usage_stats.xml | Adds Mind Reader stats container and a “clear DB” preference entry. |
| app/src/main/res/xml/prefs_screen_debug.xml | Adds a beta toggle (auto_mind_reading). |
| app/src/main/res/values/strings.xml | Adds new strings for mind reading + newline capitalization setting. |
| app/src/main/res/values-uk/strings.xml | Adds Ukrainian translation for mind reading strings. |
| app/src/main/res/values-tr/strings.xml | Adds Turkish translation for mind reading strings. |
| app/src/main/res/values-ru/strings.xml | Adds Russian translation for mind reading strings. |
| app/src/main/res/values-pt-rBR/strings.xml | Adds Brazilian Portuguese translation for mind reading strings. |
| app/src/main/res/values-nl/strings.xml | Adds Dutch translation for mind reading strings. |
| app/src/main/res/values-lt/strings.xml | Adds Lithuanian translation for mind reading strings. |
| app/src/main/res/values-iw/strings.xml | Adds Hebrew translation for mind reading strings. |
| app/src/main/res/values-it/strings.xml | Adds Italian translation for mind reading strings. |
| app/src/main/res/values-fr/strings.xml | Adds French translation for mind reading strings. |
| app/src/main/res/values-es/strings.xml | Adds Spanish translation for mind reading strings. |
| app/src/main/res/values-de/strings.xml | Adds German translation for mind reading strings (currently contains a French string). |
| app/src/main/res/values-bg/strings.xml | Adds Bulgarian translation for mind reading strings. |
| app/src/main/java/io/github/sspanak/tt9/util/chars/Punctuation.java | Adds ZWJ/ZWNJ code point constants. |
| app/src/main/java/io/github/sspanak/tt9/util/chars/Emoji.java | Adds isGraphic(int codePoint) overload. |
| app/src/main/java/io/github/sspanak/tt9/util/TextTools.java | Adds helpers for whitespace suffix + single-codepoint checks. |
| app/src/main/java/io/github/sspanak/tt9/ui/tray/SuggestionsBar.java | Adds support for “guess-only” lists and text-case transformation. |
| app/src/main/java/io/github/sspanak/tt9/preferences/settings/SettingsTyping.java | Adds auto_mind_reading + new auto-text-case helper logic. |
| app/src/main/java/io/github/sspanak/tt9/preferences/screens/UsageStatsScreen.java | Prints Mind Reader stats and wires a “clear DB” action (currently stubbed). |
| app/src/main/java/io/github/sspanak/tt9/preferences/PreferencesActivity.java | Updates DataStore init to accept an ExecutorService. |
| app/src/main/java/io/github/sspanak/tt9/languages/NaturalLanguage.java | Adds API for alternative letters lookup. |
| app/src/main/java/io/github/sspanak/tt9/languages/LanguageKind.java | Adds language feature helpers (apostrophes / space-as-punctuation / IDs). |
| app/src/main/java/io/github/sspanak/tt9/languages/Language.java | Adds equals(Object) override (without hashCode). |
| app/src/main/java/io/github/sspanak/tt9/ime/modes/helpers/AutoTextCase.java | Adjusts text-case determination logic. |
| app/src/main/java/io/github/sspanak/tt9/ime/modes/ModeWords.java | Gates next-word text-case determination on settings. |
| app/src/main/java/io/github/sspanak/tt9/ime/modes/ModeABC.java | Minor cleanup in ABC mode sectioning. |
| app/src/main/java/io/github/sspanak/tt9/ime/modes/InputMode.java | Splits getTextCase() into computed vs raw. |
| app/src/main/java/io/github/sspanak/tt9/ime/helpers/SuggestionOps.java | Adds guess handling and list-level text-case adjustment. |
| app/src/main/java/io/github/sspanak/tt9/ime/helpers/StandardInputType.java | Makes a couple of helpers protected for subclass use. |
| app/src/main/java/io/github/sspanak/tt9/ime/VoiceHandler.java | Switches to SuggestionHandler and respects auto-text-case setting. |
| app/src/main/java/io/github/sspanak/tt9/ime/UiHandler.java | Introduces a cached-thread-pool executor used by IME tasks. |
| app/src/main/java/io/github/sspanak/tt9/ime/TypingHandler.java | Integrates mind-reader context lifecycle and async suggestion loading IDs. |
| app/src/main/java/io/github/sspanak/tt9/ime/TraditionalT9.java | Converts background init/tasks to executor.submit() and passes executor to DataStore. |
| app/src/main/java/io/github/sspanak/tt9/ime/SuggestionHandler.java | New shared handler for async suggestion + mind-reader guess coordination. |
| app/src/main/java/io/github/sspanak/tt9/ime/HotkeyHandler.java | Adds behavior for accepting “guess-only” suggestions and clears mind-reader context on navigation. |
| app/src/main/java/io/github/sspanak/tt9/ime/CommandHandler.java | Updates suggestion loading calls + keeps mind-reader language/text-case in sync. |
| app/src/main/java/io/github/sspanak/tt9/hacks/InputType.java | Adds notMindReadableText() gating logic for Mind Reader usage. |
| app/src/main/java/io/github/sspanak/tt9/hacks/AppHacks.java | Adjusts cursor-reset behavior to account for “no ordinary words” state. |
| app/src/main/java/io/github/sspanak/tt9/db/words/WordStore.java | Adds exists(language, word, sequence) and uses faster existence checks. |
| app/src/main/java/io/github/sspanak/tt9/db/sqlite/ReadOps.java | Adds fast exists() query path and a small SQL cache. |
| app/src/main/java/io/github/sspanak/tt9/db/mindReading/MindReaderNgramList.java | New in-memory n-gram store with MRU + variation limits. |
| app/src/main/java/io/github/sspanak/tt9/db/mindReading/MindReaderNgram.java | New n-gram representation + validation + ordering. |
| app/src/main/java/io/github/sspanak/tt9/db/mindReading/MindReaderDictionary.java | New token dictionary used by mind-reading predictions. |
| app/src/main/java/io/github/sspanak/tt9/db/mindReading/MindReaderContext.java | New context handling and token validation against dictionary/DB. |
| app/src/main/java/io/github/sspanak/tt9/db/mindReading/MindReader.java | New mind-reading engine (guess current/next, stats, async execution). |
| app/src/main/java/io/github/sspanak/tt9/db/mindReading/ContextTokenizer.java | New tokenizer for building context tokens (word/punct/emoji/number/etc). |
| app/src/main/java/io/github/sspanak/tt9/db/customWords/CustomWordsImporter.java | Updates existence check to use sequence-based query. |
| app/src/main/java/io/github/sspanak/tt9/db/DataStore.java | Makes executor injectable and adds exists(language, word, sequence). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 49 out of 49 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
de151fb to
d0a9807
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 58 out of 58 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
595a9e5 to
a75736a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 51 out of 51 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 52 out of 52 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 53 out of 53 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 54 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| final SQLiteStatement query = CompiledQueryCache.get(db, sql); | ||
| query.bindString(1, sequence); | ||
| query.bindString(2, word); | ||
| query.bindString(3, word.toLowerCase(language.getLocale())); | ||
| query.bindString(4, word.toUpperCase(language.getLocale())); | ||
|
|
||
| try { | ||
| return query.simpleQueryForString(); | ||
| } catch (SQLiteDoneException e) { | ||
| return null; |
There was a problem hiding this comment.
The comment is true, but this is used in two places - in the mind reader, and when inserting new words. So, it is safe.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
First stage of #851