(self, text)
| 61 | return noisy_batch, masked_indices |
| 62 | |
| 63 | def full_mask(self, text): |
| 64 | noisy_batch = [self.dict[self.MASK]] * (self.max_text_len + 1) |
| 65 | masked_indices = [True] * len(text) + [False] * (self.max_text_len + |
| 66 | 1 - len(text)) |
| 67 | return noisy_batch, masked_indices |
| 68 | |
| 69 | def left_to_right_mask(self, text): |
| 70 | rand_split = random.randint(1, len(text) - 1) |