'Stem a Dutch 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):
        return word
    step2_success = False
    word = word.replace(u'\xe4', u'a').replace(u'\xe1', u'a').replace(u'\xeb', u'e').replace(u'\xe9', u'e').replace(u'\xed', u'i').replace(u'\xef', u'i').replace(u'\xf6', u'o').replace(u'\xf3', u'o').replace(u'\xfc', u'u').replace(u'\xfa', u'u')
    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):]))
    for i in range(1, (len(word) - 1)):
        if ((word[(i - 1)] in self.__vowels) and (word[i] == u'i') and (word[(i + 1)] in self.__vowels)):
            word = u''.join((word[:i], u'I', word[(i + 1):]))
    (r1, r2) = self._r1r2_standard(word, self.__vowels)
    for i in range(1, len(word)):
        if ((word[i] not in self.__vowels) and (word[(i - 1)] in self.__vowels)):
            if ((len(word[:(i + 1)]) < 3) and (len(word[:(i + 1)]) > 0)):
                r1 = word[3:]
            elif (len(word[:(i + 1)]) == 0):
                return word
            break
    for suffix in self.__step1_suffixes:
        if r1.endswith(suffix):
            if (suffix == u'heden'):
                word = suffix_replace(word, suffix, u'heid')
                r1 = suffix_replace(r1, suffix, u'heid')
                if r2.endswith(u'heden'):
                    r2 = suffix_replace(r2, suffix, u'heid')
            elif ((suffix in (u'ene', u'en')) and (not word.endswith(u'heden')) and (word[((- len(suffix)) - 1)] not in self.__vowels) and (word[((- len(suffix)) - 3):(- len(suffix))] != u'gem')):
                word = word[:(- len(suffix))]
                r1 = r1[:(- len(suffix))]
                r2 = r2[:(- len(suffix))]
                if word.endswith((u'kk', u'dd', u'tt')):
                    word = word[:(-1)]
                    r1 = r1[:(-1)]
                    r2 = r2[:(-1)]
            elif ((suffix in (u'se', u's')) and (word[((- len(suffix)) - 1)] not in self.__vowels) and (word[((- len(suffix)) - 1)] != u'j')):
                word = word[:(- len(suffix))]
                r1 = r1[:(- len(suffix))]
                r2 = r2[:(- len(suffix))]
            break
    if (r1.endswith(u'e') and (word[(-2)] not in self.__vowels)):
        step2_success = True
        word = word[:(-1)]
        r1 = r1[:(-1)]
        r2 = r2[:(-1)]
        if word.endswith((u'kk', u'dd', u'tt')):
            word = word[:(-1)]
            r1 = r1[:(-1)]
            r2 = r2[:(-1)]
    if (r2.endswith(u'heid') and (word[(-5)] != u'c')):
        word = word[:(-4)]
        r1 = r1[:(-4)]
        r2 = r2[:(-4)]
        if (r1.endswith(u'en') and (word[(-3)] not in self.__vowels) and (word[(-5):(-2)] != u'gem')):
            word = word[:(-2)]
            r1 = r1[:(-2)]
            r2 = r2[:(-2)]
            if word.endswith((u'kk', u'dd', u'tt')):
                word = word[:(-1)]
                r1 = r1[:(-1)]
                r2 = r2[:(-1)]
    for suffix in self.__step3b_suffixes:
        if r2.endswith(suffix):
            if (suffix in (u'end', u'ing')):
                word = word[:(-3)]
                r2 = r2[:(-3)]
                if (r2.endswith(u'ig') and (word[(-3)] != u'e')):
                    word = word[:(-2)]
                elif word.endswith((u'kk', u'dd', u'tt')):
                    word = word[:(-1)]
            elif ((suffix == u'ig') and (word[(-3)] != u'e')):
                word = word[:(-2)]
            elif (suffix == u'lijk'):
                word = word[:(-4)]
                r1 = r1[:(-4)]
                if (r1.endswith(u'e') and (word[(-2)] not in self.__vowels)):
                    word = word[:(-1)]
                    if word.endswith((u'kk', u'dd', u'tt')):
                        word = word[:(-1)]
            elif (suffix == u'baar'):
                word = word[:(-4)]
            elif ((suffix == u'bar') and step2_success):
                word = word[:(-3)]
            break
    if (len(word) >= 4):
        if ((word[(-1)] not in self.__vowels) and (word[(-1)] != u'I')):
            if (word[(-3):(-1)] in (u'aa', u'ee', u'oo', u'uu')):
                if (word[(-4)] not in self.__vowels):
                    word = u''.join((word[:(-3)], word[(-3)], word[(-1)]))
    word = word.replace(u'I', u'i').replace(u'Y', u'y')
    return word
