-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Abstract static Fuzzy into injected adapter service.
- Loading branch information
1 parent
93d2f64
commit 9d02989
Showing
6 changed files
with
214 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/Dfe.EarlyYearsQualification.Content/Services/FuzzyAdapter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using FuzzySharp; | ||
|
||
namespace Dfe.EarlyYearsQualification.Content.Services; | ||
|
||
public class FuzzyAdapter : IFuzzyAdapter | ||
{ | ||
public int PartialRatio(string input1, string input2) | ||
{ | ||
return Fuzz.PartialRatio(input1, input2); | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
src/Dfe.EarlyYearsQualification.Content/Services/IFuzzyAdapter.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Dfe.EarlyYearsQualification.Content.Services; | ||
|
||
public interface IFuzzyAdapter | ||
{ | ||
public int PartialRatio(string input1, string input2); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.