sgnlp.models.emotion_entailment.utils.convert_example_to_feature

convert_example_to_feature(example_row: List, pad_token: int = 0, sequence_a_segment_id: int = 0, cls_token_segment_id: int = 1, pad_token_segment_id: int = 0, mask_padding_with_zero: bool = True, sep_token_extra: bool = False)sgnlp.models.emotion_entailment.utils.InputFeatures[source]

Method to generate InputFeatures object from individual example row

Parameters
  • example_row (List) – List of inputs from convert_examples_to_features function

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

  • sequence_a_segment_id (int, optional) – Option for sequence_a_segment_id. 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.

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

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

Returns

Generated InputFeatures object

Return type

InputFeatures