skills/llm/stopword-priority-sorting/SKILL.md
Initialize text ordering by placing stopwords first then content words, producing low-perplexity starting points for combinatorial search over word permutations
npx skillsauth add wenmin-wu/ds-skills llm-stopword-priority-sortingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
When minimizing LLM perplexity over word permutations, the initial ordering matters for local search convergence. Sorting stopwords (the, a, is, of) first and content words second produces a surprisingly low starting perplexity because LLMs assign high probability to function words at sequence starts. This simple heuristic gives a 20-40% perplexity reduction over alphabetical sorting as a starting point.
from nltk.corpus import stopwords
STOP_WORDS = set(stopwords.words('english'))
def stopword_priority_sort(words):
stops = sorted([w for w in words if w.lower() in STOP_WORDS])
content = sorted([w for w in words if w.lower() not in STOP_WORDS])
return stops + content
initial_order = stopword_priority_sort(text.split())
initial_text = ' '.join(initial_order)
data-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF