Skip to content

Bug: Certain valid words are not returned correctly by T9 prediction #11

Description

@stag019

Description (This bug report was written primarily with AI)

Some valid words are not selected correctly by the T9 prediction system, even when they exist in both:

  • the dictionary/library
  • priority_words.txt

Example:

47

returns:

ir

instead of:

is

This issue occurs using the default bundled trie/library and default priority_words.txt included with the project. No custom dictionary is required to reproduce it.


Expected Behavior

Typing:

47

should prioritize and return:

is

since "is" exists in the default dictionary and priority words list.


Actual Behavior

The prediction system returns:

ir

instead.


Suspected Cause

This appears related to trie serialization/search behavior for words that are both:

  • complete words
  • prefixes of longer words

Example:

is

is also a prefix for words like:

issue
island
etc.

The issue may be somewhere in how trie node state is encoded/decoded between the Kotlin trie builder and the CircuitPython runtime search logic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions