A single training/test example for simple sequence classification.
| 26 | |
| 27 | |
| 28 | class InputExample: |
| 29 | """A single training/test example for simple sequence classification.""" |
| 30 | |
| 31 | def __init__(self, guid, text_a, text_b=None, label=None): |
| 32 | """Constructs a InputExample. |
| 33 | |
| 34 | Args: |
| 35 | guid: Unique id for the example. |
| 36 | text_a: string. The untokenized text of the first sequence. For single |
| 37 | sequence tasks, only this sequence must be specified. |
| 38 | text_b: (Optional) string. The untokenized text of the second sequence. |
| 39 | Only must be specified for sequence pair tasks. |
| 40 | label: (Optional) string. The label of the example. This should be |
| 41 | specified for train and dev examples, but not for test examples. |
| 42 | """ |
| 43 | self.guid = guid |
| 44 | self.text_a = text_a |
| 45 | self.text_b = text_b |
| 46 | self.label = label |
| 47 | |
| 48 | |
| 49 | class PaddingInputExample: |
no outgoing calls
no test coverage detected
searching dependent graphs…