Metaphone.ecl 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*##############################################################################
  2. ## HPCC SYSTEMS software Copyright (C) 2015 HPCC Systems®. All rights reserved.
  3. ############################################################################## */
  4. EXPORT Metaphone := MODULE
  5. IMPORT lib_metaphone;
  6. /**
  7. * Returns the primary metaphone value
  8. *
  9. * @param src The string whose metphone is to be calculated.
  10. * @see http://en.wikipedia.org/wiki/Metaphone#Double_Metaphone
  11. */
  12. EXPORT String primary(STRING src) :=
  13. lib_metaphone.MetaphoneLib.DMetaphone1(src);
  14. /**
  15. * Returns the secondary metaphone value
  16. *
  17. * @param src The string whose metphone is to be calculated.
  18. * @see http://en.wikipedia.org/wiki/Metaphone#Double_Metaphone
  19. */
  20. EXPORT String secondary(STRING src) :=
  21. lib_metaphone.MetaphoneLib.DMetaphone2(src);
  22. /**
  23. * Returns the double metaphone value (primary and secondary concatenated
  24. *
  25. * @param src The string whose metphone is to be calculated.
  26. * @see http://en.wikipedia.org/wiki/Metaphone#Double_Metaphone
  27. */
  28. EXPORT String double(STRING src) :=
  29. lib_metaphone.MetaphoneLib.DMetaphoneBoth(src);
  30. END;