Class StringWordTokenizer

  • All Implemented Interfaces:
    WordTokenizer

    public class StringWordTokenizer
    extends AbstractWordTokenizer
    This class tokenizes a input string.

    It also allows for the string to be altered by calls to replaceWord(). The result after the spell checking is completed is available to the call to getContext.

    Author:
    Jason Height (jheight@chariot.net.au), Anthony Roy (ajr@antroy.co.uk)
    • Constructor Detail

      • StringWordTokenizer

        public StringWordTokenizer​(java.lang.String s)
        Creates a new StringWordTokenizer object.
        Parameters:
        s - the string to tokenize.
      • StringWordTokenizer

        public StringWordTokenizer​(WordFinder wf)
        Creates a new StringWordTokenizer object.
        Parameters:
        wf - the custom WordFinder to use in tokenizing. Note that the string to tokenize will be encapsulated within the WordFinder.
      • StringWordTokenizer

        public StringWordTokenizer​(java.lang.String s,
                                   WordFinder finder)
        Creates a new StringWordTokenizer object.
        Parameters:
        s - the string to work on
        finder - the custom WordFinder to use in tokenizing. Note that the string to tokenize will be encapsulated within the WordFinder.
    • Method Detail

      • getFinalText

        public java.lang.String getFinalText()
        Deprecated.
        use getContext() instead as per the WordTokenizer interface specification.
        Returns:
        the final text.