editDistanceMap method

Map<String, int> editDistanceMap(
  1. Iterable<String> terms
)

Returns a hashmap of terms to their editDistance with this.

Not case-sensitive.

Implementation

Map<String, int> editDistanceMap(Iterable<String> terms) {
  final retVal = <String, int>{};
  for (var other in terms) {
    retVal[other] = editDistance(other);
  }
  return retVal;
}