Class: Transformers::Distilbert::DistilBertTokenizer::WordpieceTokenizer
- Inherits:
-
Object
- Object
- Transformers::Distilbert::DistilBertTokenizer::WordpieceTokenizer
- Defined in:
- lib/transformers/models/distilbert/tokenization_distilbert.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.
45 46 47 48 49 |
# File 'lib/transformers/models/distilbert/tokenization_distilbert.rb', line 45 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 |