def test_issue595():
 words = [u'Do', u"n't", u'feed', u'the', u'dog']
 tag_map = {u'VB': {POS: VERB, u'morph': VerbForm_inf}}
 rules = {u'verb': [[u'ed', u'e']]}
 lemmatizer = Lemmatizer({u'verb': {}}, {u'verb': {}}, rules)
 vocab = Vocab(lemmatizer=lemmatizer, tag_map=tag_map)
 doc = get_doc(vocab, words)
 doc[2].tag_ = u'VB'
 assert (doc[2].text == u'feed')
 assert (doc[2].lemma_ == u'feed')

def test_issue595 ( ) : words = [ u'Do' , u"n't" , u'feed' , u'the' , u'dog' ] tag_map = { u'VB' : { POS : VERB , u'morph' : VerbForm_inf } } rules = { u'verb' : [ [ u'ed' , u'e' ] ] } lemmatizer = Lemmatizer ( { u'verb' : { } } , { u'verb' : { } } , rules ) vocab = Vocab ( lemmatizer = lemmatizer , tag_map = tag_map ) doc = get_doc ( vocab , words ) doc [ 2 ] . tag_ = u'VB' assert ( doc [ 2 ] . text == u'feed' ) assert ( doc [ 2 ] . lemma_ == u'feed' )
test lemmatization of base forms .