# NOT RUN {
BERT_PRETRAINED_DIR <- download_BERT_checkpoint("bert_base_uncased")
examples <- c("I saw the branch on the bank.",
"I saw the branch of the bank.")
# Just specify checkpoint directory.
feats <- extract_features(
examples = examples,
ckpt_dir = BERT_PRETRAINED_DIR
)
# Can also just specify the model, if you have it downloaded.
# In interactive mode, you'll be prompted to download the model if you do not
# have it.
feats <- extract_features(
examples = examples,
model = "bert_base_uncased"
)
# }
Run the code above in your browser using DataLab