(self, text)
| 100 | return text_encoder_embs |
| 101 | |
| 102 | def text_preprocessing(self, text): |
| 103 | if self.use_text_preprocessing: |
| 104 | # The exact text cleaning as was in the training stage: |
| 105 | text = self.clean_caption(text) |
| 106 | text = self.clean_caption(text) |
| 107 | return text |
| 108 | else: |
| 109 | return text.lower().strip() |
| 110 | |
| 111 | @staticmethod |
| 112 | def basic_clean(text): |
no test coverage detected