using System.Collections.Generic;
using FuzzySharp.SimilarityRatio;
using FuzzySharp.SimilarityRatio.Scorer.StrategySensitive;
using FuzzySharp.SimilarityRatio.Scorer.Composite;
public static void Main()
private static void Run()
var tagWords = new[] {"planned attack", };
var tipPhrases = new List<string>() { "attack"} ;
foreach(var phrase in tipPhrases)
var results = Process.ExtractAll(phrase, tagWords, null, ScorerCache.Get<WeightedRatioScorer>(), cutoff: 90);
foreach (dynamic item in results)
Console.WriteLine("Algorithm: WeightedRatioScorer" + ", Phrase: " + phrase + ", Value: " + item.Value + ", Score: " + item.Score);
results = Process.ExtractAll(phrase, tagWords, null, ScorerCache.Get<DefaultRatioScorer>(), cutoff: 80);
foreach (dynamic item in results)
Console.WriteLine("New Algorithm: DefaultRatioScorer" + ", Phrase: " + phrase + ", Value: " + item.Value + ", Score: " + item.Score);
results = Process.ExtractAll(phrase, tagWords, null, ScorerCache.Get<TokenSortScorer>(), cutoff: 90);
foreach (dynamic item in results)
Console.WriteLine("New Algorithm: TokenSortScorer" + ", Phrase: " + phrase + ", Value: " + item.Value + ", Score: " + item.Score);
results = Process.ExtractAll(phrase, tagWords, null, ScorerCache.Get<PartialRatioScorer>(), cutoff: 90);
foreach (dynamic item in results)
Console.WriteLine("Algorithm: PartialRatioScorer" + ", Phrase: " + phrase + ", Value: " + item.Value + ", Score: " + item.Score);
Console.WriteLine("****************");