def case_sensitive(stem, word):
    ch = []
    for i in range(len(stem)):
        if word[i] == word[i].upper():
            ch.append(stem[i].upper())
        else:
            ch.append(stem[i])
    return "".join(ch)
Applies the letter case of the word to the stem:
dataset/ETHPy150Open clips/pattern/pattern/vector/stemmer.py/case_sensitive