diff --git a/Service/Transliterators/TransliterateDotComTransliterator.cs b/Service/Transliterators/TransliterateDotComTransliterator.cs index dea7c45..5ee7c19 100644 --- a/Service/Transliterators/TransliterateDotComTransliterator.cs +++ b/Service/Transliterators/TransliterateDotComTransliterator.cs @@ -41,9 +41,10 @@ private string ApplyFixes(string text, string language) fixedText = Regex.Replace(fixedText, "ō̂", "ô"); fixedText = Regex.Replace(fixedText, "Ch", "Kh"); + fixedText = Regex.Replace(fixedText, "R([^\\s])", "Rh$1"); fixedText = Regex.Replace(fixedText, "ch", "kh"); - fixedText = Regex.Replace(fixedText, "rh", "r"); + fixedText = Regex.Replace(fixedText, "([^\\s])rh", "$1r"); fixedText = Regex.Replace(fixedText, "Mp", "V"); fixedText = Regex.Replace(fixedText, "Nk", "G"); @@ -59,6 +60,7 @@ private string ApplyFixes(string text, string language) fixedText = Regex.Replace(fixedText, "([Rr])(a|ṓ)", "$1h$2"); fixedText = Regex.Replace(fixedText, "([Rr])h([a])", "$1$2"); + fixedText = Regex.Replace(fixedText, "Agí(a|os)", "Hagí$1"); fixedText = Regex.Replace(fixedText, "polē$", "polis"); fixedText = Regex.Replace(fixedText, "polē ", "polis"); } diff --git a/Service/Transliterators/TranslitterationDotComTransliterator.cs b/Service/Transliterators/TranslitterationDotComTransliterator.cs index d3c600e..ecbc663 100644 --- a/Service/Transliterators/TranslitterationDotComTransliterator.cs +++ b/Service/Transliterators/TranslitterationDotComTransliterator.cs @@ -58,11 +58,17 @@ private string ApplyLanguageSpecificFixes(string text, string language) fixedText = Regex.Replace(fixedText, "ήr([iíί])$", "éri"); fixedText = Regex.Replace(fixedText, "([a-zA-Z])H", "$1h"); + + + fixedText = Regex.Replace(fixedText, "[Ά]", "Á"); + fixedText = Regex.Replace(fixedText, "[Έ]", "É"); + fixedText = Regex.Replace(fixedText, "[Ό]", "Ó"); + fixedText = Regex.Replace(fixedText, "ᾶ", "a"); fixedText = Regex.Replace(fixedText, "ά", "á"); fixedText = Regex.Replace(fixedText, "[έ]", "é"); fixedText = Regex.Replace(fixedText, "[ίή]", "í"); - fixedText = Regex.Replace(fixedText, "ώ", "ó"); + fixedText = Regex.Replace(fixedText, "[όώ]", "ó"); fixedText = Regex.Replace(fixedText, "ς", "s"); fixedText = Regex.Replace(fixedText, "ύ", "ú");