introduce bitloops

This commit is contained in:
mike
2026-01-12 06:21:52 +01:00
parent 1df6d6266d
commit b7b66b5cd6
2 changed files with 37 additions and 29 deletions

View File

@@ -107,7 +107,7 @@ public class SwedishGeneratorTest {
var l8a = new Lemma("INERENAE");
var l1 = new Lemma("APPLE");
Assertions.assertEquals(Lemma.pack("APPLE".getBytes(StandardCharsets.US_ASCII)), l1.word());
Assertions.assertEquals(Lemma.pack("APPLE".getBytes(StandardCharsets.US_ASCII)), Lemma.unpackLetters(l1.word()));
assertEquals(5, l1.length());
assertEquals((byte) 'A', l1.byteAt(0));
assertEquals(1, l1.intAt(0));
@@ -120,7 +120,7 @@ public class SwedishGeneratorTest {
var entry3 = dict.index()[3];
assertEquals(1, entry3.words().length);
assertEquals(Lemma.pack("AXE".getBytes(StandardCharsets.US_ASCII)), entry3.words()[0].word());
assertEquals(Lemma.pack("AXE".getBytes(StandardCharsets.US_ASCII)), Lemma.unpackLetters(entry3.words()[0].word()));
// Check pos indexing
// AXE: A at 0, X at 1, E at 2