Installing NLTK in Windows
Installing NLTK in Windows
In this part, we will learn that how to make setup NLTK via terminal (Command
prompt in windows).
The instruction given below are based on the assumption that you don’t have
python installed. So, first step is to install python.
Note: If you don’t want to download the latest version, you can visit the download
tab and see all releases.
Step 2) Click on the Downloaded File
import nltk
Step 2)
import nltk
nltk.download ()
Code Explanation:
1. In this program, the objective was to remove all type of punctuations from
given text. We imported “RegexpTokenizer” which is a module of NLTK. It
removes all the expression, symbol, character, numeric or any things
whatever you want.
2. You just have passed the regular Expression to the “RegexpTokenizer”
module.
3. Further, we tokenized the word using “tokenize” module. The output is
stored in the “filterdText” variable.
4. And printed them using “print().”