Search in sources :

Example 1 with FixedBitVector

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;
}
Also used : FixedBitVector(zemberek.core.collections.FixedBitVector)

Aggregations

FixedBitVector (zemberek.core.collections.FixedBitVector)1