@Override
  public ObjectInspector initialize(ObjectInspector[] arguments) throws UDFArgumentException {
    if (arguments.length != 1) {
      throw new UDFArgumentLengthException(getFuncName() + " requires 1 argument, got "
          + arguments.length);
    }
    checkIfPrimitive(arguments, 0, "1st");

    checkIfStringGroup(arguments, 0, "1st");

    getStringConverter(arguments, 0, "1st");

    ObjectInspector outputOI = PrimitiveObjectInspectorFactory.writableStringObjectInspector;
    return outputOI;
  }
GenericUDFSoundex.

Soundex is an encoding used to relate similar names, but can also be used as
a general purpose scheme to find word with similar phonemes.
ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFSoundex.java