}
final boolean doWakati = args.length==1 ? args[0].equals("-wakati") : false;
final boolean doCount = args.length==1 ? args[0].equals("-count") : false;
final ReadLine rl = new ReadLine(System.in);
if(doCount) {
int count = 0;
for(String s=rl.read(); s != null; s=rl.read())
count += Tagger.wakati(s).size();
System.out.println("morpheme count: "+count);
} else if(doWakati) {
for(String s=rl.read(); s != null; s=rl.read()) {
for(String w : Tagger.wakati(s))
System.out.print(w+" ");
System.out.println("");
}
} else {
for(String s=rl.read(); s != null; s=rl.read()) {
for(Morpheme m : Tagger.parse(s))
System.out.println(m.surface+"\t"+m.feature);
System.out.println("EOS");
}
}