public char match ( String str1 , String str2 ) { if ( null == str1 || null == str2 || 0 == str1 . length ( ) || 0 == str2 . length ( ) ) { return IMappingElement . IDK ; } float sim = 1 - ( float ) getLevenshteinDistance ( str1 , str2 ) / java . lang . Math . max ( str1 . length ( ) , str2 . length ( ) ) ; if ( threshold <= sim ) { return IMappingElement . EQUIVALENCE ; } else { return IMappingElement . IDK ; } }
Computes the relation with optimized edit distance matcher .