InputExample_EF
into a single InputFeatures_EF
Converts a single InputExample_EF
into a single
InputFeatures_EF
. Very similar to convert_single_example
from
run_classifier.R. (RBERT issue #28.)
.convert_single_example_EF(ex_index, example, seq_length, tokenizer)
Integer; the index of this example. This is used to determine whether or not to print out some log info (for debugging or runtime confirmation). It is assumed this starts with 1 (in R).
The InputExample_EF
to convert.
Integer; the maximum number of tokens that will be considered together.
A tokenizer object to use (e.g. object of class FullTokenizer).
An object of class InputFeatures_EF
.