public class TokenizerExample {
public static void main(String[] args) throws IOException {
AbstractTokenizer tokenizer;
if (args.length == 1) {
Mode mode = Mode.valueOf(args[0].toUpperCase());
tokenizer = AbstractTokenizer.builder().mode(mode).build();
} else if (args.length == 2) {
Mode mode = Mode.valueOf(args[0].toUpperCase());
tokenizer = AbstractTokenizer.builder().mode(mode).userDictionary(args[1]).build();
} else {
tokenizer = AbstractTokenizer.builder().build();
}
System.out.println("AbstractTokenizer ready. Provide input text and press RET.");