summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4b296ac)
Don't strip word spaces when sanitizing strings, those spaces may be
part of the original message.
sanitized = text.lower()
sanitized = re.sub(r"[^a-z0-9.,:?\'-/()\"=\+@ ]", "", sanitized)
sanitized = re.sub(r"\s+", " ", sanitized)
sanitized = text.lower()
sanitized = re.sub(r"[^a-z0-9.,:?\'-/()\"=\+@ ]", "", sanitized)
sanitized = re.sub(r"\s+", " ", sanitized)
- sanitized = re.sub(r"^\s+", "", sanitized)
- sanitized = re.sub(r"\s+$", "", sanitized)
return sanitized
def char_to_signal(self, character):
return sanitized
def char_to_signal(self, character):
sanitized = re.sub(r"[^\-\.\/]", " ", sanitized)
sanitized = re.sub(r"\s+", " ", sanitized)
sanitized = re.sub(r"( ?/ ?)+", " / ", sanitized)
sanitized = re.sub(r"[^\-\.\/]", " ", sanitized)
sanitized = re.sub(r"\s+", " ", sanitized)
sanitized = re.sub(r"( ?/ ?)+", " / ", sanitized)
- sanitized = re.sub(r"^[ /]+", "", sanitized)
- sanitized = re.sub(r"[ /]+$", "", sanitized)
return sanitized
def signal_to_character(self, signal):
return sanitized
def signal_to_character(self, signal):