FirstNameStandardize { public String replaceNameWithCountryGenderInfo(String inputName, String inputCountry, String inputGender, boolean fuzzyQuery) throws IOException { Map<String, String> indexFields = new HashMap<String, String>(); indexFields.put("country", inputCountry); indexFields.put("gender", inputGender); ScoreDoc[] results = standardize(inputName, indexFields, fuzzyQuery); return getFinalAccurateResult(inputName, results); } @Deprecated  FirstNameStandardize(IndexSearcher indexSearcher, Analyzer analyzer, int hitsPerPage);  FirstNameStandardize(IndexSearcher indexSearcher); @Deprecated void getFuzzySearch(String input, TopDocsCollector<?> collector); ScoreDoc[] standardize(String inputName, Map<String, String> information2value, boolean fuzzySearch); String replaceName(String inputName, boolean fuzzyQuery); String replaceNameWithCountryGenderInfo(String inputName, String inputCountry, String inputGender,
            boolean fuzzyQuery); String replaceNameWithCountryInfo(String inputName, String inputCountry, boolean fuzzyQuery); String replaceNameWithGenderInfo(String inputName, String inputGender, boolean fuzzyQuery); void setMaxEdits(int maxEdits); @Deprecated
    static final boolean SORT_WITH_COUNT; }
@Test public void testReplaceNameWithCountryGenderInfo() { try { System.out.println("\ntestReplaceNameWithCountryGenderInfo:"); System.out.println("Name\tCountry\tNon-gender\tFemale\tMale"); for (String[] testCase : expected) { String res, resF, resM = ""; System.out.print("{\"" + testCase[0] + "\", \"" + testCase[1] + "\", \""); res = fnameStandardize.replaceNameWithCountryInfo(testCase[0], testCase[1], true); System.out.print(res + "\", \""); assertEquals(testCase[2], res); resF = fnameStandardize.replaceNameWithCountryGenderInfo(testCase[0], testCase[1], "F", true); System.out.print(resF + "\", \""); assertEquals(testCase[3], resF); resM = fnameStandardize.replaceNameWithCountryGenderInfo(testCase[0], testCase[1], "M", true); System.out.println(resM + "\"}, assertEquals(testCase[4], resM); } } catch (IOException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } }