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

Class InputExample

a00_Bert/run_classifier_predict_online.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 "models and False for cased models.")
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 InputFeatures(object):

Callers 1

predict_onlineFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected