From dbcdf38d10e53121b89f7ec7ad2ee16cca5ffd61 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 19:28:56 -0600 Subject: [PATCH 01/25] Converted existing class comments into xml comments. --- src/F23.StringSimilarity/WeightedLevenshtein.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/F23.StringSimilarity/WeightedLevenshtein.cs b/src/F23.StringSimilarity/WeightedLevenshtein.cs index 0ac576d..4db07f1 100644 --- a/src/F23.StringSimilarity/WeightedLevenshtein.cs +++ b/src/F23.StringSimilarity/WeightedLevenshtein.cs @@ -31,8 +31,10 @@ namespace F23.StringSimilarity { + /// /// Implementation of Levenshtein that allows to define different weights for /// different character substitutions. + /// public class WeightedLevenshtein : IStringDistance { private readonly ICharacterSubstitution _characterSubstitution; From 33f59a430fd706423a400b49e6a03a453062fe5a Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 19:31:16 -0600 Subject: [PATCH 02/25] Converted class comment into xml comment. --- src/F23.StringSimilarity/SorensenDice.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/SorensenDice.cs b/src/F23.StringSimilarity/SorensenDice.cs index 70683f0..e24b79f 100644 --- a/src/F23.StringSimilarity/SorensenDice.cs +++ b/src/F23.StringSimilarity/SorensenDice.cs @@ -29,9 +29,10 @@ // ReSharper disable LoopCanBeConvertedToQuery namespace F23.StringSimilarity -{ +{ /// /// Similar to Jaccard index, but this time the similarity is computed as 2 * |V1 /// inter V2| / (|V1| + |V2|). Distance is computed as 1 - cosine similarity. + /// public class SorensenDice : ShingleBased, INormalizedStringDistance, INormalizedStringSimilarity { /// From 5ca0766dcbc12bee5d12314ef309f808e59d9e06 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 19:37:08 -0600 Subject: [PATCH 03/25] Added xml comments to shingle base class. --- src/F23.StringSimilarity/ShingleBased.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/F23.StringSimilarity/ShingleBased.cs b/src/F23.StringSimilarity/ShingleBased.cs index bc354d4..8cf847f 100644 --- a/src/F23.StringSimilarity/ShingleBased.cs +++ b/src/F23.StringSimilarity/ShingleBased.cs @@ -28,6 +28,9 @@ namespace F23.StringSimilarity { + /// + /// Base class for shingle based algorithms. + /// public abstract class ShingleBased { private const int DEFAULT_K = 3; @@ -56,8 +59,21 @@ protected ShingleBased(int k) this.k = k; } + /// + /// Initializes a new instance of the class with the default shingle size. + /// protected ShingleBased() : this(DEFAULT_K) { } + /// + /// Generates a profile of k-length substrings (shingles) from the specified string, along with their frequency + /// of occurrence. + /// + /// This method processes the input string by normalizing spaces and then extracting + /// overlapping substrings of length k. The resulting dictionary provides a frequency count for each unique + /// shingle. + /// The input string from which to generate the shingle profile. Cannot be null. + /// A dictionary where the keys are k-length substrings (shingles) extracted from the input string, and the + /// values are the number of times each shingle appears. public Dictionary GetProfile(string s) { var shingles = new Dictionary(); From 94275217b44514364ba8f1a72736571929b1064c Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 19:41:31 -0600 Subject: [PATCH 04/25] Converted class comment to xml summary comment. --- src/F23.StringSimilarity/QGram.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/QGram.cs b/src/F23.StringSimilarity/QGram.cs index 14a890b..c10db53 100644 --- a/src/F23.StringSimilarity/QGram.cs +++ b/src/F23.StringSimilarity/QGram.cs @@ -27,13 +27,14 @@ using F23.StringSimilarity.Interfaces; namespace F23.StringSimilarity -{ +{ /// /// Q-gram distance, as defined by Ukkonen in "Approximate string-matching with /// q-grams and maximal matches". The distance between two strings is defined as /// the L1 norm of the difference of their profiles (the number of occurences of /// each n-gram): SUM( |V1_i - V2_i| ). Q-gram distance is a lower bound on /// Levenshtein distance, but can be computed in O(m + n), where Levenshtein /// requires O(m.n). + /// public class QGram : ShingleBased, IStringDistance { /// From 343e403e3e746ba4db79b68443dbb5d168b32c56 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 19:43:33 -0600 Subject: [PATCH 05/25] Added missing comments. --- .../OptimalStringAlignment.cs | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/F23.StringSimilarity/OptimalStringAlignment.cs b/src/F23.StringSimilarity/OptimalStringAlignment.cs index 13af7a1..f404fc6 100644 --- a/src/F23.StringSimilarity/OptimalStringAlignment.cs +++ b/src/F23.StringSimilarity/OptimalStringAlignment.cs @@ -29,6 +29,17 @@ namespace F23.StringSimilarity { + /// + /// Provides an implementation of the Optimal String Alignment (OSA) distance algorithm, which calculates the + /// minimum number of operations required to transform one string into another. Supported operations include + /// insertion, deletion, substitution of a single character, and transposition of two adjacent characters, with the + /// constraint that no substring is edited more than once. + /// + /// This class is designed for use in scenarios where a measure of similarity or difference + /// between two strings or spans is required. It supports both string and span-based inputs, making it suitable for + /// high-performance applications where memory efficiency is important. The OSA distance is particularly useful in + /// applications such as spell checking, approximate string matching, and natural language processing, where + /// transpositions (e.g., swapping two adjacent characters) are common errors. public sealed class OptimalStringAlignment : IStringDistance, ISpanDistance { /// @@ -44,6 +55,19 @@ public sealed class OptimalStringAlignment : IStringDistance, ISpanDistance public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); + /// + /// Calculates the Damerau-Levenshtein distance between two sequences. + /// + /// The Damerau-Levenshtein distance is a metric for measuring the difference between two + /// sequences. It extends the Levenshtein distance by allowing transpositions of adjacent characters as a + /// single edit operation. This method is case-sensitive for sequences of characters. + /// The type of elements in the sequences. The type must implement . + /// The first sequence to compare. Cannot be null. + /// The second sequence to compare. Cannot be null. + /// The Damerau-Levenshtein distance between the two sequences, which represents the minimum number of + /// single-character edits (insertions, deletions, substitutions, or transpositions) required to transform one + /// sequence into the other. + /// Thrown if or is null. public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable { From d5e08bb531574477e10fa5a007e5d9a60e416483 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 21:14:11 -0600 Subject: [PATCH 06/25] Remaining classes have xml documentation added on all items with public and protected level access modifiers. Existing xml comments on private class items untouched. --- src/F23.StringSimilarity/Damerau.cs | 16 +++++++++++ src/F23.StringSimilarity/JaroWinkler.cs | 24 +++++++++++++++++ src/F23.StringSimilarity/Levenshtein.cs | 27 +++++++++++++++++++ .../LongestCommonSubsequence.cs | 13 +++++++++ src/F23.StringSimilarity/MetricLCS.cs | 14 ++++++++++ src/F23.StringSimilarity/NGram.cs | 10 +++++++ .../NormalizedLevenshtein.cs | 24 +++++++++++++++++ 7 files changed, 128 insertions(+) diff --git a/src/F23.StringSimilarity/Damerau.cs b/src/F23.StringSimilarity/Damerau.cs index dd6138e..1a349f2 100644 --- a/src/F23.StringSimilarity/Damerau.cs +++ b/src/F23.StringSimilarity/Damerau.cs @@ -56,6 +56,22 @@ public class Damerau : IMetricStringDistance, IMetricSpanDistance public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); + /// + /// Calculates the Damerau-Levenshtein distance between two sequences. + /// + /// The Damerau-Levenshtein distance is a metric for measuring the edit distance between + /// two sequences, allowing for the following operations: Insertion of a + /// single element. Deletion of a single element. + /// Substitution of one element for another. + /// Transposition of two adjacent elements. This method is + /// case-sensitive for sequences of strings or characters. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. Cannot be . + /// The second sequence to compare. Cannot be . + /// The Damerau-Levenshtein distance between the two sequences, which represents the minimum number of operations + /// (insertions, deletions, substitutions, or transpositions) required to transform one sequence into the other. + /// Returns 0 if the sequences are equal. + /// Thrown if or is . public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable { diff --git a/src/F23.StringSimilarity/JaroWinkler.cs b/src/F23.StringSimilarity/JaroWinkler.cs index 88ad93a..4c5ba76 100644 --- a/src/F23.StringSimilarity/JaroWinkler.cs +++ b/src/F23.StringSimilarity/JaroWinkler.cs @@ -31,6 +31,7 @@ namespace F23.StringSimilarity { + /// /// The Jaro–Winkler distance metric is designed and best suited for short /// strings such as person names, and to detect typos; it is (roughly) a /// variation of Damerau-Levenshtein, where the substitution of 2 close @@ -39,6 +40,7 @@ namespace F23.StringSimilarity /// Jaro-Winkler was developed in the area of record linkage (duplicate /// detection) (Winkler, 1990). It returns a value in the interval [0.0, 1.0]. /// The distance is computed as 1 - Jaro-Winkler similarity. + /// public class JaroWinkler : INormalizedStringSimilarity, INormalizedStringDistance, INormalizedSpanSimilarity, INormalizedSpanDistance { private const double DEFAULT_THRESHOLD = 0.7; @@ -78,6 +80,18 @@ public JaroWinkler(double threshold) public double Similarity(string s1, string s2) => Similarity(s1.AsSpan(), s2.AsSpan()); + /// + /// Calculates the similarity between two sequences using the Jaro-Winkler distance metric. + /// + /// The similarity is calculated using the Jaro-Winkler distance, which is a measure of + /// similarity between two sequences. The result is adjusted based on common prefixes to give higher scores to + /// sequences that share a common prefix. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. Cannot be null. + /// The second sequence to compare. Cannot be null. + /// A value between 0 and 1 representing the similarity between the two sequences, where 1 indicates identical + /// sequences and 0 indicates no similarity. + /// Thrown if or is null. public double Similarity(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable { @@ -123,6 +137,16 @@ public double Similarity(ReadOnlySpan s1, ReadOnlySpan s2) public double Distance(string s1, string s2) => 1.0 - Similarity(s1, s2); + /// + /// Calculates the distance between two sequences based on their similarity. + /// + /// The distance is calculated as the complement of the similarity between the two + /// sequences. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. + /// The second sequence to compare. + /// A double value representing the distance between the two sequences. The value ranges from 0.0 to 1.0, where + /// 0.0 indicates identical sequences and 1.0 indicates completely dissimilar sequences. public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable => 1.0 - Similarity(s1, s2); diff --git a/src/F23.StringSimilarity/Levenshtein.cs b/src/F23.StringSimilarity/Levenshtein.cs index 0ccf97d..2856384 100644 --- a/src/F23.StringSimilarity/Levenshtein.cs +++ b/src/F23.StringSimilarity/Levenshtein.cs @@ -29,9 +29,11 @@ namespace F23.StringSimilarity { + /// /// The Levenshtein distance between two words is the Minimum number of /// single-character edits (insertions, deletions or substitutions) required to /// change one string into the other. + /// public class Levenshtein : IMetricStringDistance, IMetricSpanDistance { /// @@ -74,10 +76,35 @@ public class Levenshtein : IMetricStringDistance, IMetricSpanDistance public double Distance(string s1, string s2, int limit) => Distance(s1.AsSpan(), s2.AsSpan(), limit); + /// + /// Calculates the distance between two sequences of elements. + /// + /// This method uses a default maximum threshold for the distance calculation. For custom + /// thresholds, use an overload that accepts a threshold parameter. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. + /// The second sequence to compare. + /// A representing the distance between the two sequences. The specific meaning of the + /// distance depends on the implementation of the comparison logic. public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable => Distance(s1, s2, int.MaxValue); + /// + /// Calculates the edit distance (Levenshtein distance) between two sequences, with an optional upper limit. + /// + /// The edit distance is a measure of the minimum number of single-element edits + /// (insertions, deletions, or substitutions) required to transform one sequence into the other. This method is + /// optimized to stop processing early if the distance exceeds the specified . + /// The type of elements in the sequences. The type must implement . + /// The first sequence to compare. Cannot be null. + /// The second sequence to compare. Cannot be null. + /// The maximum distance to calculate. If the edit distance exceeds this value, the method returns . + /// The edit distance between and . If the sequences are identical, + /// the result is 0. If the distance exceeds , the method returns . + /// Thrown if or is null. public double Distance(ReadOnlySpan s1, ReadOnlySpan s2, int limit) where T : IEquatable { diff --git a/src/F23.StringSimilarity/LongestCommonSubsequence.cs b/src/F23.StringSimilarity/LongestCommonSubsequence.cs index ce5d4d0..8de8df3 100644 --- a/src/F23.StringSimilarity/LongestCommonSubsequence.cs +++ b/src/F23.StringSimilarity/LongestCommonSubsequence.cs @@ -28,6 +28,7 @@ namespace F23.StringSimilarity { + /// /// The longest common subsequence (LCS) problem consists in finding the longest /// subsequence common to two (or more) sequences. It differs from problems of /// finding common substrings: unlike substrings, subsequences are not required @@ -44,6 +45,7 @@ namespace F23.StringSimilarity /// /// ! This class currently implements the dynamic programming approach, which has /// a space requirement O(m * n)! + /// public class LongestCommonSubsequence : IStringDistance, ISpanDistance { /// @@ -60,6 +62,17 @@ public class LongestCommonSubsequence : IStringDistance, ISpanDistance public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); + /// + /// Calculates the distance between two sequences based on their similarity. + /// + /// The distance is calculated as the sum of the lengths of the two sequences minus twice + /// the length of their longest common subsequence. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. Cannot be empty or null. + /// The second sequence to compare. Cannot be empty or null. + /// A non-negative representing the distance between the two sequences. Returns 0 if the + /// sequences are identical. + /// Thrown if or is . public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable { diff --git a/src/F23.StringSimilarity/MetricLCS.cs b/src/F23.StringSimilarity/MetricLCS.cs index 1d33ae6..d9a682d 100644 --- a/src/F23.StringSimilarity/MetricLCS.cs +++ b/src/F23.StringSimilarity/MetricLCS.cs @@ -44,6 +44,20 @@ public class MetricLCS : IMetricStringDistance, INormalizedStringDistance, IMetr public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); + /// + /// Calculates the normalized distance between two sequences based on their longest common subsequence. + /// + /// The distance is calculated as: 1.0 - (Length of Longest Common Subsequence / + /// Maximum Length of the Two Sequences) This method is case-sensitive for sequences of strings or + /// characters. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. Cannot be null. + /// The second sequence to compare. Cannot be null. + /// A value between 0.0 and 1.0 representing the normalized distance between the two sequences: Returns 0.0 if the sequences are identical. + /// Returns 1.0 if the sequences have no common elements. + /// Returns a value between 0.0 and 1.0 for partial similarity. + /// Thrown if or is . public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable { diff --git a/src/F23.StringSimilarity/NGram.cs b/src/F23.StringSimilarity/NGram.cs index 34739e2..dfc4e8f 100644 --- a/src/F23.StringSimilarity/NGram.cs +++ b/src/F23.StringSimilarity/NGram.cs @@ -47,8 +47,18 @@ public class NGram : INormalizedStringDistance private const int DEFAULT_N = 2; private readonly int n; + /// + /// Initializes a new instance of the class with the default value for N. + /// + /// This constructor sets the N-gram size to the default value defined by . Use this constructor when you want to create an NGram instance with the default + /// configuration. public NGram() : this(DEFAULT_N) { } + /// + /// Initializes a new instance of the class with the specified size. + /// + /// The size of the n-gram. Must be a positive integer. public NGram(int n) { this.n = n; diff --git a/src/F23.StringSimilarity/NormalizedLevenshtein.cs b/src/F23.StringSimilarity/NormalizedLevenshtein.cs index 208e451..631f307 100644 --- a/src/F23.StringSimilarity/NormalizedLevenshtein.cs +++ b/src/F23.StringSimilarity/NormalizedLevenshtein.cs @@ -27,10 +27,12 @@ namespace F23.StringSimilarity { + /// /// This distance is computed as levenshtein distance divided by the length of /// the longest string. The resulting value is always in the interval [0.0 1.0] /// but it is not a metric anymore! The similarity is computed as 1 - normalized /// distance. + /// public class NormalizedLevenshtein : INormalizedStringDistance, INormalizedStringSimilarity, INormalizedSpanDistance, INormalizedSpanSimilarity { private readonly Levenshtein l = new Levenshtein(); @@ -45,6 +47,18 @@ public class NormalizedLevenshtein : INormalizedStringDistance, INormalizedStrin public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); + /// + /// Calculates the normalized distance between two sequences of elements. + /// + /// The distance is normalized by the length of the longer sequence. This ensures the + /// result is always in the range [0.0, 1.0], where 0.0 indicates identical sequences and 1.0 indicates + /// maximum dissimilarity. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. Cannot be empty or null. + /// The second sequence to compare. Cannot be empty or null. + /// A double value representing the normalized distance between the two sequences. Returns 0.0 if the sequences + /// are equal or both are empty. + /// Thrown if or is null. public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable { @@ -83,6 +97,16 @@ public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) public double Similarity(string s1, string s2) => 1.0 - Distance(s1, s2); + /// + /// Calculates the similarity between two sequences based on their distance. + /// + /// The similarity is calculated as 1.0 minus the distance between the two + /// sequences. + /// The type of elements in the sequences. Must implement . + /// The first sequence to compare. + /// The second sequence to compare. + /// A value between 0.0 and 1.0 representing the similarity of the two sequences, where 1.0 indicates identical + /// sequences and 0.0 indicates completely dissimilar sequences. public double Similarity(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable => 1.0 - Distance(s1, s2); From 822ad871ead7d5198f073c74547050404c763634 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 21:15:12 -0600 Subject: [PATCH 07/25] Interfaces have interface and method level comments added. --- src/F23.StringSimilarity/ICharacterSubstitution.cs | 2 ++ .../Interfaces/INormalizedSpanDistance.cs | 3 +++ .../Interfaces/INormalizedSpanSimilarity.cs | 5 +++++ .../Interfaces/INormalizedStringDistance.cs | 3 +++ .../Interfaces/INormalizedStringSimilarity.cs | 3 +++ src/F23.StringSimilarity/Interfaces/ISpanDistance.cs | 3 +++ src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs | 3 +++ src/F23.StringSimilarity/Interfaces/IStringDistance.cs | 3 +++ src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs | 3 +++ 9 files changed, 28 insertions(+) diff --git a/src/F23.StringSimilarity/ICharacterSubstitution.cs b/src/F23.StringSimilarity/ICharacterSubstitution.cs index 6217b7a..bb64189 100644 --- a/src/F23.StringSimilarity/ICharacterSubstitution.cs +++ b/src/F23.StringSimilarity/ICharacterSubstitution.cs @@ -24,12 +24,14 @@ namespace F23.StringSimilarity { + /// /// Used to indicate the cost of character substitution. /// /// Cost should always be in [0.0 .. 1.0] /// For example, in an OCR application, cost('o', 'a') could be 0.4 /// In a checkspelling application, cost('u', 'i') could be 0.4 because these are /// next to each other on the keyboard... + /// public interface ICharacterSubstitution { /// diff --git a/src/F23.StringSimilarity/Interfaces/INormalizedSpanDistance.cs b/src/F23.StringSimilarity/Interfaces/INormalizedSpanDistance.cs index c23f17b..c586dd0 100644 --- a/src/F23.StringSimilarity/Interfaces/INormalizedSpanDistance.cs +++ b/src/F23.StringSimilarity/Interfaces/INormalizedSpanDistance.cs @@ -1,5 +1,8 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// An interface for normalized distance measures that operate on spans. + /// public interface INormalizedSpanDistance : ISpanDistance { } diff --git a/src/F23.StringSimilarity/Interfaces/INormalizedSpanSimilarity.cs b/src/F23.StringSimilarity/Interfaces/INormalizedSpanSimilarity.cs index c5a46ed..24217b2 100644 --- a/src/F23.StringSimilarity/Interfaces/INormalizedSpanSimilarity.cs +++ b/src/F23.StringSimilarity/Interfaces/INormalizedSpanSimilarity.cs @@ -1,5 +1,10 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// Defines a contract for calculating the similarity between spans of text, normalized to a range of 0 to 1. + /// + /// This interface extends by ensuring that similarity scores are + /// normalized. A score of 0 indicates no similarity, while a score of 1 indicates identical spans. public interface INormalizedSpanSimilarity : ISpanSimilarity { } diff --git a/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs b/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs index 3d7c2ec..6a77cfe 100644 --- a/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs +++ b/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs @@ -24,6 +24,9 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// Interface for normalized string distance algorithms + /// public interface INormalizedStringDistance : IStringDistance { } diff --git a/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs b/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs index 0ea1273..f4068b8 100644 --- a/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs +++ b/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs @@ -24,6 +24,9 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// Interface for normalized string similarity algorithms + /// public interface INormalizedStringSimilarity : IStringSimilarity { } diff --git a/src/F23.StringSimilarity/Interfaces/ISpanDistance.cs b/src/F23.StringSimilarity/Interfaces/ISpanDistance.cs index a832ce2..b915c57 100644 --- a/src/F23.StringSimilarity/Interfaces/ISpanDistance.cs +++ b/src/F23.StringSimilarity/Interfaces/ISpanDistance.cs @@ -2,6 +2,9 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// An interface for distance measures that operate on spans. + /// public interface ISpanDistance { /// diff --git a/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs b/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs index b5ab92a..bf08a50 100644 --- a/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs +++ b/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs @@ -2,6 +2,9 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// Interface for span similarity algorithms + /// public interface ISpanSimilarity { /// diff --git a/src/F23.StringSimilarity/Interfaces/IStringDistance.cs b/src/F23.StringSimilarity/Interfaces/IStringDistance.cs index f268eac..bcef7a4 100644 --- a/src/F23.StringSimilarity/Interfaces/IStringDistance.cs +++ b/src/F23.StringSimilarity/Interfaces/IStringDistance.cs @@ -24,6 +24,9 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// Interface for string distance algorithms + /// public interface IStringDistance { /// diff --git a/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs b/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs index 7a9df6a..f51fba6 100644 --- a/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs +++ b/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs @@ -24,6 +24,9 @@ namespace F23.StringSimilarity.Interfaces { + /// + /// Interface for string similarity algorithms + /// public interface IStringSimilarity { /// From 1c8fa2a464f1d939fd02efc0c6bc82028debc3c9 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Mon, 12 Jan 2026 21:15:58 -0600 Subject: [PATCH 08/25] Extension method classes have xml comments added for documentation --- src/F23.StringSimilarity/Support/ArrayExtensions.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/F23.StringSimilarity/Support/ArrayExtensions.cs b/src/F23.StringSimilarity/Support/ArrayExtensions.cs index cc67614..3b60dbb 100644 --- a/src/F23.StringSimilarity/Support/ArrayExtensions.cs +++ b/src/F23.StringSimilarity/Support/ArrayExtensions.cs @@ -27,8 +27,17 @@ namespace F23.StringSimilarity.Support { + /// + /// Provides extension methods for working with arrays. + /// + /// This class contains utility methods that extend the functionality of arrays, enabling + /// additional operations such as creating a padded version of an array. These methods are designed to simplify + /// common array manipulation tasks. internal static class ArrayExtensions { + /// + /// Creates a new array by padding the source array to the specified final length with the given padding value. + /// internal static T[] WithPadding(this T[] source, int finalLength, T paddingValue = default(T)) { if (finalLength < source.Length) From 666770b5c22109fed7e410748e8baacf1f7a15e2 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:01:51 -0600 Subject: [PATCH 09/25] Moved summary xml tag to line separate from C# code per copilot pr requirement. --- src/F23.StringSimilarity/QGram.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/QGram.cs b/src/F23.StringSimilarity/QGram.cs index c10db53..78e5b58 100644 --- a/src/F23.StringSimilarity/QGram.cs +++ b/src/F23.StringSimilarity/QGram.cs @@ -27,7 +27,8 @@ using F23.StringSimilarity.Interfaces; namespace F23.StringSimilarity -{ /// +{ + /// /// Q-gram distance, as defined by Ukkonen in "Approximate string-matching with /// q-grams and maximal matches". The distance between two strings is defined as /// the L1 norm of the difference of their profiles (the number of occurences of From 49b04e848b62e3b4d2eb0753e9e594a46b36f567 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:03:22 -0600 Subject: [PATCH 10/25] Removed extra spaces in xml comment per copilot pr requirement. --- src/F23.StringSimilarity/Levenshtein.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/F23.StringSimilarity/Levenshtein.cs b/src/F23.StringSimilarity/Levenshtein.cs index 2856384..74e801b 100644 --- a/src/F23.StringSimilarity/Levenshtein.cs +++ b/src/F23.StringSimilarity/Levenshtein.cs @@ -75,21 +75,21 @@ public class Levenshtein : IMetricStringDistance, IMetricSpanDistance /// If s1 or s2 is null. public double Distance(string s1, string s2, int limit) => Distance(s1.AsSpan(), s2.AsSpan(), limit); - + /// /// Calculates the distance between two sequences of elements. /// /// This method uses a default maximum threshold for the distance calculation. For custom - /// thresholds, use an overload that accepts a threshold parameter. + /// thresholds, use an overload that accepts a threshold parameter. /// The type of elements in the sequences. Must implement . /// The first sequence to compare. /// The second sequence to compare. /// A representing the distance between the two sequences. The specific meaning of the - /// distance depends on the implementation of the comparison logic. + /// distance depends on the implementation of the comparison logic. public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable => Distance(s1, s2, int.MaxValue); - + /// /// Calculates the edit distance (Levenshtein distance) between two sequences, with an optional upper limit. /// From 670de6cbd46b88bc7dcea925f0af923d29401e5b Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:05:21 -0600 Subject: [PATCH 11/25] Fixed comment spelling error per copilot requirement. --- src/F23.StringSimilarity/QGram.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/F23.StringSimilarity/QGram.cs b/src/F23.StringSimilarity/QGram.cs index 78e5b58..42e1231 100644 --- a/src/F23.StringSimilarity/QGram.cs +++ b/src/F23.StringSimilarity/QGram.cs @@ -31,7 +31,7 @@ namespace F23.StringSimilarity /// /// Q-gram distance, as defined by Ukkonen in "Approximate string-matching with /// q-grams and maximal matches". The distance between two strings is defined as - /// the L1 norm of the difference of their profiles (the number of occurences of + /// the L1 norm of the difference of their profiles (the number of occurrences of /// each n-gram): SUM( |V1_i - V2_i| ). Q-gram distance is a lower bound on /// Levenshtein distance, but can be computed in O(m + n), where Levenshtein /// requires O(m.n). @@ -43,7 +43,7 @@ public class QGram : ShingleBased, IStringDistance /// string-matching with q-grams and maximal matches", /// http://www.sciencedirect.com/science/article/pii/0304397592901434 The /// distance between two strings is defined as the L1 norm of the difference - /// of their profiles (the number of occurences of each k-shingle). Q-gram + /// of their profiles (the number of occurrences of each k-shingle). Q-gram /// distance is a lower bound on Levenshtein distance, but can be computed in /// O(|A| + |B|), where Levenshtein requires O(|A|.|B|) /// From c2b0cbb2b14f7f3c2a6ef9dc8c5816edf530eb18 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:08:02 -0600 Subject: [PATCH 12/25] Fixed spacing/wrap issue in comment per copilot pr requirement. --- src/F23.StringSimilarity/MetricLCS.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/F23.StringSimilarity/MetricLCS.cs b/src/F23.StringSimilarity/MetricLCS.cs index d9a682d..a3d2a6d 100644 --- a/src/F23.StringSimilarity/MetricLCS.cs +++ b/src/F23.StringSimilarity/MetricLCS.cs @@ -43,13 +43,12 @@ public class MetricLCS : IMetricStringDistance, INormalizedStringDistance, IMetr /// If s1 or s2 is null. public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); - + /// /// Calculates the normalized distance between two sequences based on their longest common subsequence. /// /// The distance is calculated as: 1.0 - (Length of Longest Common Subsequence / - /// Maximum Length of the Two Sequences) This method is case-sensitive for sequences of strings or - /// characters. + /// Maximum Length of the Two Sequences) This method is case-sensitive for sequences of strings or characters. /// The type of elements in the sequences. Must implement . /// The first sequence to compare. Cannot be null. /// The second sequence to compare. Cannot be null. From 17d35f16177a7254137701bf2dec30b4198f375d Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:08:50 -0600 Subject: [PATCH 13/25] Moved xml comment to separate line per copilot pr requirement. --- src/F23.StringSimilarity/SorensenDice.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/F23.StringSimilarity/SorensenDice.cs b/src/F23.StringSimilarity/SorensenDice.cs index e24b79f..ebb9f08 100644 --- a/src/F23.StringSimilarity/SorensenDice.cs +++ b/src/F23.StringSimilarity/SorensenDice.cs @@ -29,7 +29,8 @@ // ReSharper disable LoopCanBeConvertedToQuery namespace F23.StringSimilarity -{ /// +{ + /// /// Similar to Jaccard index, but this time the similarity is computed as 2 * |V1 /// inter V2| / (|V1| + |V2|). Distance is computed as 1 - cosine similarity. /// @@ -89,7 +90,7 @@ public double Similarity(string s1, string s2) var union = new HashSet(); union.UnionWith(profile1.Keys); union.UnionWith(profile2.Keys); - + int inter = 0; foreach (var key in union) From b2de2f28889175292ee0cb0b512f0fffe475bbbe Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:15:07 -0600 Subject: [PATCH 14/25] Spacing issue resolved per copilot pr requirement. --- src/F23.StringSimilarity/NormalizedLevenshtein.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/F23.StringSimilarity/NormalizedLevenshtein.cs b/src/F23.StringSimilarity/NormalizedLevenshtein.cs index 631f307..c4fe278 100644 --- a/src/F23.StringSimilarity/NormalizedLevenshtein.cs +++ b/src/F23.StringSimilarity/NormalizedLevenshtein.cs @@ -46,12 +46,12 @@ public class NormalizedLevenshtein : INormalizedStringDistance, INormalizedStrin /// If s1 or s2 is null. public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); - + /// /// Calculates the normalized distance between two sequences of elements. /// /// The distance is normalized by the length of the longer sequence. This ensures the - /// result is always in the range [0.0, 1.0], where 0.0 indicates identical sequences and 1.0 indicates + /// result is always in the range [0.0, 1.0], where 0.0 indicates identical sequences and 1.0 indicates /// maximum dissimilarity. /// The type of elements in the sequences. Must implement . /// The first sequence to compare. Cannot be empty or null. @@ -96,7 +96,7 @@ public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) /// If s1 or s2 is null. public double Similarity(string s1, string s2) => 1.0 - Distance(s1, s2); - + /// /// Calculates the similarity between two sequences based on their distance. /// From 4bbe901acca2fef2181a2d90a8c7623390738a50 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:23:38 -0600 Subject: [PATCH 15/25] Fixed spacing/wrap issue per copilot pr requirement. --- src/F23.StringSimilarity/NormalizedLevenshtein.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/NormalizedLevenshtein.cs b/src/F23.StringSimilarity/NormalizedLevenshtein.cs index c4fe278..dd223be 100644 --- a/src/F23.StringSimilarity/NormalizedLevenshtein.cs +++ b/src/F23.StringSimilarity/NormalizedLevenshtein.cs @@ -51,7 +51,7 @@ public double Distance(string s1, string s2) /// Calculates the normalized distance between two sequences of elements. /// /// The distance is normalized by the length of the longer sequence. This ensures the - /// result is always in the range [0.0, 1.0], where 0.0 indicates identical sequences and 1.0 indicates + /// result is always in the range [0.0, 1.0], where 0.0 indicates identical sequences and 1.0 indicates /// maximum dissimilarity. /// The type of elements in the sequences. Must implement . /// The first sequence to compare. Cannot be empty or null. From 510d86436f4c5f52a02ffd2fe24a1a89db5f4a31 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:29:50 -0600 Subject: [PATCH 16/25] Added space extra space row for formatting. --- src/F23.StringSimilarity/LongestCommonSubsequence.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/F23.StringSimilarity/LongestCommonSubsequence.cs b/src/F23.StringSimilarity/LongestCommonSubsequence.cs index 8de8df3..df0cfa3 100644 --- a/src/F23.StringSimilarity/LongestCommonSubsequence.cs +++ b/src/F23.StringSimilarity/LongestCommonSubsequence.cs @@ -61,7 +61,7 @@ public class LongestCommonSubsequence : IStringDistance, ISpanDistance /// If s1 or s2 is null. public double Distance(string s1, string s2) => Distance(s1.AsSpan(), s2.AsSpan()); - + /// /// Calculates the distance between two sequences based on their similarity. /// @@ -104,7 +104,7 @@ public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) /// If s1 or s2 is null. public int Length(string s1, string s2) => Length(s1.AsSpan(), s2.AsSpan()); - + internal static int Length(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable { From 3025b076f5427ba5f4b3be92b4d4daf78936cd7c Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:30:51 -0600 Subject: [PATCH 17/25] Resolved spacing issues per copilot pr requirement. --- src/F23.StringSimilarity/JaroWinkler.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/F23.StringSimilarity/JaroWinkler.cs b/src/F23.StringSimilarity/JaroWinkler.cs index 4c5ba76..835c0fe 100644 --- a/src/F23.StringSimilarity/JaroWinkler.cs +++ b/src/F23.StringSimilarity/JaroWinkler.cs @@ -51,7 +51,7 @@ public class JaroWinkler : INormalizedStringSimilarity, INormalizedStringDistanc /// The current value of the threshold used for adding the Winkler bonus. The default value is 0.7. /// private double Threshold { get; } - + /// /// Creates a new instance with default threshold (0.7) /// @@ -59,7 +59,7 @@ public JaroWinkler() { Threshold = DEFAULT_THRESHOLD; } - + /// /// Creates a new instance with given threshold to determine when Winkler bonus should /// be used. Set threshold to a negative value to get the Jaro distance. @@ -79,7 +79,7 @@ public JaroWinkler(double threshold) /// If s1 or s2 is null. public double Similarity(string s1, string s2) => Similarity(s1.AsSpan(), s2.AsSpan()); - + /// /// Calculates the similarity between two sequences using the Jaro-Winkler distance metric. /// @@ -97,7 +97,7 @@ public double Similarity(ReadOnlySpan s1, ReadOnlySpan s2) { if (s1 == null) { - throw new ArgumentNullException(nameof(s1)); + throw new ArgumentNullException(nameof(s1)); } if (s2 == null) @@ -136,7 +136,7 @@ public double Similarity(ReadOnlySpan s1, ReadOnlySpan s2) /// If s1 or s2 is null. public double Distance(string s1, string s2) => 1.0 - Similarity(s1, s2); - + /// /// Calculates the distance between two sequences based on their similarity. /// @@ -145,7 +145,7 @@ public double Distance(string s1, string s2) /// The type of elements in the sequences. Must implement . /// The first sequence to compare. /// The second sequence to compare. - /// A double value representing the distance between the two sequences. The value ranges from 0.0 to 1.0, where + /// A double value representing the distance between the two sequences. The value ranges from 0.0 to 1.0, where /// 0.0 indicates identical sequences and 1.0 indicates completely dissimilar sequences. public double Distance(ReadOnlySpan s1, ReadOnlySpan s2) where T : IEquatable From 3d3f72f5b726de2f2612651e95e77c7b65b1fc2b Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 12:32:02 -0600 Subject: [PATCH 18/25] Resolved spacing issue per copilot pr requirement. --- src/F23.StringSimilarity/ShingleBased.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/ShingleBased.cs b/src/F23.StringSimilarity/ShingleBased.cs index 8cf847f..f389bd6 100644 --- a/src/F23.StringSimilarity/ShingleBased.cs +++ b/src/F23.StringSimilarity/ShingleBased.cs @@ -29,7 +29,7 @@ namespace F23.StringSimilarity { /// - /// Base class for shingle based algorithms. + /// Base class for shingle based algorithms. /// public abstract class ShingleBased { From 0089199afacc11e9f0b608957900f4079f29ebd5 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 19:39:55 -0600 Subject: [PATCH 19/25] Made grammar update per copilot pr requirement. --- src/F23.StringSimilarity/Interfaces/IStringDistance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/Interfaces/IStringDistance.cs b/src/F23.StringSimilarity/Interfaces/IStringDistance.cs index bcef7a4..b0f2a07 100644 --- a/src/F23.StringSimilarity/Interfaces/IStringDistance.cs +++ b/src/F23.StringSimilarity/Interfaces/IStringDistance.cs @@ -25,7 +25,7 @@ namespace F23.StringSimilarity.Interfaces { /// - /// Interface for string distance algorithms + /// Interface for string distance algorithms. /// public interface IStringDistance { From 02875ae2d56008e4f65e89c99ddd27274323a0ea Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 19:41:46 -0600 Subject: [PATCH 20/25] Made grammar update per copilot pr requirement. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs b/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs index f51fba6..fa21625 100644 --- a/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs +++ b/src/F23.StringSimilarity/Interfaces/IStringSimilarity.cs @@ -25,7 +25,7 @@ namespace F23.StringSimilarity.Interfaces { /// - /// Interface for string similarity algorithms + /// Interface for string similarity algorithms. /// public interface IStringSimilarity { From df041a26df6d817319283c246f8c6103591dfe41 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 19:42:13 -0600 Subject: [PATCH 21/25] Made grammar update per copilot pr requirement. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs b/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs index bf08a50..6bba222 100644 --- a/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs +++ b/src/F23.StringSimilarity/Interfaces/ISpanSimilarity.cs @@ -3,7 +3,7 @@ namespace F23.StringSimilarity.Interfaces { /// - /// Interface for span similarity algorithms + /// Interface for span similarity algorithms. /// public interface ISpanSimilarity { From e59d1dfa7cec3a44bcb27707e38b864fed22609d Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 19:42:46 -0600 Subject: [PATCH 22/25] Made grammar update per copilot pr requirement. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Interfaces/INormalizedStringSimilarity.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs b/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs index f4068b8..47ecebb 100644 --- a/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs +++ b/src/F23.StringSimilarity/Interfaces/INormalizedStringSimilarity.cs @@ -25,7 +25,7 @@ namespace F23.StringSimilarity.Interfaces { /// - /// Interface for normalized string similarity algorithms + /// Interface for normalized string similarity algorithms. /// public interface INormalizedStringSimilarity : IStringSimilarity { From 3dccf81d005963af4d81b20443ebb7ce2d568d8f Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 19:46:10 -0600 Subject: [PATCH 23/25] Parameters for method were previously overlooked in xml comments. Added. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/F23.StringSimilarity/Support/ArrayExtensions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/F23.StringSimilarity/Support/ArrayExtensions.cs b/src/F23.StringSimilarity/Support/ArrayExtensions.cs index 3b60dbb..84f0345 100644 --- a/src/F23.StringSimilarity/Support/ArrayExtensions.cs +++ b/src/F23.StringSimilarity/Support/ArrayExtensions.cs @@ -38,6 +38,10 @@ internal static class ArrayExtensions /// /// Creates a new array by padding the source array to the specified final length with the given padding value. /// + /// The source array to be padded. + /// The desired final length of the array after padding. Must be greater than or equal to the length of . + /// The value used to pad the array if it is shorter than . + /// A new array of length containing the elements of , followed by padding values if necessary. internal static T[] WithPadding(this T[] source, int finalLength, T paddingValue = default(T)) { if (finalLength < source.Length) From 91427a27d11b16f16a2842bb8473d22482e8f9da Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 19:48:18 -0600 Subject: [PATCH 24/25] Added parameters to method that were overlooked. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/F23.StringSimilarity/Support/ArrayExtensions.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/F23.StringSimilarity/Support/ArrayExtensions.cs b/src/F23.StringSimilarity/Support/ArrayExtensions.cs index 84f0345..b2814ea 100644 --- a/src/F23.StringSimilarity/Support/ArrayExtensions.cs +++ b/src/F23.StringSimilarity/Support/ArrayExtensions.cs @@ -42,6 +42,10 @@ internal static class ArrayExtensions /// The desired final length of the array after padding. Must be greater than or equal to the length of . /// The value used to pad the array if it is shorter than . /// A new array of length containing the elements of , followed by padding values if necessary. + /// The source array to be padded. + /// The desired final length of the array after padding. Must be greater than or equal to the length of . + /// The value used to pad the array if it is shorter than . + /// A new array of length containing the elements of , followed by padding values if necessary. internal static T[] WithPadding(this T[] source, int finalLength, T paddingValue = default(T)) { if (finalLength < source.Length) From 1c0dff0fdafebefa8f2330035410f7cda532c190 Mon Sep 17 00:00:00 2001 From: Jim Johnson Date: Wed, 14 Jan 2026 20:42:44 -0600 Subject: [PATCH 25/25] Applying missing period suggestion. Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../Interfaces/INormalizedStringDistance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs b/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs index 6a77cfe..25d3705 100644 --- a/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs +++ b/src/F23.StringSimilarity/Interfaces/INormalizedStringDistance.cs @@ -25,7 +25,7 @@ namespace F23.StringSimilarity.Interfaces { /// - /// Interface for normalized string distance algorithms + /// Interface for normalized string distance algorithms. /// public interface INormalizedStringDistance : IStringDistance {