A single training/test example for simple sequence classification. Args: guid: Unique id for the example. text_a: string. The untokenized text of the first sequence. For single sequence tasks, only this sequence must be specified. text_b: (Optional) stri
| 29 | |
| 30 | @dataclass |
| 31 | class InputExample: |
| 32 | """ |
| 33 | A single training/test example for simple sequence classification. |
| 34 | |
| 35 | Args: |
| 36 | guid: Unique id for the example. |
| 37 | text_a: string. The untokenized text of the first sequence. For single |
| 38 | sequence tasks, only this sequence must be specified. |
| 39 | text_b: (Optional) string. The untokenized text of the second sequence. |
| 40 | Only must be specified for sequence pair tasks. |
| 41 | label: (Optional) string. The label of the example. This should be |
| 42 | specified for train and dev examples, but not for test examples. |
| 43 | """ |
| 44 | |
| 45 | guid: str |
| 46 | text_a: str |
| 47 | text_b: Optional[str] = None |
| 48 | label: Optional[str] = None |
| 49 | |
| 50 | def to_json_string(self): |
| 51 | """Serializes this instance to a JSON string.""" |
| 52 | return json.dumps(dataclasses.asdict(self), indent=2) + "\n" |
| 53 | |
| 54 | |
| 55 | @dataclass(frozen=True) |
no outgoing calls
no test coverage detected