
Last chance! 50% off unlimited learning
Sale ends in
A simple wrapper function to turn a list of text (as a character vector or list) into a list of examples suitable for use with RBERT. If the input is a flat list or vector of characters, the examples will be single-segment, with NULL for the second segment. If the input contains length-2 sublists or vectors, those examples will be two-segment sequences, e.g. for doing sentence-pair classification.
make_examples_simple(seq_list)
Character vector or list; text to turn into examples.
A list of InputExample_EF
objects.
# NOT RUN {
input_ex <- make_examples_simple(c(
"Here are some words.",
"Here are some more words."
))
input_ex2 <- make_examples_simple(list(
c(
"First sequence, first segment.",
"First sequence, second segment."
),
c(
"Second sequence, first segment.",
"Second sequence, second segment."
)
))
# }
Run the code above in your browser using DataLab