pre-process the strings by removing non-characters before applying NGram algorithms; Added the ability to customize the threshold