public static double similar(String strA, String strB) {
		String newStrA, newStrB;
		if (strA.length() < strB.length()) {
			newStrA = removeSign(strB);
			newStrB = removeSign(strA);
		} else {
			newStrA = removeSign(strA);
			newStrB = removeSign(strB);
		}
		// 用较大的字符串长度作为分母，相似子串作为分子计算出字串相似度
		int temp = Math.max(newStrA.length(), newStrB.length());
		int temp2 = longestCommonSubstring(newStrA, newStrB).length();
		return NumberUtil.div(temp2, temp);
	}
public static double similar ( String strA , String strB ) { String newStrA , newStrB ; if ( strA . length ( ) < strB . length ( ) ) { newStrA = removeSign ( strB ) ; newStrB = removeSign ( strA ) ; } else { newStrA = removeSign ( strA ) ; newStrB = removeSign ( strB ) ; } int temp = Math . max ( newStrA . length ( ) , newStrB . length ( ) ) ; int temp2 = longestCommonSubstring ( newStrA , newStrB ) . length ( ) ; return NumberUtil . div ( temp2 , temp ) ; }
计算相似度

@param strA 字符串1
@param strB 字符串2
@return 相似度