fix(util): add missing comma between "never" and "nevertheless" stop words#1308
Open
Osamaali313 wants to merge 1 commit into
Open
fix(util): add missing comma between "never" and "nevertheless" stop words#1308Osamaali313 wants to merge 1 commit into
Osamaali313 wants to merge 1 commit into
Conversation
…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.
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.
Problem
In
Utilities.get_stop_words_master_list()(llmware/util.py, line 502) two adjacent stop-word entries are missing the comma between them:"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."nevernevertheless"is in the list and can never match a real word.Impact
get_stop_words_master_list()feedsremove_stop_words()/prune_stop_words()/CorpTokenizer, used in the tokenization and context-pruning paths acrossprompts.py,retrieval.py,models.py, andagents.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
"never" in sFalse❌True"nevertheless" in sFalse❌True"nevernevertheless" in sTrue❌FalseFix
Insert the missing comma:
Verified against the real function (list now contains both words and no longer the merged token);
python -m py_compile llmware/util.pypasses.