dot-convert_single_example_EF: Convert a single 'InputExample_EF' into a single...

.convert_single_example_EFR Documentation

Convert a single InputExample_EF into a single InputFeatures_EF

Description

Converts a single InputExample_EF into a single InputFeatures_EF. Very similar to convert_single_example from run_classifier.R. (RBERT issue #28.)

Usage

.convert_single_example_EF(ex_index, example, seq_length, tokenizer)

Arguments

ex_index

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).

example

The InputExample_EF to convert.

seq_length

Integer; the maximum number of tokens that will be considered together.

tokenizer

A tokenizer object to use (e.g. object of class FullTokenizer).

Value

An object of class InputFeatures_EF.


jonathanbratt/RBERT documentation built on Jan. 26, 2023, 4:15 p.m.