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

outdated

A collection of phonetic algorithms for Dart.

example/main.dart

/*
 * dart_phonetics is a collection of phonetics algorithms implemented in Dart.
 * Copyright (C) 2019 Raymond Cardillo (dba Cardillo's Creations)
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

import 'package:dart_phonetics/dart_phonetics.dart';

void _printResult(Object encoder, String input, String encoded) {
  print('${encoder.runtimeType.toString().padRight(20)}: $input => $encoded');
}

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

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

  final refinedSoundex = RefinedSoundex.usEnglishEncoder;
  _printResult(refinedSoundex, inputString, refinedSoundex.encode(inputString));
}
19
likes
0
points
1.06k
downloads

Publisher

verified publishercardilloonline.com

Weekly Downloads

A collection of phonetic algorithms for Dart.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

charcode

More

Packages that depend on dart_phonetics