def lemmatize(lemma_dict, word):
    """Lemmatize a word.

    Lemmatizes a word using a lemmatizer which is represented as a dict that
    has (word, lemma) as (key, value) pair. An example of a lemma list can be
    found in https://github.com/michmech/lemmatization-lists.

    If the word is not found in the dictionary, the lemma returned will be the
    word.

    :param lemma_dict: A dict (word, lemma)
    :type lemma_dict: Python dict
    :param word: The word to be lemmatized
    :type word: string
    :return: Lemmatized word
    :rtype: string
    """
    return lemma_dict.get(word, word)
