// // //N-Grams統計を用いた辞書です // // // class NGramDic extends Dictionary { private Index head; public NGramDic() { head = new Index(); } public Index getIndex() { return head; } public void create( Read read) { String temp; StringKumi kumi; read.init(); NFilter filter = new NFilter(read); while(null != (temp = filter.next())) { //System.out.println(temp); kumi = new StringKumi(temp); while(null!=(temp = kumi.push())) { head.add(temp,"null",0); } } read.fin(); } public boolean haveString(String st) { return true; } /* public static void main(String args[]) { NGramDic dic = new NGramDic(); dic.create(new FileRead()); Index ind = dic.getIndex(); ind.save("Yumenotest"); IndexData d = ind.searchIndexData(args[0]); // Index ind = new Index(); System.out.println(ind.includeKeyword("Yumenotest",args[0])); if(d != null) { System.out.println("volumu"+d.getVolumu()); } } */ }