private bool StupidCompare(string[] texts, string text, float tor) { float minDis = float.MaxValue; if (texts != null) { foreach (string s in texts) { float compare = ChatUtil.LevenshteinDistance(s, text) / (float)s.Length; if (minDis > compare) { minDis = compare; } } } return(minDis <= tor); }