Simplified processing of strings with built-in regex code in python. Also fixed empty string detection in token_sort_ratio.
Fixed comment.