WordCloud is a Natural Language Processing.
As you can see in my last post, word cloud helps you understand a subject better.
2022.10.07 - [Jobs] - Junior developer job word cloud from indeed & LinkedIn
Junior developer job word cloud from indeed & LinkedIn
indeed From the most used, LinkedIn
www.agilemeadow.com
Configuration
1. Download JDK.
easypy_java 다운로드
easypy_java 다운로드
abit.ly
2. Download KoNLPy (Kkma, Okt, Komoran, Hannanum, Mecab) dependency package.
pip install jpype1
3. Download KoNLPy modules.
pip install konlpy
4. Download the word cloud module. Microsoft Visual C++(higher than version 14) has to be installed in advance to download word cloud.
pip install wordcloud
Now, it is all set, and we will use various functions to mine text.
open(): to open files
read(): to read files
sub(): to delete the letters that are not needed
As you can see, the words that are not essential are filtered.
nouns(): to extract nouns only
DataFrame(): to convert to the dataframe
len(): to get the the length of words
To save the result from len(), I created a count variable and saved them here.
To sort out the words and leave valid result only
groupby(): to group data
head(): to print out top n words by frequencies
barplot(): to create a bar graph
To create a word cloud, first set font.
dict(): to convert the data frame to dictionary
Import wordcloud.
Create worldcloud!
To create masks, import PIL and numpy first.
With them, you can customize the shape and color of the cloud.
'Python' 카테고리의 다른 글
Python) Crawling and Scraping2 (0) | 2022.12.10 |
---|---|
Python) Crawling and Scraping1 (0) | 2022.12.08 |
Python) Graphs (0) | 2022.12.04 |
Python) Data Analysis - pandas (0) | 2022.12.03 |
Python) functions for data analysis (0) | 2022.11.30 |