def lemmatizer(word, pos):
    etri = getETRI(word)
    lemmas = etri[0]['WSD']
    lemma = word
    for i in lemmas:
        p = i['type']
        if ((pos == 'v') or (pos == 'VV')):
            if (p == 'VV'):
                lemma = i['text']
                break
        elif ((pos == 'n') or (pos == 'NN') or (pos == 'NNG') or (pos == 'NNP') or (pos == 'NNB') or (pos == 'NR') or (pos == 'NP')):
            if ('NN' in p):
                lemma = i['text']
                break
        elif ((pos == 'adj') or (pos == 'VA')):
            if (p == 'VA'):
                lemma = i['text']
                break
        else:
            pass
    return lemma
def lemmatizer(word, pos):
    etri = getETRI(word)
    lemmas = etri[0]['WSD']
    lemma = word
    for i in lemmas:
        p = i['type']
        if ((pos == 'v') or (pos == 'VV')):
            if (p == 'VV'):
                lemma = i['text']
                break
        elif ((pos == 'n') or (pos == 'NN') or (pos == 'NNG') or (pos == 'NNP') or (pos == 'NNB') or (pos == 'NR') or (pos == 'NP')):
            if ('NN' in p):
                lemma = i['text']
                break
        elif ((pos == 'adj') or (pos == 'VA')):
            if (p == 'VA'):
                lemma = i['text']
                break
        else:
            pass
    return lemma