私はある種のこれを実装する必要があります:
string textToSearch = "Extreme Golf: The Showdown";
string textToSearchFor = "Golf Extreme Showdown";
int fuzzyMatchScoreThreshold = 80; // One a 0 to 100 scale
bool searchSuccessful = IsFuzzyMatch(textToSearch, textToSearchFor, fuzzyMatchScoreThreshold);
if (searchSuccessful == true)
{
-- we have a match.
}
C# で記述された関数スタブを次に示します。
public bool IsFuzzyMatch (string textToSearch, string textToSearchFor, int fuzzyMatchScoreThreshold)
{
bool isMatch = false;
// do fuzzy logic here and set isMatch to true if successful match.
return isMatch;
}
しかし、 IsFuzzyMatch メソッドにロジックを実装する方法がわかりません。何か案は?おそらく、この目的のための既製のソリューションはありますか?