Пример #1
0
 public static void makeNorepeat() {
   String[] sourceFiles = {
     "f:/slava/dictionaries/long/lexi1.enc",
     "f:/slava/dictionaries/long/lexi2.enc",
     "f:/slava/dictionaries/long/lexi3.enc",
     "f:/slava/dictionaries/long/lexi4.enc",
     "f:/slava/dictionaries/long/lexi5.enc",
     "f:/slava/dictionaries/long/lexi6.enc",
   };
   WordReader p = new WordReader();
   p.setSourceFiles(sourceFiles);
   p.load();
   p.filterOutWordsWithRepeatingLetters();
   p.save("f:/slava/dictionaries/norepeat7.txt", 5);
 }
Пример #2
0
 static void process() {
   String[] sourceFiles = {"f:/slava/dictionaries/norepeat7.txt"};
   WordReader p = new WordReader();
   p.setSourceFiles(sourceFiles);
   p.load();
   try {
     //			p.collectNoncrossingWords();
     int min = 100;
     while (min < 160) {
       int sz = p.filter(min);
       if (sz > min) {
         min = sz;
         System.out.println("-->" + sz);
       }
     }
   } catch (IOException e) {
   }
 }