mirror of https://github.com/explosion/spaCy.git
Fix bug in pos_tag.py script
This commit is contained in:
parent
8f870854c4
commit
eaccbcda0f
|
@ -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_
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue