@@ -0,0 +1,1537 @@
+package seedu.doist.model.util;%0A%0Aimport org.apache.commons.lang.StringUtils;%0A%0Apublic class StringMatchUtil %7B%0A%0A    /**%0A     * Method that uses third party library to compute%0A     * how close the 'target' string is to the 'query' string, alpha-numerically%0A     * @param target%0A     * @param query%0A     * @return integer between 0 to 1 representing the closeness, 1 being a full match%0A     */%0A    private static double nearMatch(String target, String query) %7B%0A        return org.apache.commons.lang3.StringUtils.getJaroWinklerDistance(target, query);%0A    %7D%0A%0A    /**%0A     * Method that returns 1 if 'query' contains 'target', 0 otherwise%0A     * @param target%0A     * @param query%0A     * @return an integer%0A     */%0A    private static double stringContain(String target, String query) %7B%0A        assert query != null;%0A        return StringUtils.containsIgnoreCase(target, query) ? 1.0 : 0.0;%0A    %7D%0A%0A    public static double matchValue(String target, String query) %7B%0A        return nearMatch(target, query) + stringContain(target, query);%0A    %7D%0A%0A    /**%0A     * Method that returns a boolean if 'target' and 'query' are close enough%0A     * alpha-numerically, using the threshold%0A     * @param target%0A     * @param query%0A     * @param threshold%0A     * @return true if they are close enough, else false%0A     */%0A    public static boolean isNearMatch(String target, String query, double threshold) %7B%0A        System.out.println(matchValue(target, query) + %22  --%22 + target + %22-- %22 + query);%0A        return threshold %3C matchValue(target, query);%0A    %7D%0A%7D%0A

Create new class to encapsulate all string matching heuristics