Skip to content

Commit

Permalink
Merge pull request #28 from hmlendea/arabic
Browse files Browse the repository at this point in the history
Improved the `Arabic` transliteration
  • Loading branch information
hmlendea authored May 24, 2023
2 parents 5981315 + b393288 commit a85cec5
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 a85cec5

Please sign in to comment.