View Source tflite_beam_full_tokenizer (tflite_beam v0.3.8)

Runs end-to-end tokenization.

Related link: https://github.com/tensorflow/examples/blob/master/lite/examples/bert_qa/ios/BertQACore/Models/Tokenizers/FullTokenizer.swift

Summary

Functions

Convert to ID in the vocab

End-to-end tokenization.

Functions

convert_to_id(Tokens, Vocab)

-spec convert_to_id([binary()], map()) -> {ok, [integer()]} | {error, binary()}.

Convert to ID in the vocab

tokenize(Text, IsCaseInsensitive, Vocab)

-spec tokenize(binary() | list(), boolean(), map()) -> [binary()].

End-to-end tokenization.