Skip to content

Commit

Permalink
Improved arabic translit
Browse files Browse the repository at this point in the history
  • Loading branch information
hmlendea committed May 23, 2023
1 parent 13bef2b commit b393288
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public void SetUp()
[TestCase("دمشق", "Dimašq")]
[TestCase("روما", "Rūmā")]
[TestCase("عَسْقَلَان", "ʿAsqalān")]
[TestCase("فِلَسْطِينَ", "Filasṭīn")]
[TestCase("هرتسليا", "Hirtsiliyā")]
public void GivenATextInArabicScript_WhenTransliteratingIntoLatin_ThenTheCorrectTextIsReturned(
string arabicText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ string ApplyFixes(string text)
fixedText = Regex.Replace(fixedText, "bl", "bil");
fixedText = Regex.Replace(fixedText, "hṭ", "haṭ");
fixedText = Regex.Replace(fixedText, "īā", "iyā");
fixedText = Regex.Replace(fixedText, "īna ", "īn ");
fixedText = Regex.Replace(fixedText, "īna$", "īn");
fixedText = Regex.Replace(fixedText, "lnd", "land");
fixedText = Regex.Replace(fixedText, "lẗ", "laḧ");
fixedText = Regex.Replace(fixedText, "mš", "maš");
Expand Down

0 comments on commit b393288

Please sign in to comment.