Answers for "nltk"

5

install nltk in python

pip install nltk
Posted by: Guest on July-30-2020
1

nltk python

pip install nltk
import nltk
nltk.download()
Posted by: Guest on June-03-2021
0

nltk document

>>> import nltk
>>> sentence = """At eight o'clock on Thursday morning
... Arthur didn't feel very good."""
>>> tokens = nltk.word_tokenize(sentence)
>>> tokens
['At', 'eight', "o'clock", 'on', 'Thursday', 'morning',
'Arthur', 'did', "n't", 'feel', 'very', 'good', '.']
>>> tagged = nltk.pos_tag(tokens)
>>> tagged[0:6]
[('At', 'IN'), ('eight', 'CD'), ("o'clock", 'JJ'), ('on', 'IN'),
('Thursday', 'NNP'), ('morning', 'NN')]
Posted by: Guest on November-12-2020

Python Answers by Framework

Browse Popular Code Answers by Language