Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


RBERT (version 0.1.11)

make_examples_simple: Easily make examples for BERT

Description

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.

Usage

make_examples_simple(seq_list)

Arguments

seq_list

Character vector or list; text to turn into examples.

Value

A list of InputExample_EF objects.

Examples

Run this code
# 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