MCPcopy Create free account
hub / github.com/tensorflow/lingvo / _ExtractTokenization

Function _ExtractTokenization

lingvo/tools/bpe_word_tokenizer.py:58–87  ·  view source on GitHub ↗

Maps the words in the encoded file to their list of token ids. Reads all the subwords in encoded file. Concatenates them while they have @@ as their last two characters. The last token of a word is the subword without @@. Maps the full word to the list of corresponding vocab ids of the subwor

(encoded_filepath, vocab)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainFunction · 0.85

Calls 1

splitMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…