@Override
    public Tokenizer create(String toTokenize) {
        if (toTokenize.isEmpty()) {
            throw new IllegalArgumentException("Unable to proceed; no sentence to tokenize");
        }

        Tokenizer t = new JapaneseTokenizer(kuromoji, toTokenize, useBaseForm);

        if (preProcessor != null) {
            t.setTokenPreProcessor(preProcessor);
        }

        return t;
    }
@ Override public Tokenizer create ( String toTokenize ) { if ( toTokenize . isEmpty ( ) ) { throw new IllegalArgumentException ( "Unable to proceed; no sentence to tokenize" ) ; } Tokenizer t = new JapaneseTokenizer ( kuromoji , toTokenize , useBaseForm ) ; if ( preProcessor != null ) { t . setTokenPreProcessor ( preProcessor ) ; } return t ; }
Create a Tokenizer instance for the given sentence.

Note: This method is thread-safe.
@param toTokenize the string to tokenize.
@return The tokenizer.