introduce bitloops
This commit is contained in:
@@ -8,7 +8,8 @@ import java.nio.channels.FileChannel;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.LongConsumer;
|
||||
import static java.nio.charset.StandardCharsets.US_ASCII;
|
||||
|
||||
public final class CsvIndexService
|
||||
implements Closeable {
|
||||
@@ -42,7 +43,7 @@ public final class CsvIndexService
|
||||
}
|
||||
return GSON.fromJson(rawClue, String[].class);
|
||||
}
|
||||
public static void lineToLemma(String line, Consumer<Lemma> ok) {
|
||||
public static void lineToLemma(String line, LongConsumer ok) {
|
||||
if (line.isBlank()) {
|
||||
throw new RuntimeException("Empty line");
|
||||
}
|
||||
@@ -58,7 +59,7 @@ public final class CsvIndexService
|
||||
if (Main.VERBOSE) System.err.println("Word too complex: " + line);
|
||||
return;
|
||||
}
|
||||
ok.accept(new Lemma(id, word));
|
||||
ok.accept(Lemma.pack(id, word.getBytes(US_ASCII)));
|
||||
}
|
||||
|
||||
public static int simpel(int index) {
|
||||
|
||||
Reference in New Issue
Block a user