Skip to content

Commit

Permalink
Merge pull request #422 from eryueniaobp/patch-1
Browse files Browse the repository at this point in the history
use load_from_vocab_file
  • Loading branch information
BrikerMan committed Oct 21, 2020
2 parents 361fc11 + c33b0c8 commit f92f5b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/embeddings/bert-embedding.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Let's run a text classification model with BERT.
bert_embedding = BertEmbedding('<PATH_TO_BERT_EMBEDDING>')
tokenizer = BertTokenizer(os.path.join('<PATH_TO_BERT_EMBEDDING>', 'vocab_chinese.txt'))
tokenizer = BertTokenizer.load_from_vocab_file(os.path.join('<PATH_TO_BERT_EMBEDDING>', 'vocab_chinese.txt'))
sentences_tokenized = [tokenizer.tokenize(s) for s in sentences]
"""
Expand Down

0 comments on commit f92f5b2

Please sign in to comment.