(example: dict[str, tf.Tensor], input_key: str = "text")
| 100 | |
| 101 | |
| 102 | def extract_text(example: dict[str, tf.Tensor], input_key: str = "text") -> str: |
| 103 | return bytes.decode(example[input_key].numpy(), "utf-8") |
| 104 | |
| 105 | |
| 106 | def extract_text_ragged(example: dict[str, tf.Tensor], input_key: str = "text") -> list[list[str]]: |
no test coverage detected