[
  {
    "path": ".gitattributes",
    "content": "###############################################################################\n# Set default behavior to automatically normalize line endings.\n###############################################################################\n* text=auto\n\n###############################################################################\n# Set default behavior for command prompt diff.\n#\n# This is need for earlier builds of msysgit that does not have it on by\n# default for csharp files.\n# Note: This is only used by command line\n###############################################################################\n#*.cs     diff=csharp\n\n###############################################################################\n# Set the merge driver for project and solution files\n#\n# Merging from the command prompt will add diff markers to the files if there\n# are conflicts (Merging from VS is not affected by the settings below, in VS\n# the diff markers are never inserted). Diff markers may cause the following \n# file extensions to fail to load in VS. An alternative would be to treat\n# these files as binary and thus will always conflict and require user\n# intervention with every merge. To do so, just uncomment the entries below\n###############################################################################\n#*.sln       merge=binary\n#*.csproj    merge=binary\n#*.vbproj    merge=binary\n#*.vcxproj   merge=binary\n#*.vcproj    merge=binary\n#*.dbproj    merge=binary\n#*.fsproj    merge=binary\n#*.lsproj    merge=binary\n#*.wixproj   merge=binary\n#*.modelproj merge=binary\n#*.sqlproj   merge=binary\n#*.wwaproj   merge=binary\n\n###############################################################################\n# behavior for image files\n#\n# image files are treated as binary by default.\n###############################################################################\n#*.jpg   binary\n#*.png   binary\n#*.gif   binary\n\n###############################################################################\n# diff behavior for common document formats\n# \n# Convert binary document formats to text before diffing them. This feature\n# is only available from the command line. Turn it on by uncommenting the \n# entries below.\n###############################################################################\n#*.doc   diff=astextplain\n#*.DOC   diff=astextplain\n#*.docx  diff=astextplain\n#*.DOCX  diff=astextplain\n#*.dot   diff=astextplain\n#*.DOT   diff=astextplain\n#*.pdf   diff=astextplain\n#*.PDF   diff=astextplain\n#*.rtf   diff=astextplain\n#*.RTF   diff=astextplain\n"
  },
  {
    "path": ".gitignore",
    "content": "## Ignore Visual Studio temporary files, build results, and\n## files generated by popular Visual Studio add-ons.\n\n# User-specific files\n*.suo\n*.user\n*.userosscache\n*.sln.docstates\n\n# User-specific files (MonoDevelop/Xamarin Studio)\n*.userprefs\n\n# Build results\n[Dd]ebug/\n[Dd]ebugPublic/\n[Rr]elease/\n[Rr]eleases/\n[Xx]64/\n[Xx]86/\n[Bb]uild/\nbld/\n[Bb]in/\n[Oo]bj/\n\n# Visual Studio 2015 cache/options directory\n.vs/\n# Uncomment if you have tasks that create the project's static files in wwwroot\n#wwwroot/\n\n# MSTest test Results\n[Tt]est[Rr]esult*/\n[Bb]uild[Ll]og.*\n\n# NUNIT\n*.VisualState.xml\nTestResult.xml\n\n# Build Results of an ATL Project\n[Dd]ebugPS/\n[Rr]eleasePS/\ndlldata.c\n\n# DNX\nproject.lock.json\nartifacts/\n\n*_i.c\n*_p.c\n*_i.h\n*.ilk\n*.meta\n*.obj\n*.pch\n*.pdb\n*.pgc\n*.pgd\n*.rsp\n*.sbr\n*.tlb\n*.tli\n*.tlh\n*.tmp\n*.tmp_proj\n*.log\n*.vspscc\n*.vssscc\n.builds\n*.pidb\n*.svclog\n*.scc\n\n# Chutzpah Test files\n_Chutzpah*\n\n# Visual C++ cache files\nipch/\n*.aps\n*.ncb\n*.opendb\n*.opensdf\n*.sdf\n*.cachefile\n*.VC.db\n\n# Visual Studio profiler\n*.psess\n*.vsp\n*.vspx\n*.sap\n\n# TFS 2012 Local Workspace\n$tf/\n\n# Guidance Automation Toolkit\n*.gpState\n\n# ReSharper is a .NET coding add-in\n_ReSharper*/\n*.[Rr]e[Ss]harper\n*.DotSettings.user\n\n# JustCode is a .NET coding add-in\n.JustCode\n\n# TeamCity is a build add-in\n_TeamCity*\n\n# DotCover is a Code Coverage Tool\n*.dotCover\n\n# NCrunch\n_NCrunch_*\n.*crunch*.local.xml\nnCrunchTemp_*\n\n# MightyMoose\n*.mm.*\nAutoTest.Net/\n\n# Web workbench (sass)\n.sass-cache/\n\n# Installshield output folder\n[Ee]xpress/\n\n# DocProject is a documentation generator add-in\nDocProject/buildhelp/\nDocProject/Help/*.HxT\nDocProject/Help/*.HxC\nDocProject/Help/*.hhc\nDocProject/Help/*.hhk\nDocProject/Help/*.hhp\nDocProject/Help/Html2\nDocProject/Help/html\n\n# Click-Once directory\npublish/\n\n# Publish Web Output\n*.[Pp]ublish.xml\n*.azurePubxml\n\n# TODO: Un-comment the next line if you do not want to checkin \n# your web deploy settings because they may include unencrypted\n# passwords\n#*.pubxml\n*.publishproj\n\n# NuGet Packages\n*.nupkg\n# The packages folder can be ignored because of Package Restore\n**/packages/*\n# except build/, which is used as an MSBuild target.\n!**/packages/build/\n# Uncomment if necessary however generally it will be regenerated when needed\n#!**/packages/repositories.config\n# NuGet v3's project.json files produces more ignoreable files\n*.nuget.props\n*.nuget.targets\n\n# Microsoft Azure Build Output\ncsx/\n*.build.csdef\n\n# Microsoft Azure Emulator\necf/\nrcf/\n\n# Microsoft Azure ApplicationInsights config file\nApplicationInsights.config\n\n# Windows Store app package directory\nAppPackages/\nBundleArtifacts/\n\n# Visual Studio cache files\n# files ending in .cache can be ignored\n*.[Cc]ache\n# but keep track of directories ending in .cache\n!*.[Cc]ache/\n\n# Others\nClientBin/\n[Ss]tyle[Cc]op.*\n~$*\n*~\n*.dbmdl\n*.dbproj.schemaview\n*.pfx\n*.publishsettings\nnode_modules/\norleans.codegen.cs\n\n# RIA/Silverlight projects\nGenerated_Code/\n\n# Backup & report files from converting an old project file\n# to a newer Visual Studio version. Backup files are not needed,\n# because we have git ;-)\n_UpgradeReport_Files/\nBackup*/\nUpgradeLog*.XML\nUpgradeLog*.htm\n\n# SQL Server files\n*.mdf\n*.ldf\n\n# Business Intelligence projects\n*.rdl.data\n*.bim.layout\n*.bim_*.settings\n\n# Microsoft Fakes\nFakesAssemblies/\n\n# GhostDoc plugin setting file\n*.GhostDoc.xml\n\n# Node.js Tools for Visual Studio\n.ntvs_analysis.dat\n\n# Visual Studio 6 build log\n*.plg\n\n# Visual Studio 6 workspace options file\n*.opt\n\n# Visual Studio LightSwitch build output\n**/*.HTMLClient/GeneratedArtifacts\n**/*.DesktopClient/GeneratedArtifacts\n**/*.DesktopClient/ModelManifest.xml\n**/*.Server/GeneratedArtifacts\n**/*.Server/ModelManifest.xml\n_Pvt_Extensions\n\n# LightSwitch generated files\nGeneratedArtifacts/\nModelManifest.xml\n\n# Paket dependency manager\n.paket/paket.exe\n\n# FAKE - F# Make\n.fake/"
  },
  {
    "path": "FuzzyString/ApproximatelyEquals.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    { \n        public static bool ApproximatelyEquals(this string source, string target,  FuzzyStringComparisonTolerance tolerance, params FuzzyStringComparisonOptions[] options)\n        {\n            List<double> comparisonResults = new List<double>();\n\n            if (!options.Contains(FuzzyStringComparisonOptions.CaseSensitive))\n            {\n                source = source.Capitalize();\n                target = target.Capitalize();\n            }\n\n            // Min: 0    Max: source.Length = target.Length\n            if (options.Contains(FuzzyStringComparisonOptions.UseHammingDistance))\n            {\n                if (source.Length == target.Length)\n                {\n                    comparisonResults.Add(source.HammingDistance(target) / target.Length);\n                }\n            }\n\n            // Min: 0    Max: 1\n            if (options.Contains(FuzzyStringComparisonOptions.UseJaccardDistance))\n            {\n                comparisonResults.Add(source.JaccardDistance(target));\n            }\n\n            // Min: 0    Max: 1\n            if (options.Contains(FuzzyStringComparisonOptions.UseJaroDistance))\n            {\n                comparisonResults.Add(source.JaroDistance(target));\n            }\n\n            // Min: 0    Max: 1\n            if (options.Contains(FuzzyStringComparisonOptions.UseJaroWinklerDistance))\n            {\n                comparisonResults.Add(source.JaroWinklerDistance(target));\n            }\n\n            // Min: 0    Max: LevenshteinDistanceUpperBounds - LevenshteinDistanceLowerBounds\n            // Min: LevenshteinDistanceLowerBounds    Max: LevenshteinDistanceUpperBounds\n            if (options.Contains(FuzzyStringComparisonOptions.UseNormalizedLevenshteinDistance))\n            {\n                comparisonResults.Add(Convert.ToDouble(source.NormalizedLevenshteinDistance(target)) / Convert.ToDouble((Math.Max(source.Length, target.Length) - source.LevenshteinDistanceLowerBounds(target))));\n            }\n            else if (options.Contains(FuzzyStringComparisonOptions.UseLevenshteinDistance))\n            {\n                comparisonResults.Add(Convert.ToDouble(source.LevenshteinDistance(target)) / Convert.ToDouble(source.LevenshteinDistanceUpperBounds(target)));\n            }\n\n            if (options.Contains(FuzzyStringComparisonOptions.UseLongestCommonSubsequence))\n            {\n                comparisonResults.Add(1 - Convert.ToDouble((source.LongestCommonSubsequence(target).Length) / Convert.ToDouble(Math.Min(source.Length, target.Length))));\n            }\n\n            if (options.Contains(FuzzyStringComparisonOptions.UseLongestCommonSubstring))\n            {\n                comparisonResults.Add(1 - Convert.ToDouble((source.LongestCommonSubstring(target).Length) / Convert.ToDouble(Math.Min(source.Length, target.Length))));\n            }\n\n            // Min: 0    Max: 1\n            if (options.Contains(FuzzyStringComparisonOptions.UseSorensenDiceDistance))\n            {\n                comparisonResults.Add(source.SorensenDiceDistance(target));\n            }\n\n            // Min: 0    Max: 1\n            if (options.Contains(FuzzyStringComparisonOptions.UseOverlapCoefficient))\n            {\n                comparisonResults.Add(1 - source.OverlapCoefficient(target));\n            }\n\n            // Min: 0    Max: 1\n            if (options.Contains(FuzzyStringComparisonOptions.UseRatcliffObershelpSimilarity))\n            {\n                comparisonResults.Add(1 - source.RatcliffObershelpSimilarity(target));\n            }\n\n            if (comparisonResults.Count == 0)\n            {\n                return false;\n            }\n\n            if (tolerance == FuzzyStringComparisonTolerance.Strong)\n            {\n                if (comparisonResults.Average() < 0.25)\n                {\n                    return true;\n                }\n                else\n                {\n                    return false;\n                }\n            }\n            else if (tolerance == FuzzyStringComparisonTolerance.Normal)\n            {\n                if (comparisonResults.Average() < 0.5)\n                {\n                    return true;\n                }\n                else\n                {\n                    return false;\n                }\n            }\n            else if (tolerance == FuzzyStringComparisonTolerance.Weak)\n            {\n                if (comparisonResults.Average() < 0.75)\n                {\n                    return true;\n                }\n                else\n                {\n                    return false;\n                }\n            }\n            else if (tolerance == FuzzyStringComparisonTolerance.Manual)\n            {\n                if (comparisonResults.Average() > 0.6)\n                {\n                    return true;\n                }\n                else\n                {\n                    return false;\n                }\n            }\n            else\n            {\n                return false;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/FuzzyString.csproj",
    "content": "﻿<Project Sdk=\"Microsoft.NET.Sdk\">\n  <PropertyGroup>\n    <TargetFramework>netstandard2.0</TargetFramework>\n    <GeneratePackageOnBuild>true</GeneratePackageOnBuild>\n    <PackageId>FuzzyString</PackageId>\n    <PackageLicenseUrl>./Resources/License.txt</PackageLicenseUrl>\n    <PackageProjectUrl>https://github.com/kdjones/fuzzystring</PackageProjectUrl>\n    <RepositoryUrl>https://github.com/kdjones/fuzzystring</RepositoryUrl>\n  </PropertyGroup>\n</Project>"
  },
  {
    "path": "FuzzyString/FuzzyStringComparisonOptions.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public enum FuzzyStringComparisonOptions\n    {\n        UseHammingDistance,\n\n        UseJaccardDistance,\n\n        UseJaroDistance,\n\n        UseJaroWinklerDistance,\n\n        UseLevenshteinDistance,\n\n        UseLongestCommonSubsequence,\n\n        UseLongestCommonSubstring,\n\n        UseNormalizedLevenshteinDistance,\n\n        UseOverlapCoefficient,\n\n        UseRatcliffObershelpSimilarity,\n\n        UseSorensenDiceDistance,\n\n        UseTanimotoCoefficient,\n\n        CaseSensitive\n    }\n}\n"
  },
  {
    "path": "FuzzyString/FuzzyStringComparisonTolerance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public enum FuzzyStringComparisonTolerance\n    {\n        Strong,\n\n        Normal,\n\n        Weak,\n\n        Manual\n    }\n}\n"
  },
  {
    "path": "FuzzyString/HammingDistance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static int HammingDistance(this string source, string target)\n        {\n            int distance = 0;\n\n            if (source.Length == target.Length)\n            {\n                for (int i = 0; i < source.Length; i++)\n                {\n                    if (!source[i].Equals(target[i]))\n                    {\n                        distance++;\n                    }\n                }\n                return distance;\n            }\n            else { return 99999; }\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/JaccardDistance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static double JaccardDistance(this string source, string target)\n        {\n            return 1 - source.JaccardIndex(target);\n        }\n\n        public static double JaccardIndex(this string source, string target)\n        {\n            return (Convert.ToDouble(source.Intersect(target).Count())) / (Convert.ToDouble(source.Union(target).Count()));\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/JaroDistance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static double JaroDistance(this string source, string target)\n        {\n            int m = source.Intersect(target).Count();\n\n            if (m == 0) { return 0; }\n            else\n            {\n                string sourceTargetIntersetAsString = \"\";\n                string targetSourceIntersetAsString = \"\";\n                IEnumerable<char> sourceIntersectTarget = source.Intersect(target);\n                IEnumerable<char> targetIntersectSource = target.Intersect(source);\n                foreach (char character in sourceIntersectTarget) { sourceTargetIntersetAsString += character; }\n                foreach (char character in targetIntersectSource) { targetSourceIntersetAsString += character; }\n                double t = sourceTargetIntersetAsString.LevenshteinDistance(targetSourceIntersetAsString) / 2;\n                return ((m / source.Length) + (m / target.Length) + ((m - t) / m)) / 3;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/JaroWinklerDistance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static double JaroWinklerDistance(this string source, string target)\n        {\n            double jaroDistance = source.JaroDistance(target);\n            double commonPrefixLength = CommonPrefixLength(source, target);\n\n            return jaroDistance + (commonPrefixLength * 0.1 * (1 - jaroDistance));\n        }\n\n        public static double JaroWinklerDistanceWithPrefixScale(string source, string target, double p)\n        {\n            double prefixScale = 0.1;\n\n            if (p > 0.25) { prefixScale = 0.25; } // The maximu value for distance to not exceed 1\n            else if (p < 0) { prefixScale = 0; } // The Jaro Distance\n            else { prefixScale = p; }\n\n            double jaroDistance = source.JaroDistance(target);\n            double commonPrefixLength = CommonPrefixLength(source, target);\n\n            return jaroDistance + (commonPrefixLength * prefixScale * (1 - jaroDistance));\n        }\n\n        private static double CommonPrefixLength(string source, string target)\n        {\n            int maximumPrefixLength = 4;\n            int commonPrefixLength = 0;\n            if (source.Length <= 4 || target.Length <= 4) { maximumPrefixLength = Math.Min(source.Length, target.Length); }\n\n            for (int i = 0; i < maximumPrefixLength; i++)\n            {\n                if (source[i].Equals(target[i])) { commonPrefixLength++; }\n                else { return commonPrefixLength; }\n            }\n\n            return commonPrefixLength;\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/LevenshteinDistance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    { \n        /// <summary>\n        /// Calculate the minimum number of single-character edits needed to change the source into the target,\n        /// allowing insertions, deletions, and substitutions.\n        /// <br/><br/>\n        /// Time complexity: at least O(n^2), where n is the length of each string\n        /// Accordingly, this algorithm is most efficient when at least one of the strings is very short\n        /// </summary>\n        /// <param name=\"source\"></param>\n        /// <param name=\"target\"></param>\n        /// <returns>The number of edits required to transform the source into the target. This is at most the length of the longest string, and at least the difference in length between the two strings</returns>\n        public static int LevenshteinDistance(this string source, string target)\n        {\n            if (source.Length == 0) { return target.Length; }\n            if (target.Length == 0) { return source.Length; }\n\n            int distance = 0;\n\n            if (source[source.Length - 1] == target[target.Length - 1]) { distance = 0; }\n            else { distance = 1; }\n\n            var sourceInitial = source.Substring(0, source.Length - 1);\n            var targetInitial = target.Substring(0, target.Length - 1);\n            return Math.Min(Math.Min(LevenshteinDistance(sourceInitial, target) + 1,\n                                     LevenshteinDistance(source, targetInitial)) + 1,\n                                     LevenshteinDistance(sourceInitial, targetInitial) + distance);\n        }\n\n        /// <summary>\n        /// Calculate the minimum number of single-character edits needed to change the source into the target,\n        /// allowing insertions, deletions, and substitutions.\n        /// <br/><br/>\n        /// Time complexity: at least O(n^2), where n is the length of each string\n        /// Accordingly, this algorithm is most efficient when at least one of the strings is very short\n        /// </summary>\n        /// <param name=\"source\"></param>\n        /// <param name=\"target\"></param>\n        /// <returns>The Levenshtein distance, normalized so that the lower bound is always zero, rather than the difference in length between the two strings</returns>\n        public static double NormalizedLevenshteinDistance(this string source, string target)\n        {\n            int unnormalizedLevenshteinDistance = source.LevenshteinDistance(target);\n\n            return unnormalizedLevenshteinDistance - source.LevenshteinDistanceLowerBounds(target);\n        }\n\n        /// <summary>\n        /// The upper bounds is either the length of the longer string, or the Hamming distance.\n        /// </summary>\n        /// <param name=\"source\"></param>\n        /// <param name=\"target\"></param>\n        /// <returns></returns>\n        public static int LevenshteinDistanceUpperBounds(this string source, string target)\n        {\n            // If the two strings are the same length then the Hamming Distance is the upper bounds of the Levenshtien Distance.\n            if (source.Length == target.Length) { return source.HammingDistance(target); }\n\n            // Otherwise, the upper bound is the length of the longer string.\n            else if (source.Length > target.Length) { return source.Length; }\n            else if (target.Length > source.Length) { return target.Length; }\n\n            return 9999;\n        }\n\n        /// <summary>\n        /// The lower bounds is the difference in length between the two strings\n        /// </summary>\n        /// <param name=\"source\"></param>\n        /// <param name=\"target\"></param>\n        /// <returns></returns>\n        public static int LevenshteinDistanceLowerBounds(this string source, string target)\n        {\n            // If the two strings are different lengths then the lower bounds is the difference in length.\n            return Math.Abs(source.Length - target.Length);\n        }\n\n    }\n}\n"
  },
  {
    "path": "FuzzyString/LongestCommonSubsequence.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static string LongestCommonSubsequence(this string source, string target)\n        {\n            int[,] C = LongestCommonSubsequenceLengthTable(source, target);\n\n            return Backtrack(C, source, target, source.Length, target.Length);\n        }\n\n        private static int[,] LongestCommonSubsequenceLengthTable(string source, string target)\n        {\n            int[,] C = new int[source.Length + 1, target.Length + 1];\n\n            for (int i = 0; i < source.Length + 1; i++) { C[i, 0] = 0; }\n            for (int j = 0; j < target.Length + 1; j++) { C[0, j] = 0; }\n\n            for (int i = 1; i < source.Length + 1; i++)\n            {\n                for (int j = 1; j < target.Length + 1; j++)\n                {\n                    if (source[i - 1].Equals(target[j - 1]))\n                    {\n                        C[i, j] = C[i - 1, j - 1] + 1;\n                    }\n                    else\n                    {\n                        C[i, j] = Math.Max(C[i, j - 1], C[i - 1, j]);\n                    }\n                }\n            }\n\n            return C;\n        }\n\n        private static string Backtrack(int[,] C, string source, string target, int i, int j)\n        {\n            if (i == 0 || j == 0)\n            {\n                return \"\";\n            }\n            else if (source[i - 1].Equals(target[j - 1]))\n            {\n                return Backtrack(C, source, target, i - 1, j - 1) + source[i - 1];\n            }\n            else\n            {\n                if (C[i, j - 1] > C[i - 1, j])\n                {\n                    return Backtrack(C, source, target, i, j - 1);\n                }\n                else\n                {\n                    return Backtrack(C, source, target, i - 1, j);\n                }\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/LongestCommonSubstring.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static string LongestCommonSubstring(this string source, string target)\n        {\n            if (String.IsNullOrEmpty(source) || String.IsNullOrEmpty(target)) { return null; }\n\n            int[,] L = new int[source.Length, target.Length];\n            int maximumLength = 0;\n            int lastSubsBegin = 0;\n            StringBuilder stringBuilder = new StringBuilder();\n\n            for (int i = 0; i < source.Length; i++)\n            {\n                for (int j = 0; j < target.Length; j++)\n                {\n                    if (source[i] != target[j])\n                    {\n                        L[i, j] = 0;\n                    }\n                    else\n                    {\n                        if ((i == 0) || (j == 0))\n                            L[i, j] = 1;\n                        else\n                            L[i, j] = 1 + L[i - 1, j - 1];\n\n                        if (L[i, j] > maximumLength)\n                        {\n                            maximumLength = L[i, j];\n                            int thisSubsBegin = i - L[i, j] + 1;\n                            if (lastSubsBegin == thisSubsBegin)\n                            {//if the current LCS is the same as the last time this block ran\n                                stringBuilder.Append(source[i]);\n                            }\n                            else //this block resets the string builder if a different LCS is found\n                            {\n                                lastSubsBegin = thisSubsBegin;\n                                stringBuilder.Length = 0; //clear it\n                                stringBuilder.Append(source.Substring(lastSubsBegin, (i + 1) - lastSubsBegin));\n                            }\n                        }\n                    }\n                }\n            }\n\n            return stringBuilder.ToString();\n        }\n\n    }\n}\n"
  },
  {
    "path": "FuzzyString/Operations.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class Operations\n    {\n        public static string Capitalize(this string source)\n        {\n            return source.ToUpper();\n        }\n\n        public static string[] SplitIntoIndividualElements(string source)\n        {\n            string[] stringCollection = new string[source.Length];\n\n            for (int i = 0; i < stringCollection.Length; i++)\n            {\n                stringCollection[i] = source[i].ToString();\n            }\n\n            return stringCollection;\n        }\n\n        public static string MergeIndividualElementsIntoString(IEnumerable<string> source)\n        {\n            string returnString = \"\";\n\n            for (int i = 0; i < source.Count(); i++)\n            {\n                returnString += source.ElementAt<string>(i);\n            }\n            return returnString;\n        }\n\n        public static List<string> ListPrefixes(this string source)\n        {\n            List<string> prefixes = new List<string>();\n\n            for (int i = 0; i < source.Length; i++)\n            {\n                prefixes.Add(source.Substring(0, i));\n            }\n\n            return prefixes;\n        }\n\n        public static List<string> ListBiGrams(this string source)\n        {\n            return ListNGrams(source, 2);\n        }\n\n        public static List<string> ListTriGrams(this string source)\n        {\n            return ListNGrams(source, 3);\n        }\n\n        public static List<string> ListNGrams(this string source, int n)\n        {\n            List<string> nGrams = new List<string>();\n\n            if (n > source.Length)\n            {\n                return null;\n            }\n            else if (n == source.Length)\n            {\n                nGrams.Add(source);\n                return nGrams;\n            }\n            else\n            {\n                for (int i = 0; i < source.Length - n; i++)\n                {\n                    nGrams.Add(source.Substring(i, n));\n                }\n\n                return nGrams;\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/OverlapCoefficient.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static double OverlapCoefficient(this string source, string target)\n        {\n            return (Convert.ToDouble(source.Intersect(target).Count())) / Convert.ToDouble(Math.Min(source.Length, target.Length));\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/Properties/AssemblyInfo.cs",
    "content": "﻿// The following GUID is for the ID of the typelib if this project is exposed to COM\n\nusing System.Runtime.InteropServices;\n\n[assembly: Guid(\"ccb1b9db-80eb-42bf-b7d1-2d6f8886d98b\")]\n"
  },
  {
    "path": "FuzzyString/RatcliffObershelpSimilarity.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static double RatcliffObershelpSimilarity(this string source, string target)\n        {\n            return (2 * Convert.ToDouble(source.Intersect(target).Count())) / (Convert.ToDouble(source.Length + target.Length));\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/Resources/License.txt",
    "content": "﻿Eclipse Public License -v 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n1. DEFINITIONS\n\n\"Contribution\" means:\n\na) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and\n\nb) in the case of each subsequent Contributor:\n\ni) changes to the Program, and\n\nii) additions to the Program; \n\nwhere such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.\n\n\"Contributor\" means any person or entity that distributes the Program.\n\n\"Licensed Patents \" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.\n\n\"Program\" means the Contributions distributed in accordance with this Agreement.\n\n\"Recipient\" means anyone who receives the Program under this Agreement, including all Contributors.\n\n2. GRANT OF RIGHTS\n\na) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.\n\nb) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.\n\nc) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.\n\nd) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.\n\n3. REQUIREMENTS\n\nA Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:\n\na) it complies with the terms and conditions of this Agreement; and\n\nb) its license agreement:\n\ni) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;\n\nii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;\n\niii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and\n\niv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. \n\nWhen the Program is made available in source code form:\n\na) it must be made available under this Agreement; and\n\nb) a copy of this Agreement must be included with each copy of the Program. \n\nContributors may not remove or alter any copyright notices contained within the Program.\n\nEach Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.\n\n4. COMMERCIAL DISTRIBUTION\n\nCommercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (\"Commercial Contributor\") hereby agrees to defend and indemnify every other Contributor (\"Indemnified Contributor\") against any losses, damages and costs (collectively \"Losses\") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.\n\nFor example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.\n\n5. NO WARRANTY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.\n\n6. DISCLAIMER OF LIABILITY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n7. GENERAL\n\nIf any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\n\nIf Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.\n\nAll Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.\n\nEveryone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.\n\nThis Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation."
  },
  {
    "path": "FuzzyString/SorensenDiceDistance.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static double SorensenDiceDistance(this string source, string target)\n        {\n            return 1 - source.SorensenDiceIndex(target);\n        }\n\n        public static double SorensenDiceIndex(this string source, string target)\n        {\n            return (2 * Convert.ToDouble(source.Intersect(target).Count())) / (Convert.ToDouble(source.Length + target.Length));\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString/TanimotoCoefficient.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nnamespace FuzzyString\n{\n    public static partial class ComparisonMetrics\n    {\n        public static double TanimotoCoefficient(this string source, string target)\n        {\n            double Na = source.Length;\n            double Nb = target.Length;\n            double Nc = source.Intersect(target).Count();\n\n            return Nc / (Na + Nb - Nc);\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyString.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25420.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"FuzzyStringConsole\", \"FuzzyStringConsole\\FuzzyStringConsole.csproj\", \"{FFE75CA6-E76E-4977-85D3-B6F256ACA5E6}\"\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"FuzzyString\", \"FuzzyString\\FuzzyString.csproj\", \"{2AAA900B-64FB-4874-9444-64AE33ACA970}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Solution Items\", \"Solution Items\", \"{8CFDC47C-8A8B-4163-A61C-2535CD872A64}\"\n\tProjectSection(SolutionItems) = preProject\n\t\t.gitattributes = .gitattributes\n\t\t.gitignore = .gitignore\n\t\tREADME.md = README.md\n\tEndProjectSection\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{FFE75CA6-E76E-4977-85D3-B6F256ACA5E6}.Debug|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{FFE75CA6-E76E-4977-85D3-B6F256ACA5E6}.Debug|Any CPU.Build.0 = Release|Any CPU\n\t\t{FFE75CA6-E76E-4977-85D3-B6F256ACA5E6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{FFE75CA6-E76E-4977-85D3-B6F256ACA5E6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{2AAA900B-64FB-4874-9444-64AE33ACA970}.Debug|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{2AAA900B-64FB-4874-9444-64AE33ACA970}.Debug|Any CPU.Build.0 = Release|Any CPU\n\t\t{2AAA900B-64FB-4874-9444-64AE33ACA970}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{2AAA900B-64FB-4874-9444-64AE33ACA970}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "FuzzyStringConsole/App.config",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<configuration>\n    <startup> \n        <supportedRuntime version=\"v4.0\" sku=\".NETFramework,Version=v4.6.1\"/>\n    </startup>\n</configuration>\n"
  },
  {
    "path": "FuzzyStringConsole/FuzzyStringConsole.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"12.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{FFE75CA6-E76E-4977-85D3-B6F256ACA5E6}</ProjectGuid>\n    <OutputType>Exe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>FuzzyStringConsole</RootNamespace>\n    <AssemblyName>FuzzyStringConsole</AssemblyName>\n    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <SccProjectName>SAK</SccProjectName>\n    <SccLocalPath>SAK</SccLocalPath>\n    <SccAuxPath>SAK</SccAuxPath>\n    <SccProvider>SAK</SccProvider>\n    <IsWebBootstrapper>false</IsWebBootstrapper>\n    <PublishUrl>publish\\</PublishUrl>\n    <Install>true</Install>\n    <InstallFrom>Disk</InstallFrom>\n    <UpdateEnabled>false</UpdateEnabled>\n    <UpdateMode>Foreground</UpdateMode>\n    <UpdateInterval>7</UpdateInterval>\n    <UpdateIntervalUnits>Days</UpdateIntervalUnits>\n    <UpdatePeriodically>false</UpdatePeriodically>\n    <UpdateRequired>false</UpdateRequired>\n    <MapFileExtensions>true</MapFileExtensions>\n    <ApplicationRevision>0</ApplicationRevision>\n    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>\n    <UseApplicationTrust>false</UseApplicationTrust>\n    <BootstrapperEnabled>true</BootstrapperEnabled>\n    <TargetFrameworkProfile />\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Core\" />\n    <Reference Include=\"System.Xml.Linq\" />\n    <Reference Include=\"System.Data.DataSetExtensions\" />\n    <Reference Include=\"Microsoft.CSharp\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"App.config\" />\n  </ItemGroup>\n  <ItemGroup>\n    <BootstrapperPackage Include=\".NETFramework,Version=v4.5\">\n      <Visible>False</Visible>\n      <ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>\n      <Install>true</Install>\n    </BootstrapperPackage>\n    <BootstrapperPackage Include=\"Microsoft.Net.Client.3.5\">\n      <Visible>False</Visible>\n      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>\n      <Install>false</Install>\n    </BootstrapperPackage>\n    <BootstrapperPackage Include=\"Microsoft.Net.Framework.3.5.SP1\">\n      <Visible>False</Visible>\n      <ProductName>.NET Framework 3.5 SP1</ProductName>\n      <Install>false</Install>\n    </BootstrapperPackage>\n  </ItemGroup>\n  <ItemGroup>\n    <Content Include=\"Resources\\License.txt\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\FuzzyString\\FuzzyString.csproj\">\n      <Project>{2aaa900b-64fb-4874-9444-64ae33aca970}</Project>\n      <Name>FuzzyString</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "FuzzyStringConsole/Program.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\nusing FuzzyString;\n\nnamespace FuzzyStringConsole\n{\n    class Program\n    {\n        static void Main(string[] args)\n        { \n            string kevin = \"kevin\";\n            string kevyn = \"kevyn\";\n\n            List<FuzzyStringComparisonOptions> options = new List<FuzzyStringComparisonOptions>();\n            options.Add(FuzzyStringComparisonOptions.UseJaccardDistance);\n            options.Add(FuzzyStringComparisonOptions.UseNormalizedLevenshteinDistance);\n            options.Add(FuzzyStringComparisonOptions.UseOverlapCoefficient);\n            options.Add(FuzzyStringComparisonOptions.UseLongestCommonSubsequence);\n            options.Add(FuzzyStringComparisonOptions.CaseSensitive);\n\n            Console.WriteLine(kevin.ApproximatelyEquals(kevyn, FuzzyStringComparisonTolerance.Weak, options.ToArray()));\n            Console.WriteLine(kevin.ApproximatelyEquals(kevyn, FuzzyStringComparisonTolerance.Normal, options.ToArray()));\n            Console.WriteLine(kevin.ApproximatelyEquals(kevyn, FuzzyStringComparisonTolerance.Strong, options.ToArray()));\n\n            Console.ReadLine();\n        }\n    }\n}\n"
  },
  {
    "path": "FuzzyStringConsole/Properties/AssemblyInfo.cs",
    "content": "﻿using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"FuzzyStringConsole\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"\")]\n[assembly: AssemblyProduct(\"FuzzyStringConsole\")]\n[assembly: AssemblyCopyright(\"Copyright ©  2013\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components.  If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"a23fa530-8f7b-4072-826a-d39e88763f22\")]\n\n// Version information for an assembly consists of the following four values:\n//\n//      Major Version\n//      Minor Version \n//      Build Number\n//      Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "FuzzyStringConsole/Resources/License.txt",
    "content": "﻿Eclipse Public License -v 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n1. DEFINITIONS\n\n\"Contribution\" means:\n\na) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and\n\nb) in the case of each subsequent Contributor:\n\ni) changes to the Program, and\n\nii) additions to the Program; \n\nwhere such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.\n\n\"Contributor\" means any person or entity that distributes the Program.\n\n\"Licensed Patents \" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.\n\n\"Program\" means the Contributions distributed in accordance with this Agreement.\n\n\"Recipient\" means anyone who receives the Program under this Agreement, including all Contributors.\n\n2. GRANT OF RIGHTS\n\na) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.\n\nb) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.\n\nc) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.\n\nd) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.\n\n3. REQUIREMENTS\n\nA Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:\n\na) it complies with the terms and conditions of this Agreement; and\n\nb) its license agreement:\n\ni) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;\n\nii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;\n\niii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and\n\niv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. \n\nWhen the Program is made available in source code form:\n\na) it must be made available under this Agreement; and\n\nb) a copy of this Agreement must be included with each copy of the Program. \n\nContributors may not remove or alter any copyright notices contained within the Program.\n\nEach Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.\n\n4. COMMERCIAL DISTRIBUTION\n\nCommercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (\"Commercial Contributor\") hereby agrees to defend and indemnify every other Contributor (\"Indemnified Contributor\") against any losses, damages and costs (collectively \"Losses\") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.\n\nFor example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.\n\n5. NO WARRANTY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.\n\n6. DISCLAIMER OF LIABILITY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n\n7. GENERAL\n\nIf any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\n\nIf Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.\n\nAll Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.\n\nEveryone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.\n\nThis Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation."
  },
  {
    "path": "LICENSE",
    "content": "Eclipse Public License - v 1.0\n\nTHE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC\nLICENSE (\"AGREEMENT\"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM\nCONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.\n\n1. DEFINITIONS\n\n\"Contribution\" means:\n\na) in the case of the initial Contributor, the initial code and documentation\n   distributed under this Agreement, and\nb) in the case of each subsequent Contributor:\n    i) changes to the Program, and\n   ii) additions to the Program;\n\n   where such changes and/or additions to the Program originate from and are\n   distributed by that particular Contributor. A Contribution 'originates'\n   from a Contributor if it was added to the Program by such Contributor\n   itself or anyone acting on such Contributor's behalf. Contributions do not\n   include additions to the Program which: (i) are separate modules of\n   software distributed in conjunction with the Program under their own\n   license agreement, and (ii) are not derivative works of the Program.\n\n\"Contributor\" means any person or entity that distributes the Program.\n\n\"Licensed Patents\" mean patent claims licensable by a Contributor which are\nnecessarily infringed by the use or sale of its Contribution alone or when\ncombined with the Program.\n\n\"Program\" means the Contributions distributed in accordance with this\nAgreement.\n\n\"Recipient\" means anyone who receives the Program under this Agreement,\nincluding all Contributors.\n\n2. GRANT OF RIGHTS\n  a) Subject to the terms of this Agreement, each Contributor hereby grants\n     Recipient a non-exclusive, worldwide, royalty-free copyright license to\n     reproduce, prepare derivative works of, publicly display, publicly\n     perform, distribute and sublicense the Contribution of such Contributor,\n     if any, and such derivative works, in source code and object code form.\n  b) Subject to the terms of this Agreement, each Contributor hereby grants\n     Recipient a non-exclusive, worldwide, royalty-free patent license under\n     Licensed Patents to make, use, sell, offer to sell, import and otherwise\n     transfer the Contribution of such Contributor, if any, in source code and\n     object code form. This patent license shall apply to the combination of\n     the Contribution and the Program if, at the time the Contribution is\n     added by the Contributor, such addition of the Contribution causes such\n     combination to be covered by the Licensed Patents. The patent license\n     shall not apply to any other combinations which include the Contribution.\n     No hardware per se is licensed hereunder.\n  c) Recipient understands that although each Contributor grants the licenses\n     to its Contributions set forth herein, no assurances are provided by any\n     Contributor that the Program does not infringe the patent or other\n     intellectual property rights of any other entity. Each Contributor\n     disclaims any liability to Recipient for claims brought by any other\n     entity based on infringement of intellectual property rights or\n     otherwise. As a condition to exercising the rights and licenses granted\n     hereunder, each Recipient hereby assumes sole responsibility to secure\n     any other intellectual property rights needed, if any. For example, if a\n     third party patent license is required to allow Recipient to distribute\n     the Program, it is Recipient's responsibility to acquire that license\n     before distributing the Program.\n  d) Each Contributor represents that to its knowledge it has sufficient\n     copyright rights in its Contribution, if any, to grant the copyright\n     license set forth in this Agreement.\n\n3. REQUIREMENTS\n\nA Contributor may choose to distribute the Program in object code form under\nits own license agreement, provided that:\n\n  a) it complies with the terms and conditions of this Agreement; and\n  b) its license agreement:\n      i) effectively disclaims on behalf of all Contributors all warranties\n         and conditions, express and implied, including warranties or\n         conditions of title and non-infringement, and implied warranties or\n         conditions of merchantability and fitness for a particular purpose;\n     ii) effectively excludes on behalf of all Contributors all liability for\n         damages, including direct, indirect, special, incidental and\n         consequential damages, such as lost profits;\n    iii) states that any provisions which differ from this Agreement are\n         offered by that Contributor alone and not by any other party; and\n     iv) states that source code for the Program is available from such\n         Contributor, and informs licensees how to obtain it in a reasonable\n         manner on or through a medium customarily used for software exchange.\n\nWhen the Program is made available in source code form:\n\n  a) it must be made available under this Agreement; and\n  b) a copy of this Agreement must be included with each copy of the Program.\n     Contributors may not remove or alter any copyright notices contained\n     within the Program.\n\nEach Contributor must identify itself as the originator of its Contribution,\nif\nany, in a manner that reasonably allows subsequent Recipients to identify the\noriginator of the Contribution.\n\n4. COMMERCIAL DISTRIBUTION\n\nCommercial distributors of software may accept certain responsibilities with\nrespect to end users, business partners and the like. While this license is\nintended to facilitate the commercial use of the Program, the Contributor who\nincludes the Program in a commercial product offering should do so in a manner\nwhich does not create potential liability for other Contributors. Therefore,\nif a Contributor includes the Program in a commercial product offering, such\nContributor (\"Commercial Contributor\") hereby agrees to defend and indemnify\nevery other Contributor (\"Indemnified Contributor\") against any losses,\ndamages and costs (collectively \"Losses\") arising from claims, lawsuits and\nother legal actions brought by a third party against the Indemnified\nContributor to the extent caused by the acts or omissions of such Commercial\nContributor in connection with its distribution of the Program in a commercial\nproduct offering. The obligations in this section do not apply to any claims\nor Losses relating to any actual or alleged intellectual property\ninfringement. In order to qualify, an Indemnified Contributor must:\na) promptly notify the Commercial Contributor in writing of such claim, and\nb) allow the Commercial Contributor to control, and cooperate with the\nCommercial Contributor in, the defense and any related settlement\nnegotiations. The Indemnified Contributor may participate in any such claim at\nits own expense.\n\nFor example, a Contributor might include the Program in a commercial product\noffering, Product X. That Contributor is then a Commercial Contributor. If\nthat Commercial Contributor then makes performance claims, or offers\nwarranties related to Product X, those performance claims and warranties are\nsuch Commercial Contributor's responsibility alone. Under this section, the\nCommercial Contributor would have to defend claims against the other\nContributors related to those performance claims and warranties, and if a\ncourt requires any other Contributor to pay any damages as a result, the\nCommercial Contributor must pay those damages.\n\n5. NO WARRANTY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR\nIMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE,\nNON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each\nRecipient is solely responsible for determining the appropriateness of using\nand distributing the Program and assumes all risks associated with its\nexercise of rights under this Agreement , including but not limited to the\nrisks and costs of program errors, compliance with applicable laws, damage to\nor loss of data, programs or equipment, and unavailability or interruption of\noperations.\n\n6. DISCLAIMER OF LIABILITY\n\nEXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY\nCONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION\nLOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\nCONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\nARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE\nEXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY\nOF SUCH DAMAGES.\n\n7. GENERAL\n\nIf any provision of this Agreement is invalid or unenforceable under\napplicable law, it shall not affect the validity or enforceability of the\nremainder of the terms of this Agreement, and without further action by the\nparties hereto, such provision shall be reformed to the minimum extent\nnecessary to make such provision valid and enforceable.\n\nIf Recipient institutes patent litigation against any entity (including a\ncross-claim or counterclaim in a lawsuit) alleging that the Program itself\n(excluding combinations of the Program with other software or hardware)\ninfringes such Recipient's patent(s), then such Recipient's rights granted\nunder Section 2(b) shall terminate as of the date such litigation is filed.\n\nAll Recipient's rights under this Agreement shall terminate if it fails to\ncomply with any of the material terms or conditions of this Agreement and does\nnot cure such failure in a reasonable period of time after becoming aware of\nsuch noncompliance. If all Recipient's rights under this Agreement terminate,\nRecipient agrees to cease use and distribution of the Program as soon as\nreasonably practicable. However, Recipient's obligations under this Agreement\nand any licenses granted by Recipient relating to the Program shall continue\nand survive.\n\nEveryone is permitted to copy and distribute copies of this Agreement, but in\norder to avoid inconsistency the Agreement is copyrighted and may only be\nmodified in the following manner. The Agreement Steward reserves the right to\npublish new versions (including revisions) of this Agreement from time to\ntime. No one other than the Agreement Steward has the right to modify this\nAgreement. The Eclipse Foundation is the initial Agreement Steward. The\nEclipse Foundation may assign the responsibility to serve as the Agreement\nSteward to a suitable separate entity. Each new version of the Agreement will\nbe given a distinguishing version number. The Program (including\nContributions) may always be distributed subject to the version of the\nAgreement under which it was received. In addition, after a new version of the\nAgreement is published, Contributor may elect to distribute the Program\n(including its Contributions) under the new version. Except as expressly\nstated in Sections 2(a) and 2(b) above, Recipient receives no rights or\nlicenses to the intellectual property of any Contributor under this Agreement,\nwhether expressly, by implication, estoppel or otherwise. All rights in the\nProgram not expressly granted under this Agreement are reserved.\n\nThis Agreement is governed by the laws of the State of New York and the\nintellectual property laws of the United States of America. No party to this\nAgreement will bring a legal action under this Agreement more than one year\nafter the cause of action arose. Each party waives its rights to a jury trial in\nany resulting litigation.\n"
  },
  {
    "path": "README.md",
    "content": "# fuzzystring\nApproximate String Comparision in C#\n\n*Originally Hosted on Codplex*\nhttp://fuzzystring.codeplex.com\n\n## Project Description\n\nFuzzyString is a library developed for use in my day job for reconciling naming conventions between different models of the electric grid. I have stripped off the power system specific code and put together what can effectively be used as a string extension for determining approximate equality between two strings. All of the algorithms used here have been pulled from online resources, translated into C#, and compiled into this library. I found several other similar open-source implementations around but nothing for .NET/C#. Adding the *.dll to your project will give you access to this extension and the individual extensions under the hood of the ApproximatelyEquals() extension.\n\n## Algorithms included in this project\n\n* Hamming Distance|http://en.wikipedia.org/wiki/Hamming_distance\n* Jaccard Distance|http://en.wikipedia.org/wiki/Jaccard_index\n* Jaro Distance|http://en.wikipedia.org/wiki/Jaro_distance\n* Jaro-Winkler Distance|http://en.wikipedia.org/wiki/Jaro_distance\n* Levenshtein Distance|http://en.wikipedia.org/wiki/Levenshtein_distance\n* Longest Common Subsequence|http://en.wikipedia.org/wiki/Longest_common_subsequence_problem\n* Longest Common Substring|http://en.wikipedia.org/wiki/Longest_common_substring\n* Overlap Coefficient|http://en.wikipedia.org/wiki/Overlap_coefficient\n* Ratcliff-Obershelp Similarity|http://www.morfoedro.it/doc.php?n=223&lang=en\n* Sorensen-Dice Distance|http://en.wikipedia.org/wiki/S%C3%B8rensen%E2%80%93Dice_coefficient\n* Tanimoto Coefficient|http://en.wikipedia.org/wiki/Tanimoto_coefficient#Tanimoto_coefficient_.28extended_Jaccard_coefficient.29\n\n## Approximate String Comparision\n> Note: This sample is taken from the [legacy documentation] on CodePlex.\n\nWhile all of the algorithms are exposed and can be used and can provide their raw results, they have been conveniently combined in a way that they can selectively be used to judge the approximate equality of two strings. This is done through the `ApproximatelyEquals` extension and by setting the desired `FuzzyStringComparisonOptions` and `FuzzyStringComparisonTolerance`.\n\nFor two strings that are desired to be compared approximately, a boolean response of equality can be garnered in the following way:\n\n\n```csharp\nstring source = \"kevin\";\nstring target = \"kevyn\";\n\nList<FuzzyStringComparisonOptions> options = new List<FuzzyStringComparisonOptions>();\n\n// Choose which algorithms should weigh in for the comparison\noptions.Add(FuzzyStringComparisonOptions.UseOverlapCoefficient);\noptions.Add(FuzzyStringComparisonOptions.UseLongestCommonSubsequence);\noptions.Add(FuzzyStringComparisonOptions.UseLongestCommonSubstring);\n\n// Choose the relative strength of the comparison - is it almost exactly equal? or is it just close?\nFuzzyStringComparisonTolerance tolerance = FuzzyStringTolerance.Strong;\n\n// Get a boolean determination of approximate equality\nbool result = source.ApproximatelyEquals(target, options, tolerance);\n```\n\n[legacy documentation]: http://fuzzystring.codeplex.com/wikipage?title=Using%20the%20ApproximatelyEquals%28%29%20Extension&referringTitle=Documentation\n\n"
  }
]