Skip to content

fix(util): add missing comma between "never" and "nevertheless" stop words#1308

Open
Osamaali313 wants to merge 1 commit into
llmware-ai:mainfrom
Osamaali313:fix/stopwords-missing-comma
Open

fix(util): add missing comma between "never" and "nevertheless" stop words#1308
Osamaali313 wants to merge 1 commit into
llmware-ai:mainfrom
Osamaali313:fix/stopwords-missing-comma

Conversation

@Osamaali313

Copy link
Copy Markdown

Problem

In Utilities.get_stop_words_master_list() (llmware/util.py, line 502) two adjacent stop-word entries are missing the comma between them:

,"needs", "neither" ,"never""nevertheless" ,"new" ,"next" , ...

"never""nevertheless" is Python implicit string-literal concatenation → it compiles to the single token "nevernevertheless". Every other one of the ~750 entries in the list is comma-separated; this is the only adjacency. Consequences:

  • "never" is not in the returned list.
  • "nevertheless" is not in the returned list.
  • a junk token "nevernevertheless" is in the list and can never match a real word.

Impact

get_stop_words_master_list() feeds remove_stop_words() / prune_stop_words() / CorpTokenizer, used in the tokenization and context-pruning paths across prompts.py, retrieval.py, models.py, and agents.py. So "never" and "nevertheless" (canonical English stop words) are treated as meaningful tokens during search-relevance tokenization and context reduction instead of being filtered.

Reproduction

from llmware.util import Utilities
s = Utilities.get_stop_words_master_list()
before after
"never" in s False True
"nevertheless" in s False True
"nevernevertheless" in s True False

Fix

Insert the missing comma:

,"needs", "neither" ,"never" ,"nevertheless" ,"new" ,"next" , ...

Verified against the real function (list now contains both words and no longer the merged token); python -m py_compile llmware/util.py passes.

…words

In Utilities.get_stop_words_master_list the entries "never" and "nevertheless"
had no comma between them, so Python implicit string concatenation merged them
into a single junk token "nevernevertheless". As a result neither "never" nor
"nevertheless" is in the stop-word list, and a token that can never match any
real word is. This list feeds remove_stop_words / CorpTokenizer used in the
tokenization/pruning paths (prompts, retrieval, models, agents), so both words
are treated as meaningful tokens instead of being filtered. Add the comma.
Copilot AI review requested due to automatic review settings July 14, 2026 20:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants