public bool ContainsOptionDice(string text, float confidence = 0.6f) { if (EventOptionsList.Exists(a => a.OptionToCheck.DiceCoefficient(text) > confidence)) { return(true); } else { return(false); } }
public bool ContainsOption(string text, bool useImpreciseComparison = false, float confidence = 0.7f) { // string prepareText = Regex.Replace(text, pattern, ""); if (!useImpreciseComparison) { if (EventOptionsList.Exists(a => a.OptionToCheck.Contains(text))) { return(true); } return(false); } else { if (EventOptionsList.Exists(a => a.OptionToCheck.PercentageComparison(text) > confidence)) { return(true); } return(false); } }