if (args.length != 1) {
System.out.println(getHelp());
throw new TerminateToolException(1);
}
Detokenizer detokenizer = new DictionaryDetokenizer(
new DetokenizationDictionaryLoader().load(new File(args[0])));
ObjectStream<String> tokenizedLineStream =
new PlainTextByLineStream(new InputStreamReader(System.in));
PerformanceMonitor perfMon = new PerformanceMonitor(System.err, "sent");
perfMon.start();
try {
String tokenizedLine;
while ((tokenizedLine = tokenizedLineStream.read()) != null) {
// white space tokenize line
String tokens[] = WhitespaceTokenizer.INSTANCE.tokenize(tokenizedLine);
DetokenizationOperation operations[] = detokenizer.detokenize(tokens);
System.out.println(detokenize(tokens, operations));
perfMon.incrementCounter();
}