A single training/test example for simple sequence classification.
| 133 | |
| 134 | |
| 135 | class InputExample: |
| 136 | """A single training/test example for simple sequence classification.""" |
| 137 | |
| 138 | def __init__(self, guid, text_a, text_b=None, label=None): |
| 139 | """Constructs a InputExample. |
| 140 | |
| 141 | Args: |
| 142 | guid: Unique id for the example. |
| 143 | text_a: string. The untokenized text of the first sequence. For single |
| 144 | sequence tasks, only this sequence must be specified. |
| 145 | text_b: (Optional) string. The untokenized text of the second sequence. |
| 146 | Only must be specified for sequence pair tasks. |
| 147 | label: (Optional) string. The label of the example. This should be |
| 148 | specified for train and dev examples, but not for test examples. |
| 149 | """ |
| 150 | self.guid = guid |
| 151 | self.text_a = text_a |
| 152 | self.text_b = text_b |
| 153 | self.label = label |
| 154 | |
| 155 | |
| 156 | class PaddingInputExample: |
no outgoing calls
no test coverage detected
searching dependent graphs…