POSModel model = new POSModelLoader().load(new File(args[0]));
POSTaggerME tagger = new POSTaggerME(model);
ObjectStream<String> lineStream =
new PlainTextByLineStream(new InputStreamReader(System.in));
PerformanceMonitor perfMon = new PerformanceMonitor(System.err, "sent");
perfMon.start();
try {
String line;
while ((line = lineStream.read()) != null) {
String whitespaceTokenizerLine[] = WhitespaceTokenizer.INSTANCE.tokenize(line);
String[] tags = tagger.tag(whitespaceTokenizerLine);
POSSample sample = new POSSample(whitespaceTokenizerLine, tags);