def test_return_whole_when_base_noun(): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize('গাছ', pos=lem.POS_NOUN) == 'গাছ'
def test_dictionary_word(word): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize(word, pos=lem.POS_NOUN) == word
def test_lookup_table_used(inflected, lemmatized): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize(inflected, pos=lem.POS_NOUN) == lemmatized
def test_return_whole_when_proper_noun(): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize('গাগাগুগুপাপাপুপুরে', pos=lem.POS_PROPN) == 'গাগাগুগুপাপাপুপুরে'
def test_does_not_lemmatize_base_noun(base): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize(base, pos=lem.POS_NOUN) == base
def test_strips_plural_from_inflected_noun(inflected, lemmatized): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize(inflected, pos=lem.POS_NOUN) == lemmatized
def test_pos_pronoun_replaced_with_placeholder(pronoun): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize(pronoun, pos=lem.POS_PRON) == '-PRON-'
def test_enlisted_pronoun_without_pos_replaced_with_placeholder(pronoun): lemmatizer = BengaliLemmatizer() assert lemmatizer.lemmatize(pronoun) == '-PRON-'