I\'m hoping someone has experience with this as I\'m unable to find any comments online besides a bug report from 2015 regarding the NERtagger which is probably the same.
<Another variation of what alvas said, which worked for me: tagger.tag_sents([[text]])
.
The tag_sents
function takes a list of list of strings.
tagger.tag_sents(word_tokenize("The quick brown fox jumps over the lazy dog."))
Here's a useful idiom:
tagger.tag_sents(word_tokenize(sent) for sent in sent_tokenize(text))
where text
is a string.