dart_phonetics 0.1.0-dev.5 copy "dart_phonetics: ^0.1.0-dev.5" to clipboard
dart_phonetics: ^0.1.0-dev.5 copied to clipboard

outdated

A collection of phonetic algorithms. These algorithms help find words or names that sound similar by generating an encoding that can be compared or indexed for fuzzy searching.

example/main.dart

import 'package:dart_phonetics/dart_phonetics.dart';

void _printResult(Object encoder, String input, PhoneticEncoding encoding) {
  print(
      '${encoder?.runtimeType?.toString()} - "$input"\n  primary = ${encoding?.primary}\n  alternate = ${encoding?.alternates}\n');
}

void main() {
  final inputString = 'Cardillo-Ashcroft';

  final soundex = Soundex.americanEncoder;
  _printResult(soundex, inputString, soundex.encode(inputString));

  final customSoundex = Soundex.fromMapping(Soundex.americanMapping,
      maxLength: null, paddingEnabled: false, ignoreHW: false);
  _printResult(customSoundex, inputString, customSoundex.encode(inputString));

  final refinedSoundex = RefinedSoundex.defaultEncoder;
  _printResult(refinedSoundex, inputString, refinedSoundex.encode(inputString));
}
19
likes
0
points
986
downloads

Publisher

verified publishercardilloonline.com

Weekly Downloads

A collection of phonetic algorithms. These algorithms help find words or names that sound similar by generating an encoding that can be compared or indexed for fuzzy searching.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

charcode

More

Packages that depend on dart_phonetics