From eaccbcda0fc0705364cfc17277fe4ca3579fc2c2 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 16 Mar 2016 06:04:14 +1100 Subject: [PATCH] Fix bug in pos_tag.py script --- examples/pos_tag.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pos_tag.py b/examples/pos_tag.py index a118966b0..c61d29636 100644 --- a/examples/pos_tag.py +++ b/examples/pos_tag.py @@ -54,7 +54,7 @@ def represent_word(word): # Only do this if the lower-cased form is more probable. if text.istitle() \ 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() return text + '|' + word.tag_