2008-09-12から1日間の記事一覧
まあこんなものか。 $KCODE='s' #適宜 require 'jcode' def pad(width,word) wordwidth=word.jlength*2-(word.count 'a-zA-Z0-9') #TODO: 記号にも対応する return word if width <= wordwidth return ' '*(width-wordwidth)+word end irb(main):016:0> puts…
環境:sen 1.2.2.1 IndexOutOfBoundsExceptionって明らかにバグやんけ。 エラーメッセージ java.lang.RuntimeException: java.lang.IndexOutOfBoundsException at net.java.sen.Dictionary.getPosInfo(Dictionary.java:149) at net.java.sen.Viterbi.analyze(…