private static <R> R withContextClassloader(Supplier<R> r) {
        var original = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(HuggingFaceTokenizer.class.getClassLoader());
        try {
            return r.get();
        } finally {
            Thread.currentThread().setContextClassLoader(original);
        }
    }
{@link Embedder}/{@link Segmenter} using Deep Java Library's HuggingFace Tokenizer.

@author bjorncs
linguistics-components/src/main/java/com/yahoo/language/huggingface/HuggingFaceTokenizer.java