Class StopWords

java.lang.Object
org.ek9lang.assist.StopWords

public final class StopWords extends Object
Stop word set and synonym group map for Q&A matching. Stop words are removed during tokenization as they carry no matching value. Synonym groups map related terms to a canonical form for better matching.
  • Method Details

    • tokenize

      public static Set<String> tokenize(String input)
      Tokenize text for document field indexing: lowercase, split, strip punctuation, remove stop words, resolve synonyms. Does NOT inject migration hints.
    • tokenizeQuery

      public static Set<String> tokenizeQuery(String input)
      Tokenize user query text. Same as tokenize(String) but also injects "migrate" when a recognized programming language name is detected, steering results toward migration-focused Q&As.
    • resolveSynonym

      public static String resolveSynonym(String word)
      Map a word to its canonical synonym form. Returns the original word if no synonym group contains it.
    • isStopWord

      public static boolean isStopWord(String word)
      Check if a word is a stop word.