Class: Transformers::Bert::BertTokenizer::WordpieceTokenizer
- Inherits:
-
Object
- Object
- Transformers::Bert::BertTokenizer::WordpieceTokenizer
- Defined in:
- lib/transformers/models/bert/tokenization_bert.rb
Instance Method Summary collapse
-
#initialize(vocab:, unk_token:, max_input_chars_per_word: 100) ⇒ WordpieceTokenizer
constructor
A new instance of WordpieceTokenizer.
Constructor Details
#initialize(vocab:, unk_token:, max_input_chars_per_word: 100) ⇒ WordpieceTokenizer
Returns a new instance of WordpieceTokenizer.
40 41 42 43 44 |
# File 'lib/transformers/models/bert/tokenization_bert.rb', line 40 def initialize(vocab:, unk_token:, max_input_chars_per_word: 100) @vocab = vocab @unk_token = unk_token @max_input_chars_per_word = max_input_chars_per_word end |