Python - Update examples with getter/setter

This commit is contained in:
Anthony MOI
2020-01-07 15:23:11 -05:00
parent 8bbf832842
commit cc33418044
4 changed files with 19 additions and 19 deletions

View File

@ -32,14 +32,14 @@ if not files:
tokenizer = Tokenizer(models.WordPiece.empty())
# Customize all the steps
tokenizer.with_normalizer(normalizers.BertNormalizer.new(
tokenizer.normalizer = normalizers.BertNormalizer.new(
clean_text=True,
handle_chinese_chars=True,
strip_accents=True,
lowercase=True,
))
tokenizer.with_pre_tokenizer(pre_tokenizers.BertPreTokenizer.new())
tokenizer.with_decoder(decoders.WordPiece.new())
)
tokenizer.pre_tokenizer = pre_tokenizers.BertPreTokenizer.new()
tokenizer.decoder = decoders.WordPiece.new()
# And then train
trainer = trainers.WordPieceTrainer.new(