import java.io.*; public class ExeCreateDicFromFoler { public static void main(String args[]) { File di = new File(args[0]); String str[]; str = di.list(); for(int i= 0;i< str.length;i++) { NGramDic dic = new NGramDic(); dic.create(new FileRead(args[0]+"/"+ str[i])); IndexData ind = dic.getIndex().IndexData(); dic.getIndex().saveFile(str[i]+"dic"); } } }