![]() : Natural language toolkit, known as nltk, is a library built for performing various Natural Language Processing (NLP) tasks.matplotlib: A visualization and plotting tool used extensively in Python.With the paragraph as input, we’ll pre-process it and send it to the wordcloud package.Īs mentioned above, we use the following libraries: ![]() The input to the program will be a paragraph copied from any website of your choice. Let’s now look at the code to generate word clouds. If you get an error related to stopwords or punkt package while running the code, run the following commands: NLTK Installation: On the basis of the installer used, you may or may not need to run the following commands. Use the command pip3 install numpy=1.19.3 For more information on the error, refer to this discussion. Note: If you get an error during installation, install the 1.19.3 version of numpy. To install the packages, we will use the following commands: Just replace wordcloud with the name of your choice. ![]() You may also use the name of your choice for the virtual environment. ![]() To use these packages, we must always activate the virtual environment named wordcloud before proceeding. After activating the virtual environment, we’ll be installing these packages locally in the virtual environment. We will be installing the following packages:Īctivate the virtual environment using the command, conda activate wordcloud. This will create a virtual environment with Python 3.6. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |