Checks if the arabic word is vocalized.
    the word musn't  have any spaces and pounctuations.
    @param word: arabic unicode char
    @type word: unicode
    @return: if the word is vocalized
    @rtype:Boolean
339225
def is_vocalized(word):
    
    if word.isalpha():
        return False
    for char in word:
        if is_tashkeel(char):
            return True
    else:
        return False
87346
def add_word(self, word):
        
        word = word.lower()

        if not (word.isascii() and word.isalpha()):
            raise ValueError("Invalid character in word '{}'".format(word))

        word = word.encode(encoding="ascii")
        result = cgaddag.gdg_add_word(self.gdg, word)
        if result == 1:
            raise ValueError("Invalid character in word '{}'".format(word))
        elif result == 2:
            raise MemoryError("Out of memory, GADDAG is in an undefined state")
558350
def join(self, words):
        """"""
        chars = list(u"".join(words))
        start = True

        for i in xrange(len(chars)):
            char = chars[i]
            if char.isalpha():
                if start:
                    chars[i] = char.upper()
                else:
                    chars[i] = char.lower()

                start = False
            else:
                if i > 2 and chars[i - 1] in ".?!" and char.isspace():
                    start = True

        return u"".join(chars)
775823
def word(cap=False):
    
    syllables = []
    for x in range(random.randint(2,3)):
        syllables.append(_syllable())
    word = "".join(syllables)
    if cap: word = word[0].upper() + word[1:]
    return word
1192203
def encodeWord(self, word):
        
        encoded_word = word.encode(encoding=self.encoding, errors='strict')
        return Encoder.encodeLength(len(word)) + encoded_word
326948
public static boolean isAllChineseNum(String word)
    {// 百分之五点六的人早上八点十八分起床

        String chineseNum = "零○一二两三四五六七八九十廿百千万亿壹贰叁肆伍陆柒捌玖拾佰仟∶·．／点";//
        String prefix = "几数上第";
        String surfix = "几多余来成倍";
        boolean round = false;

        if (word == null)
            return false;

        char[] temp = word.toCharArray();
        for (int i = 0; i < temp.length; i++)
        {
            if (word.startsWith("分之", i))// 百分之五
            {
                i += 1;
                continue;
            }
            char tchar = temp[i];
            if (i == 0 && prefix.indexOf(tchar) != -1)
            {
                round = true;
            }
            else if (i == temp.length-1 && !round && surfix.indexOf(tchar) != -1)
            {
                round = true;
            }
            else if (chineseNum.indexOf(tchar) == -1)
                return false;
        }
        return true;
    }
921653
protected boolean isSurrogatePairCombination (String word) {
    if (word.length() > 1 && word.length() % 2 == 0 && word.codePointCount(0, word.length()) != word.length()) {
      // some symbols such as emojis (😂) have a string length that equals 2
      boolean isSurrogatePairCombination = true;
      for (int i = 0; i < word.length() && isSurrogatePairCombination; i += 2) {
        isSurrogatePairCombination &= Character.isSurrogatePair(word.charAt(i), word.charAt(i + 1));
      }
      return isSurrogatePairCombination;
    }
    return false;
  }
540077
private function hasValidEnEnding($word)
    {
        $lastLetter = Utf8::substr($word, -1, 1);
        if (in_array($lastLetter, self::$vowels)) {
            return false;
        }

        $threeLastLetters = Utf8::substr($word, -3, 3);
        if ($threeLastLetters == 'gem') {
            return false;
        }
        return true;
    }
55082
def transliterate(self, word):
    
    encoded_word = self.encoder(word)
    decoded_word = self.decoder(encoded_word)
    return decoded_word
53416
public String removeClitic(String word) {
    String result = word;
    int endInd = result.lastIndexOf(this.affix);
    return result.substring(0, endInd);
  }
766982
private function hasValidSEnding($word)
    {
        $lastLetter = Utf8::substr($word, -1, 1);
        if (in_array($lastLetter, array('b', 'c', 'd', 'f', 'g', 'h', 'j', 'l', 'm', 'n', 'o', 'p', 'r', 't', 'v', 'y', 'z'))) {
            return true;
        }
        if ($lastLetter == 'k') {
            $beforeLetter = Utf8::substr($word, -2, 1);
            if (!in_array($beforeLetter, self::$vowels)) {
                return true;
            }
        }
        return false;
    }
422113
def is_vowel(char):
	
	if is_letter(char, strict=True):
		return char in chart.vowels

	return False
874525
def word=(word)
      raise GameError, "word can't be blank" unless word.length > 0
      raise GameError, "word to guess can't have whitespaces. Use only one word." if word.match(/\s/)
      @word = word
    end
1020585
public synchronized boolean spell(String word) {
        requireValidHandle();
        if (!isValidInput(word)) {
            return false;
        }
        int spellResult = getLib().voikkoSpellCstr(handle, s2n(word));
        return (spellResult == Libvoikko.VOIKKO_SPELL_OK);
    }
828613
public static boolean isInSystemDic(String word) {
        Item item = DAT.getItem(word);
        return item != null && item.getStatus() > 1;
    }
562805
protected function allWordForms($word) 
    {
        $wordForms = array($word);
        
        $postfix1 = array('كم', 'كن', 'نا', 'ها', 'هم', 'هن');
        $postfix2 = array('ين', 'ون', 'ان', 'ات', 'وا');
        
        $len = mb_strlen($word);

        if (mb_substr($word, 0, 2) == 'ال') {
            $word = mb_substr($word, 2);
        }
        
        $wordForms[] = $word;

        $str1 = mb_substr($word, 0, -1);
        $str2 = mb_substr($word, 0, -2);
        $str3 = mb_substr($word, 0, -3);

        $last1 = mb_substr($word, -1);
        $last2 = mb_substr($word, -2);
        $last3 = mb_substr($word, -3);
        
        if ($len >= 6 && $last3 == 'تين') {
            $wordForms[] = $str3;
            $wordForms[] = $str3 . 'ة';
            $wordForms[] = $word . 'ة';
        }
        
        if ($len >= 6 && ($last3 == 'كما' || $last3 == 'هما')) {
            $wordForms[] = $str3;
            $wordForms[] = $str3 . 'كما';
            $wordForms[] = $str3 . 'هما';
        }

        if ($len >= 5 && in_array($last2, $postfix2)) {
            $wordForms[] = $str2;
            $wordForms[] = $str2.'ة';
            $wordForms[] = $str2.'تين';

            foreach ($postfix2 as $postfix) {
                $wordForms[] = $str2 . $postfix;
            }
        }

        if ($len >= 5 && in_array($last2, $postfix1)) {
            $wordForms[] = $str2;
            $wordForms[] = $str2.'ي';
            $wordForms[] = $str2.'ك';
            $wordForms[] = $str2.'كما';
            $wordForms[] = $str2.'هما';

            foreach ($postfix1 as $postfix) {
                $wordForms[] = $str2 . $postfix;
            }
        }

        if ($len >= 5 && $last2 == 'ية') {
            $wordForms[] = $str1;
            $wordForms[] = $str2;
        }

        if (($len >= 4 && ($last1 == 'ة' || $last1 == 'ه' || $last1 == 'ت')) 
            || ($len >= 5 && $last2 == 'ات')
        ) {
            $wordForms[] = $str1;
            $wordForms[] = $str1 . 'ة';
            $wordForms[] = $str1 . 'ه';
            $wordForms[] = $str1 . 'ت';
            $wordForms[] = $str1 . 'ات';
        }
        
        if ($len >= 4 && $last1 == 'ى') {
            $wordForms[] = $str1 . 'ا';
        }

        $trans = array('أ' => 'ا', 'إ' => 'ا', 'آ' => 'ا');
        foreach ($wordForms as $word) {
            $normWord = strtr($word, $trans);
            if ($normWord != $word) {
                $wordForms[] = $normWord;
            }
        }
        
        $wordForms = array_unique($wordForms);
        
        return $wordForms;
    }
429394
def has_english( word_in ):
    
    return not all_tamil(word_in) and len(word_in) > 0 and any([l in word_in for l in string.ascii_letters])