public Encoding encode(String text) { return encode(text, Language.UNKNOWN); }
@Test
    void truncates_to_max_length() throws IOException {
        int maxLength = 3;
        var builder = new HuggingFaceTokenizer.Builder()
                .addDefaultModel(decompressModelFile(tmp, "bert-base-uncased"))
                .setMaxLength(maxLength)
                .setTruncation(true);
        String input = "what was the impact of the manhattan project";
        try (var tokenizerWithoutSpecialTokens = builder.addSpecialTokens(false).build();
             var tokenizerWithSpecialTokens = builder.addSpecialTokens(true).build()) {
            var encodingWithoutSpecialTokens = tokenizerWithoutSpecialTokens.encode(input);
            assertMaxLengthRespected(maxLength, encodingWithoutSpecialTokens);
            assertNotEquals(101, encodingWithoutSpecialTokens.ids().get(0));
            var encodingWithSpecialTokens = tokenizerWithSpecialTokens.encode(input);
            assertMaxLengthRespected(maxLength, encodingWithSpecialTokens);
            assertEquals(101, encodingWithSpecialTokens.ids().get(0));
        }
    }