parseArabic = function parseArabic(text) {
    text = text || "";
    var result = "";
    var i = 0;
    var j = 0;
    var position = 0;
    var currentLetter = "";
    var prevLetter = "";
    var nextLetter = "";
    var words = text.split("\\s+");
    var newWords = [];

    for (i = 0; i < words.length; i += 1) {
      newWords.push("");

      for (j = 0; j < words[i].length; j += 1) {
        currentLetter = words[i][j];
        prevLetter = words[i][j - 1];
        nextLetter = words[i][j + 1];

        if (isArabicLetter(currentLetter)) {
          position = getCorrectForm(currentLetter, prevLetter, nextLetter);

          if (position !== -1) {
            newWords[i] += String.fromCharCode(arabicSubstitionA[currentLetter.charCodeAt(0)][position]);
          } else {
            newWords[i] += currentLetter;
          }
        } else {
          newWords[i] += currentLetter;
        }
      }

      newWords[i] = resolveLigatures(newWords[i]);
    }

    result = newWords.join(" ");
    return result;
  }
@name processArabic
@function
@param {string} text
@returns {string}