MCPcopy Create free account
hub / github.com/brightmart/albert_zh / InputExample

Class InputExample

run_classifier.py:128–145  ·  view source on GitHub ↗

A single training/test example for simple sequence classification.

Source from the content-addressed store, hash-verified

126
127
128class InputExample(object):
129 """A single training/test example for simple sequence classification."""
130
131 def __init__(self, guid, text_a, text_b=None, label=None):
132 """Constructs a InputExample.
133 Args:
134 guid: Unique id for the example.
135 text_a: string. The untokenized text of the first sequence. For single
136 sequence tasks, only this sequence must be specified.
137 text_b: (Optional) string. The untokenized text of the second sequence.
138 Only must be specified for sequence pair tasks.
139 label: (Optional) string. The label of the example. This should be
140 specified for train and dev examples, but not for test examples.
141 """
142 self.guid = guid
143 self.text_a = text_a
144 self.text_b = text_b
145 self.label = label
146
147
148class PaddingInputExample(object):

Callers 3

get_sentence_examplesMethod · 0.90
_create_examplesMethod · 0.70
_create_examplesMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected