% pythonOh! its say work as NOUN!
>>> import nltk
>>> nltk.pos_tag(["work"])
[('work', 'NN')]
Yeah, single verb can be use as noun. we need to pass the the whole sentence to check it
we have english sample like "he works for a company"
>>> nltk.pos_tag("he works for a company".split())
[('he', 'PRP'), ('works', 'VBZ'), ('for', 'IN'), ('a', 'DT'), ('company', 'NN')]
wow :-) its show "works" as VBZ, it is verb, great. huh!
so search, "work" in nltk results again. and can get very accurate POS :-)
work = VBZ for that case :-)
#but unfortunately its take time around 100ms to 1s, its slow for me, but no way. have to use that.
cheers,
soe min
No comments:
Post a Comment