(self)
| 9 | |
| 10 | class StringProcess(object): |
| 11 | def __init__(self): |
| 12 | self.other_char = re.compile(r"[^A-Za-z0-9(),!?\'\`]", flags=0) |
| 13 | self.num = re.compile(r"[+-]?\d+\.?\d*", flags=0) |
| 14 | # self.url = re.compile(r"[a-z]*[:.]+\S+|\n|\s+", flags=0) |
| 15 | self.url = re.compile( |
| 16 | r"(https?|ftp|file)://[-A-Za-z0-9+&@#/%?=~_|!:,.;]+[-A-Za-z0-9+&@#/%=~_|]", flags=0) |
| 17 | self.stop_words = None |
| 18 | self.nlp = None |
| 19 | |
| 20 | def clean_str(self, string): |
| 21 | string = re.sub(self.other_char, " ", string) |
nothing calls this directly
no outgoing calls
no test coverage detected