Utility UDF for use with Apache Pig and Hadoop