Skip to content

Commit

Permalink
fix: updated and verified author unittests
Browse files Browse the repository at this point in the history
  • Loading branch information
romanchyla committed Feb 19, 2022
1 parent ef5e932 commit 3be632e
Show file tree
Hide file tree
Showing 4 changed files with 1,247 additions and 943 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ public static ArrayList<String> getAsciiTransliteratedVariants(String a) {
synonyms.add(a);

// downgrade to ascii
synonyms.add(foldToAscii(a));
synonyms.add(normalizeAuthor(foldToAscii(a), true));

// work around unidecode not always doing what we want
String b = replaceUmlaut(a);
if (!b.equals(a)) {
synonyms.add(foldToAscii(b));
synonyms.add(normalizeAuthor(foldToAscii(b), true));
}

// handle russian name stuff
Expand All @@ -141,7 +141,7 @@ public static ArrayList<String> getAsciiTransliteratedVariants(String a) {
}

protected static String foldToAscii(String a) {
return normalizeAuthor(unidecode(a));
return unidecode(a);
}

private static String replaceUmlaut(String input) {
Expand Down

0 comments on commit 3be632e

Please sign in to comment.