Skip to content

fix: the classifier matches whole words; one feeling word fires one signal - #73

Open
alexeybe1kin wants to merge 5 commits into
mainfrom
fix/classifier-words
Open

alexeybe1kin wants to merge 5 commits into
mainfrom
fix/classifier-words

Conversation

@alexeybe1kin

Copy link
Copy Markdown
Collaborator

Hunt findings memorygate-2 F25 (and F26, dead code).

  • The memory classifier counted substring hits:

    • "again" inside "against" made a memory watch, the top priority;
    • "sad" inside "Sadie" or "crusade" made it phase;
    • "always" inside "hallways" counted as preference language.

    Phrases now match as whole words. A curly apostrophe counts as a straight one, so "can’t stop" typed on a phone matches.

  • "sad", "anxious", "stressed", "overwhelmed" and "right now" sat in two lists each, so one word fired two phase signals. A phase now has two independent signals, a feeling and a timeframe. So "sad and overwhelmed this week" is medium, not high. Only the stored confidence label changes; nothing reads it for decisions.

  • The unused NEGATION_WORDS list is removed.

Tests: tests/test_classifier.py gains inside-a-word, curly-apostrophe and "one word, one signal" cases. 9 of them fail on main; "constraint" is coverage only. 22 passed locally; ruff, types and sizes ok.

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.

1 participant