Class InitialArticleWord

    • Constructor Detail

      • InitialArticleWord

        protected InitialArticleWord​(boolean stripWord)
      • InitialArticleWord

        protected InitialArticleWord()
    • Method Detail

      • filter

        public String filter​(String str)
        When no language is passed, use null and let implementation decide what to do
        Specified by:
        filter in interface TextFilter
      • filter

        public String filter​(String str,
                             String lang)
        Do an initial definite/indefinite article filter on the passed string. On matching an initial word, can strip or move to the end, depending on the configuration of the implementing class.
        Specified by:
        filter in interface TextFilter
        Parameters:
        str - The string to parse
        lang - The language of the passed string
        Returns:
        String The filtered string
      • getArticleWords

        protected abstract String[] getArticleWords​(String lang)
        Abstract method to get the list of words to use in the initial word filter
        Parameters:
        lang - The language to retrieve article words for
        Returns:
        An array of definite/indefinite article words