Fix bug in pos_tag.py script

This commit is contained in:
Matthew Honnibal 2016-03-16 06:04:14 +11:00
parent 8f870854c4
commit eaccbcda0f
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def represent_word(word):
# Only do this if the lower-cased form is more probable. # Only do this if the lower-cased form is more probable.
if text.istitle() \ if text.istitle() \
and is_sent_begin(word) \ and is_sent_begin(word) \
and word.prob < word.vocab[text.lower()].prob: and word.prob < word.doc.vocab[text.lower()].prob:
text = text.lower() text = text.lower()
return text + '|' + word.tag_ return text + '|' + word.tag_