Home All Groups
commons-codec / org / apache / commons / codec / language / MatchRatingApproachEncoder.html /

Class MatchRatingApproachEncoder

    • Constructor Detail

      • MatchRatingApproachEncoder

        public MatchRatingApproachEncoder()
    • Method Detail

      • encode

        public final Object encode(Object pObject)
                            throws EncoderException
        Encodes an Object using the Match Rating Approach algorithm. Method is here to satisfy the requirements of the Encoder interface Throws an EncoderException if input object is not of type java.lang.String.
        Specified by:
        encode in interface  Encoder
        pObject - Object to encode
        An object (or type java.lang.String) containing the Match Rating Approach code which corresponds to the String supplied.
        EncoderException - if the parameter supplied is not of type java.lang.String
      • encode

        public final String encode(String name)
        Encodes a String using the Match Rating Approach (MRA) algorithm.
        Specified by:
        encode in interface  StringEncoder
        name - String object to encode
        The MRA code corresponding to the String supplied
      • isEncodeEquals

        public boolean isEncodeEquals(String name1,
                             String name2)
        Determines if two names are homophonous via Match Rating Approach (MRA) algorithm. It should be noted that the strings are cleaned in the same way as encode(String).
        name1 - First of the 2 strings (names) to compare
        name2 - Second of the 2 names to compare
        true if the encodings are identical false otherwise.

Copyright © 2002–2013 The Apache Software Foundation. All rights reserved.