Tokenization/string cleaning for the SST yelp_dataset Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py
(self, string)
| 56 | return " ".join(new_doc).lower() |
| 57 | |
| 58 | def lean_str_sst(self, string): |
| 59 | """ |
| 60 | Tokenization/string cleaning for the SST yelp_dataset |
| 61 | Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py |
| 62 | """ |
| 63 | string = re.sub(self.other_char, " ", string) |
| 64 | string = re.sub(r"\s{2,}", " ", string) |
| 65 | return string.strip().lower() |
| 66 | |
| 67 | def remove_stopword(self, string): |
| 68 | if self.stop_words is None: |
nothing calls this directly
no outgoing calls
no test coverage detected