sgnlp.models.emotion_entailment.utils.convert_examples_to_features

convert_examples_to_features(examples: List[sgnlp.models.emotion_entailment.utils.InputExample], max_seq_length: int, tokenizer: sgnlp.models.emotion_entailment.tokenization.RecconEmotionEntailmentTokenizer, cls_token_at_end: bool = False, sep_token_extra: bool = False, pad_on_left: bool = False, cls_token: str = '[CLS]', sep_token: str = '[SEP]', pad_token: int = 0, cls_token_segment_id: int = 1, pad_token_segment_id: int = 0, silent: bool = False, add_prefix_space: bool = False, pad_to_max_length: bool = True)List[sgnlp.models.emotion_entailment.utils.InputFeatures][source]

Loop method to process all examples

Parameters
  • examples (List[InputExample]) – List of InputExample

  • max_seq_length (int) – Max sequence length

  • tokenizer (RecconEmotionEntailmentTokenizer) – RecconEmotionEntailmentTokenizer sgnlp

  • cls_token_at_end (bool, optional) – Option to use cls_token_at_end . Defaults to False.

  • sep_token_extra (bool, optional) – Option to use sep_token_extra. Defaults to False.

  • pad_on_left (bool, optional) – Option to use pad_on_left. Defaults to False.

  • cls_token (str, optional) – cls_token to use. Defaults to “[CLS]”.

  • sep_token (str, optional) – sep_token to use. Defaults to “[SEP]”.

  • pad_token (int, optional) – pad_token to use. Defaults to 0.

  • cls_token_segment_id (int, optional) – Option for cls_token_segment_id. Defaults to 1.

  • pad_token_segment_id (int, optional) – Option for pad_token_segment_id. Defaults to 0.

  • silent (bool, optional) – Option for silent. Defaults to False.

  • add_prefix_space (bool, optional) – Option to add_prefix_space. Defaults to False.

  • pad_to_max_length (bool, optional) – Option to pad_to_max_length. Defaults to True.

Returns

list of InputFeatures

Return type

List[InputFeatures]