use of zemberek.core.collections.FixedBitVector in project zemberek-nlp by ahmetaa.
the class TextUtil method generateBitLookup.
public static FixedBitVector generateBitLookup(String characters) {
int max = 0;
for (char c : characters.toCharArray()) {
if (c > max) {
max = c;
}
}
FixedBitVector result = new FixedBitVector(max + 1);
for (char c : characters.toCharArray()) {
result.set(c);
}
return result;
}
Aggregations