Fixed bug: eg.guess is a tag id, rather than tag

This commit is contained in:
Yanhao 2016-11-15 14:11:22 +08:00
parent e0edc7c362
commit 762169da29

View File

@ -250,7 +250,7 @@ cdef class Tagger:
eg.c.features, eg.c.nr_feat) eg.c.features, eg.c.nr_feat)
self.model.updateC(&eg.c) self.model.updateC(&eg.c)
self.vocab.morphology.assign_tag(&tokens.c[i], eg.guess) self.vocab.morphology.assign_tag_id(&tokens.c[i], eg.guess)
correct += eg.cost == 0 correct += eg.cost == 0
self.freqs[TAG][tokens.c[i].tag] += 1 self.freqs[TAG][tokens.c[i].tag] += 1