Open josdemmers opened 11 months ago
Found an alternative, it's a fork created from FuzzySharp. FuzzierSharp: https://github.com/AtriaStar/FuzzierSharp
That one gives me the expected results for the WeightedRatioScorer.
//edit Too bad, I'm also having issues with FuzzierSharp
Scorer: WeightedRatioScorer
Input 1: +30.0% Damage to Close Enemies [30.01%
Main: (string: +#% Damage to Close Enemies, score: 95, index: 2)
Main: (string: +#% Damage, score: 86, index: 0)
Main: (string: +#% Damage to Chilled Enemies, score: 77, index: 3)
Main: (string: +#% Damage to Poisoned Enemies, score: 75, index: 4)
Main: (string: +#% Damage to Crowd Controlled Enemies, score: 67, index: 1)
Main: (string: +#% Cold Damage, score: 61, index: 8)
Main: (string: #% Damage Reduction from Bleeding Enemies, score: 59, index: 6)
Main: (string: #% Damage Reduction, score: 57, index: 7)
Main: (string: #% Block Chance#% Blocked Damage Reduction, score: 48, index: 5)
Elapsed time: 50
---
Scorer: WeightedRatioScorer
Input 2: +29.2% Damage to Close Enemies [24.8 - 35.3]%
Main: (string: +#% Damage, score: 86, index: 0)
Main: (string: +#% Damage to Close Enemies, score: 86, index: 2)
Main: (string: +#% Damage to Chilled Enemies, score: 75, index: 3)
Main: (string: +#% Damage to Poisoned Enemies, score: 75, index: 4)
Main: (string: +#% Damage to Crowd Controlled Enemies, score: 64, index: 1)
Main: (string: +#% Cold Damage, score: 61, index: 8)
Main: (string: #% Damage Reduction, score: 57, index: 7)
Main: (string: #% Damage Reduction from Bleeding Enemies, score: 53, index: 6)
Main: (string: #% Block Chance#% Blocked Damage Reduction, score: 43, index: 5)
Elapsed time: 0
---
@Saalvage do you accept/want bug reports on your fork? Issues are currently disabled.
Bug reports - no, the only reason I forked FuzzySharp was to fix/improve upon some aspect which I needed for a different project Pull requests - sure, as long as they're relatively trivial I wouldn't mind merging them and pushing a new release to nuget if it helps someone
Using the WeightedRatioScorer for two different strings, one of them gives an unexpected result.
Input
+30.0% Damage to Close Enemies [30.01%
+14.3% Damage to Crowd Controlled Enemies [7.5 - 18.0]%
Choices
Results
For some reason
input1
gives+#% Damage
a score of 90. While forInput2
it works as expected and+#% Damage
gets score of 60.Source
Here is the source to reproduce the issue.
Click me
``` using FuzzySharp; using FuzzySharp.SimilarityRatio; using FuzzySharp.SimilarityRatio.Scorer.Composite; using System.Reflection; namespace FuzzySharpTest { internal class Program { static void Main(string[] args) { string input1 = "+30.0% Damage to Close Enemies [30.01%"; string input2 = "+14.3% Damage to Crowd Controlled Enemies [7.5 - 18.0]%"; List