Skip to content

Encoding input string with quotes #4

Open
@kdujmic

Description

@kdujmic

private final String encodingExampleWithQuotes = "Hello my name is "Kevin".";

When testing with a string that has quotes I get error.

    GPT2Tokenizer tokenizer = GPT2Tokenizer.fromPretrained("tokenizers/gpt2");
    List<Integer> result = tokenizer.encode(encodingExampleWithQuotes);
    Assertions.assertEquals(decodingExampleWithQutes, result);

java.lang.NullPointerException: Cannot invoke "java.math.BigInteger.intValue()" because the return value of "java.util.Map.get(Object)" is null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions