MCPcopy Create free account
hub / github.com/CLUEbenchmark/CLUE / InputExample

Class InputExample

baselines/models/classifier_utils.py:56–73  ·  view source on GitHub ↗

A single training/test example for simple sequence classification.

Source from the content-addressed store, hash-verified

54
55
56class InputExample(object):
57 """A single training/test example for simple sequence classification."""
58
59 def __init__(self, guid, text_a, text_b=None, label=None):
60 """Constructs a InputExample.
61 Args:
62 guid: Unique id for the example.
63 text_a: string. The untokenized text of the first sequence. For single
64 sequence tasks, only this sequence must be specified.
65 text_b: (Optional) string. The untokenized text of the second sequence.
66 Only must be specified for sequence pair tasks.
67 label: (Optional) string. The label of the example. This should be
68 specified for train and dev examples, but not for test examples.
69 """
70 self.guid = guid
71 self.text_a = text_a
72 self.text_b = text_b
73 self.label = label
74
75
76class PaddingInputExample(object):

Callers 9

_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examples_jsonMethod · 0.70
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70
_create_examples_oneMethod · 0.70
_create_examplesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected