Exemple #1
0
def test_return_whole_when_base_noun():
    lemmatizer = BengaliLemmatizer()
    assert lemmatizer.lemmatize('গাছ', pos=lem.POS_NOUN) == 'গাছ'
Exemple #2
0
def test_dictionary_word(word):
    lemmatizer = BengaliLemmatizer()
    assert lemmatizer.lemmatize(word, pos=lem.POS_NOUN) == word
Exemple #3
0
def test_lookup_table_used(inflected, lemmatized):
    lemmatizer = BengaliLemmatizer()
    assert lemmatizer.lemmatize(inflected, pos=lem.POS_NOUN) == lemmatized
Exemple #4
0
def test_return_whole_when_proper_noun():
    lemmatizer = BengaliLemmatizer()
    assert lemmatizer.lemmatize('গাগাগুগুপাপাপুপুরে', pos=lem.POS_PROPN) == 'গাগাগুগুপাপাপুপুরে'
Exemple #5
0
def test_does_not_lemmatize_base_noun(base):
    lemmatizer = BengaliLemmatizer()
    assert lemmatizer.lemmatize(base, pos=lem.POS_NOUN) == base
Exemple #6
0
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-'