// Path: src/main/java/com/worksap/nlp/sudachi/dictionary/CategoryType.java
// public enum CategoryType {
//     /** The fall back category. */
//     DEFAULT(1),
//     /** White spaces. */
//     SPACE(1 << 1),
//     /** CJKV ideographic characters. */
//     KANJI(1 << 2),
//     /** Symbols. */
//     SYMBOL(1 << 3),
//     /** Numerical characters. */
//     NUMERIC(1 << 4),
//     /** Latin alphabets. */
//     ALPHA(1 << 5),
//     /** Hiragana characters. */
//     HIRAGANA(1 << 6),
//     /** Katakana characters. */
//     KATAKANA(1 << 7),
//     /** Kanji numeric characters. */
//     KANJINUMERIC(1 << 8),
//     /** Greek alphabets. */
//     GREEK(1 << 9),
//     /** Cyrillic alphabets. */
//     CYRILLIC(1 << 10),
//     /** User defined category. */
//     USER1(1 << 11),
//     /** User defined category. */
//     USER2(1 << 12),
//     /** User defined category. */
//     USER3(1 << 13),
//     /** User defined category. */
//     USER4(1 << 14),
//     /** Characters that cannot be the beginning of word */
//     NOOOVBOW(1 << 15);
// 
//     private final int id;
// 
//     private CategoryType(int id) {
//         this.id = id;
//     }
// 
//     /**
//      * Returns the integer ID number of the category.
//      *
//      * @return the ID number of the category
//      */
//     public int getId() {
//         return id;
//     }
// 
//     /**
//      * Returns the category to which the specified ID is mapped, or {@code null} if
//      * there is no associated category.
//      *
//      * @param id
//      *            the ID number of category
//      * @return the category to which the specified ID is mapped, or {@code null} if
//      *         there is no associated category.
//      */
//     public static CategoryType getType(int id) {
//         for (CategoryType type : CategoryType.values()) {
//             if (type.getId() == id) {
//                 return type;
//             }
//         }
//         return null;
//     }
// }


import java.util.EnumSet;
import java.util.Set;
import com.worksap.nlp.sudachi.dictionary.CategoryType;
        return continuousCategory;
    }

    @Override
    public int getCharCategoryContinuousLength(int index) {
        Set<CategoryType> continuousCategory = types[index].clone();
        for (int i = text.offsetByCodePoints(index, 1); i < text.length(); i = text.offsetByCodePoints(i, 1)) {
            continuousCategory.retainAll(types[i]);
            if (continuousCategory.isEmpty()) {
                return i - index;
            }
        }
        return text.length() - index;
    }

    @Override
    public int getCodePointsOffsetLength(int index, int codePointOffset) {
        return text.offsetByCodePoints(index, codePointOffset) - index;
    }

    @Override
    public int codePointCount(int begin, int end) {
        return Character.codePointCount(text, begin, end);
    }

    @Override
    public boolean canBow(int index) {
        return true;
    }

// Path: src/main/java/com/worksap/nlp/sudachi/dictionary/CategoryType.java
// public enum CategoryType {
//     /** The fall back category. */
//     DEFAULT(1),
//     /** White spaces. */
//     SPACE(1 << 1),
//     /** CJKV ideographic characters. */
//     KANJI(1 << 2),
//     /** Symbols. */
//     SYMBOL(1 << 3),
//     /** Numerical characters. */
//     NUMERIC(1 << 4),
//     /** Latin alphabets. */
//     ALPHA(1 << 5),
//     /** Hiragana characters. */
//     HIRAGANA(1 << 6),
//     /** Katakana characters. */
//     KATAKANA(1 << 7),
//     /** Kanji numeric characters. */
//     KANJINUMERIC(1 << 8),
//     /** Greek alphabets. */
//     GREEK(1 << 9),
//     /** Cyrillic alphabets. */
//     CYRILLIC(1 << 10),
//     /** User defined category. */
//     USER1(1 << 11),
//     /** User defined category. */
//     USER2(1 << 12),
//     /** User defined category. */
//     USER3(1 << 13),
//     /** User defined category. */
//     USER4(1 << 14),
//     /** Characters that cannot be the beginning of word */
//     NOOOVBOW(1 << 15);
// 
//     private final int id;
// 
//     private CategoryType(int id) {
//         this.id = id;
//     }
// 
//     /**
//      * Returns the integer ID number of the category.
//      *
//      * @return the ID number of the category
//      */
//     public int getId() {
//         return id;
//     }
// 
//     /**
//      * Returns the category to which the specified ID is mapped, or {@code null} if
//      * there is no associated category.
//      *
//      * @param id
//      *            the ID number of category
//      * @return the category to which the specified ID is mapped, or {@code null} if
//      *         there is no associated category.
//      */
//     public static CategoryType getType(int id) {
//         for (CategoryType type : CategoryType.values()) {
//             if (type.getId() == id) {
//                 return type;
//             }
//         }
//         return null;
//     }
// }


// Path: src/test/java/com/worksap/nlp/sudachi/MockInputText.java
import java.util.EnumSet;
import java.util.Set;
import com.worksap.nlp.sudachi.dictionary.CategoryType;

        return continuousCategory;
    }

    @Override
    public int getCharCategoryContinuousLength(int index) {
        Set<CategoryType> continuousCategory = types[index].clone();
        for (int i = text.offsetByCodePoints(index, 1); i < text.length(); i = text.offsetByCodePoints(i, 1)) {
            continuousCategory.retainAll(types[i]);
            if (continuousCategory.isEmpty()) {
                return i - index;
            }
        }
        return text.length() - index;
    }

    @Override
    public int getCodePointsOffsetLength(int index, int codePointOffset) {
        return text.offsetByCodePoints(index, codePointOffset) - index;
    }

    @Override
    public int codePointCount(int begin, int end) {
        return Character.codePointCount(text, begin, end);
    }

    @Override
    public boolean canBow(int index) {
        return true;
    }

    @Override