{ $description "Split a string along whitespace boundaries, convert all tokens to lower case, stem all tokens, and discards one-letter words and stop words." } ;
{ $description "Variable. A hashtable mapping stemmed search terms to hashtables mapping help topics to relevancy scores."
$terpri
"The " { $link search-help } " word searches the term index and the " { $link index-help } " word updates it." }
{ $see-also help } ;
HELP: discard-irrelevant "( results -- results )"
{ $values }
{ $description "Discard search results which rank in the lower 33% compared to the top scoring result, since they are most likely irrelevant." } ;
HELP: count-occurrences "( seq -- hash )"
{ $values { "seq" "a sequence of hashtables" } { "hash" "a hashtable" } }
{ $description "Collates all keys from the hashtables in " { $snippet "seq" } " and sums their values, which must be numbers." } ;
HELP: search-help "( phrase -- assoc )"
{ $values { "phrase" "a string" } { "assoc" "a sequence of pairs" } }
{ $description "Performs a full-text search in the term index for help topics relating to " { $snippet "phrase" } ". The result is an association list of topic names paired with scores, sorted by decreasing score." } ;
HELP: index-help "( -- )"
{ $description "Updates the full-text search term index for use by " { $link search-help } " and " { $link search-help. } "." } ;
HELP: search-help. "( phrase -- )"
{ $values { "phrase" "a string" } }
{ $description "Performs a full-text search in the term index for help topics relating to " { $snippet "phrase" } ", and prints an outliner with the results." } ;