Class StringEncodings


  • public class StringEncodings
    extends Object
    A collection of functions for phonetic encoding of string values. Phonetic encoding represents words by how they are pronounced. This can be useful for comparing strings such as names, as variant spellings are encoded into the same form.

    All functions in this set will return a null value if the input string is null valued.

    • Constructor Detail

      • StringEncodings

        public StringEncodings()
    • Method Detail

      • caverphone

        public static ScalarValuedFunction caverphone​(String field)
        Builds a function phonetically encoding the string value in the specified field using the Caverphone algorithm.
        Parameters:
        field - the record field to encode
        Returns:
        the specified function
      • caverphone

        public static ScalarValuedFunction caverphone​(ScalarValuedFunction value)
        Builds a function phonetically encoding the string value to which the specified expression evaluates using the Caverphone algorithm.
        Parameters:
        value - a string expression to encode
        Returns:
        the specified function
      • metaphone

        public static ScalarValuedFunction metaphone​(String field)
        Builds a function phonetically encoding the string value in the specified field using the Metaphone algorithm.
        Parameters:
        field - the record field to encode
        Returns:
        the specified function
      • metaphone

        public static ScalarValuedFunction metaphone​(ScalarValuedFunction value)
        Builds a function phonetically encoding the string value to which the specified expression evaluates using the Metaphone algorithm.
        Parameters:
        value - a string expression to encode
        Returns:
        the specified function
      • doubleMetaphone

        public static ScalarValuedFunction doubleMetaphone​(String field)
        Builds a function phonetically encoding the string value in the specified field using the Double Metaphone algorithm.
        Parameters:
        field - the record field to encode
        Returns:
        the specified function
      • doubleMetaphone

        public static ScalarValuedFunction doubleMetaphone​(ScalarValuedFunction value)
        Builds a function phonetically encoding the string value to which the specified expression evaluates using the Double Metaphone algorithm.
        Parameters:
        value - a string expression to encode
        Returns:
        the specified function
      • soundex

        public static ScalarValuedFunction soundex​(String field)
        Builds a function phonetically encoding the string value in the specified field using the Soundex algorithm.
        Parameters:
        field - the record field to encode
        Returns:
        the specified function
      • soundex

        public static ScalarValuedFunction soundex​(ScalarValuedFunction value)
        Builds a function phonetically encoding the string value to which the specified expression evaluates using the Soundex algorithm.
        Parameters:
        value - a string expression to encode
        Returns:
        the specified function
      • refinedSoundex

        public static ScalarValuedFunction refinedSoundex​(String field)
        Builds a function phonetically encoding the string value in the specified field using the refined Soundex algorithm.
        Parameters:
        field - the record field to encode
        Returns:
        the specified function
      • refinedSoundex

        public static ScalarValuedFunction refinedSoundex​(ScalarValuedFunction value)
        Builds a function phonetically encoding the string value to which the specified expression evaluates using the refined Soundex algorithm.
        Parameters:
        value - a string expression to encode
        Returns:
        the specified function