Typhon0 Typhon0 - 1 year ago 79
Python Question

tag word with NLTK stanford NER

I would like tag only a word and not a sentence with NLTK standford NER.


I have this output:

[[('o', 'O')], [('u', 'O')], [('r', 'O')]]

and I want

Answer Source

I believe problem is that you provide word as a string object not list. Probably you should pass it like stNER.tag([word]).

But it's only guess you should provide bigger context (imports, type of variable word)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download