'Stem an English word and return the stemmed form.
:param word: The word that is stemmed.
:type word: str or unicode
:return: The stemmed form.
:rtype: unicode'

def stem(self, word):

    word = word.lower()
    if ((word in self.stopwords) or (len(word) <= 2)):
        return word
    elif (word in self.__special_words):
        return self.__special_words[word]
    word = word.replace(u'\u2019', u"'").replace(u'\u2018', u"'").replace(u'\u201b', u"'")
    if word.startswith(u"'"):
        word = word[1:]
    if word.startswith(u'y'):
        word = u''.join((u'Y', word[1:]))
    for i in range(1, len(word)):
        if ((word[(i - 1)] in self.__vowels) and (word[i] == u'y')):
            word = u''.join((word[:i], u'Y', word[(i + 1):]))
    step1a_vowel_found = False
    step1b_vowel_found = False
    r1 = u''
    r2 = u''
    if word.startswith((u'gener', u'commun', u'arsen')):
        if word.startswith((u'gener', u'arsen')):
            r1 = word[5:]
        else:
            r1 = word[6:]
        for i in range(1, len(r1)):
            if ((r1[i] not in self.__vowels) and (r1[(i - 1)] in self.__vowels)):
                r2 = r1[(i + 1):]
                break
    else:
        (r1, r2) = self._r1r2_standard(word, self.__vowels)
    for suffix in self.__step0_suffixes:
        if word.endswith(suffix):
            word = word[:(- len(suffix))]
            r1 = r1[:(- len(suffix))]
            r2 = r2[:(- len(suffix))]
            break
    for suffix in self.__step1a_suffixes:
        if word.endswith(suffix):
            if (suffix == u'sses'):
                word = word[:(-2)]
                r1 = r1[:(-2)]
                r2 = r2[:(-2)]
            elif (suffix in (u'ied', u'ies')):
                if (len(word[:(- len(suffix))]) > 1):
                    word = word[:(-2)]
                    r1 = r1[:(-2)]
                    r2 = r2[:(-2)]
                else:
                    word = word[:(-1)]
                    r1 = r1[:(-1)]
                    r2 = r2[:(-1)]
            elif (suffix == u's'):
                for letter in word[:(-2)]:
                    if (letter in self.__vowels):
                        step1a_vowel_found = True
                        break
                if step1a_vowel_found:
                    word = word[:(-1)]
                    r1 = r1[:(-1)]
                    r2 = r2[:(-1)]
            break
    for suffix in self.__step1b_suffixes:
        if word.endswith(suffix):
            if (suffix in (u'eed', u'eedly')):
                if r1.endswith(suffix):
                    word = suffix_replace(word, suffix, u'ee')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ee')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ee')
                    else:
                        r2 = u''
            else:
                for letter in word[:(- len(suffix))]:
                    if (letter in self.__vowels):
                        step1b_vowel_found = True
                        break
                if step1b_vowel_found:
                    word = word[:(- len(suffix))]
                    r1 = r1[:(- len(suffix))]
                    r2 = r2[:(- len(suffix))]
                    if word.endswith((u'at', u'bl', u'iz')):
                        word = u''.join((word, u'e'))
                        r1 = u''.join((r1, u'e'))
                        if ((len(word) > 5) or (len(r1) >= 3)):
                            r2 = u''.join((r2, u'e'))
                    elif word.endswith(self.__double_consonants):
                        word = word[:(-1)]
                        r1 = r1[:(-1)]
                        r2 = r2[:(-1)]
                    elif (((r1 == u'') and (len(word) >= 3) and (word[(-1)] not in self.__vowels) and (word[(-1)] not in u'wxY') and (word[(-2)] in self.__vowels) and (word[(-3)] not in self.__vowels)) or ((r1 == u'') and (len(word) == 2) and (word[0] in self.__vowels) and (word[1] not in self.__vowels))):
                        word = u''.join((word, u'e'))
                        if (len(r1) > 0):
                            r1 = u''.join((r1, u'e'))
                        if (len(r2) > 0):
                            r2 = u''.join((r2, u'e'))
            break
    if ((len(word) > 2) and (word[(-1)] in u'yY') and (word[(-2)] not in self.__vowels)):
        word = u''.join((word[:(-1)], u'i'))
        if (len(r1) >= 1):
            r1 = u''.join((r1[:(-1)], u'i'))
        else:
            r1 = u''
        if (len(r2) >= 1):
            r2 = u''.join((r2[:(-1)], u'i'))
        else:
            r2 = u''
    for suffix in self.__step2_suffixes:
        if word.endswith(suffix):
            if r1.endswith(suffix):
                if (suffix == u'tional'):
                    word = word[:(-2)]
                    r1 = r1[:(-2)]
                    r2 = r2[:(-2)]
                elif (suffix in (u'enci', u'anci', u'abli')):
                    word = u''.join((word[:(-1)], u'e'))
                    if (len(r1) >= 1):
                        r1 = u''.join((r1[:(-1)], u'e'))
                    else:
                        r1 = u''
                    if (len(r2) >= 1):
                        r2 = u''.join((r2[:(-1)], u'e'))
                    else:
                        r2 = u''
                elif (suffix == u'entli'):
                    word = word[:(-2)]
                    r1 = r1[:(-2)]
                    r2 = r2[:(-2)]
                elif (suffix in (u'izer', u'ization')):
                    word = suffix_replace(word, suffix, u'ize')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ize')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ize')
                    else:
                        r2 = u''
                elif (suffix in (u'ational', u'ation', u'ator')):
                    word = suffix_replace(word, suffix, u'ate')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ate')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ate')
                    else:
                        r2 = u'e'
                elif (suffix in (u'alism', u'aliti', u'alli')):
                    word = suffix_replace(word, suffix, u'al')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'al')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'al')
                    else:
                        r2 = u''
                elif (suffix == u'fulness'):
                    word = word[:(-4)]
                    r1 = r1[:(-4)]
                    r2 = r2[:(-4)]
                elif (suffix in (u'ousli', u'ousness')):
                    word = suffix_replace(word, suffix, u'ous')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ous')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ous')
                    else:
                        r2 = u''
                elif (suffix in (u'iveness', u'iviti')):
                    word = suffix_replace(word, suffix, u'ive')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ive')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ive')
                    else:
                        r2 = u'e'
                elif (suffix in (u'biliti', u'bli')):
                    word = suffix_replace(word, suffix, u'ble')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ble')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ble')
                    else:
                        r2 = u''
                elif ((suffix == u'ogi') and (word[(-4)] == u'l')):
                    word = word[:(-1)]
                    r1 = r1[:(-1)]
                    r2 = r2[:(-1)]
                elif (suffix in (u'fulli', u'lessli')):
                    word = word[:(-2)]
                    r1 = r1[:(-2)]
                    r2 = r2[:(-2)]
                elif ((suffix == u'li') and (word[(-3)] in self.__li_ending)):
                    word = word[:(-2)]
                    r1 = r1[:(-2)]
                    r2 = r2[:(-2)]
            break
    for suffix in self.__step3_suffixes:
        if word.endswith(suffix):
            if r1.endswith(suffix):
                if (suffix == u'tional'):
                    word = word[:(-2)]
                    r1 = r1[:(-2)]
                    r2 = r2[:(-2)]
                elif (suffix == u'ational'):
                    word = suffix_replace(word, suffix, u'ate')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ate')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ate')
                    else:
                        r2 = u''
                elif (suffix == u'alize'):
                    word = word[:(-3)]
                    r1 = r1[:(-3)]
                    r2 = r2[:(-3)]
                elif (suffix in (u'icate', u'iciti', u'ical')):
                    word = suffix_replace(word, suffix, u'ic')
                    if (len(r1) >= len(suffix)):
                        r1 = suffix_replace(r1, suffix, u'ic')
                    else:
                        r1 = u''
                    if (len(r2) >= len(suffix)):
                        r2 = suffix_replace(r2, suffix, u'ic')
                    else:
                        r2 = u''
                elif (suffix in (u'ful', u'ness')):
                    word = word[:(- len(suffix))]
                    r1 = r1[:(- len(suffix))]
                    r2 = r2[:(- len(suffix))]
                elif ((suffix == u'ative') and r2.endswith(suffix)):
                    word = word[:(-5)]
                    r1 = r1[:(-5)]
                    r2 = r2[:(-5)]
            break
    for suffix in self.__step4_suffixes:
        if word.endswith(suffix):
            if r2.endswith(suffix):
                if (suffix == u'ion'):
                    if (word[(-4)] in u'st'):
                        word = word[:(-3)]
                        r1 = r1[:(-3)]
                        r2 = r2[:(-3)]
                else:
                    word = word[:(- len(suffix))]
                    r1 = r1[:(- len(suffix))]
                    r2 = r2[:(- len(suffix))]
            break
    if (r2.endswith(u'l') and (word[(-2)] == u'l')):
        word = word[:(-1)]
    elif r2.endswith(u'e'):
        word = word[:(-1)]
    elif r1.endswith(u'e'):
        if ((len(word) >= 4) and ((word[(-2)] in self.__vowels) or (word[(-2)] in u'wxY') or (word[(-3)] not in self.__vowels) or (word[(-4)] in self.__vowels))):
            word = word[:(-1)]
    word = word.replace(u'Y', u'y')
    return word
