Naver News Word Cloud is a program that crawls Naver news articles and converts them into word clouds.
You can download the executable (exe) file through this link: Download Naver News Word Cloud
- Download the exe file.
- Before running the program, make sure to install JDK.
- JDK can be downloaded from the following link: Java SE Downloads
- After installation, set the JAVA_HOME environment variable.
- For example:
- System Properties -> Advanced -> Environment Variables -> System variables Edit -> New:
- Name: JAVA_HOME
- Value: C:\Program Files\Java\jdk-19\bin
- System Properties -> Advanced -> Environment Variables -> System variables Edit -> Path:
- Add: C:\Program Files\Java\jdk-19\bin
- System Properties -> Advanced -> Environment Variables -> System variables Edit -> New:
- For example:
- Enjoy using the program!
- Install Python 3.10
- jpype only works with Python versions up to 3.10. Therefore, use Python 3.10.
- Python can be installed from the following link: Python Downloads
- Install JDK.
- JDK can be downloaded from the following link: Java SE Downloads
- and set Jave Home environment
- install requirements:
pip install bs4, requests, pandas, lxml, konlpy, Cython, JPype1
Note: To install konlpy and JPype1, you need to install JDK first. and Below are the libraries that need to be downloaded and installed separately.
wordcloud: download it manually from here and install it using below command
pip install folder_path\wordcloud-1.8.1-cp311-cp311-win_amd64.whl
- To convert .py files to .exe using pyinstaller:
pyinstaller --onefile --add-data="C:\\python311\\Lib\site-packages\\konlpy\\;.\konlpy" --add-data="C:\\python311\\Lib\site-packages\\konlpy\\java;.\\konlpy\\java" --add-data="C:\\python311\\Lib\site-packages\\konlpy\\tag\\*;.konlpy\\tag" --add-data="__init__.py;wordcloud" --add-data="__main__.py;wordcloud" --add-data="_version.py;wordcloud" --add-data="color_from_image.py;." --add-data="DroidSansMono.ttf;wordcloud" --add-data="query_integral_image.pyd;wordcloud" --add-data="stopwords;wordcloud" --add-data="tokenization.py;wordcloud" --add-data="wordcloud.py;wordcloud" --add-data="wordcloud_cli.py;wordcloud" naver_news_word_cloud.py
#λ€μ΄λ² λ΄μ€λ₯Ό ν¬λ‘€λ§ν ν μ΄λ₯Ό μλν΄λΌμ°λλ‘ λ³νν΄μ£Όλ νλ‘κ·Έλ¨μ λλ€ μ¬κΈ° λ§ν¬λ₯Ό ν΅ν΄ exe νμΌμ λ€μ΄λ°μ μ μμ΅λλ€.
κ°. exe νμΌμ λ€μ΄λ‘λ ν΄μ£ΌμΈμ.
λ. μ€ννκΈ° μ μ JDK λ₯Ό μ€μΉν΄μ£ΌμΈμ.
λ-1. JDK λ λ€μ λ§ν¬λ₯Ό ν΅ν΄ μ€μΉν μ μμ΅λλ€.
λ-2. μ€μΉ μλ£ ν νκ²½λ³μ μ€μ μ΄ νμν©λλ€
μλ₯Ό λ€μ΄,
μμ€ν μμ± - κ³ κΈ - νκ²½λ³μ -> μμ€ν λ³μ νΈμ§ -> μλ‘ λ§λ€κΈ° ->μ΄λ¦: JAVA_HOME λ³μ κ°: C:\Program Files\Java\jdk-19\bin
μμ€ν μμ± - κ³ κΈ - νκ²½λ³μ -> μμ€ν λ³μ νΈμ§ -> Path -> C:\Program Files\Java\jdk-19\bin
λ€. μ¦κΈ°μΈμ!
κ°. νμ΄μ¬ μ¬κΈ°μ μ€μΉ: jpype κ° νμ΄μ¬ 3.10 λ²μ κΉμ§μμλ§ μλνκΈ° λλ¬Έμ 3.10 λ²μ μ¬μ© νμ
κ°-1. νμ΄μ¬ μ€μΉλ² = customize installation -> pip, tcl/tk and IDLE, for all users 3κ° μ²΄ν¬ -> add python to environment variables μ²΄ν¬ -> locaton μ C:\python310\ μΌλ‘ νκ³ install μμ€ν μμ± - κ³ κΈ - νκ²½λ³μ -> μμ€ν λ³μ νΈμ§ -> Path -> C:\python311\ μ C:\python311\Scripts μΆκ°
λ. JDK μ¬κΈ°μ μ€μΉ νκ²½μ€μ λ νμΈμ μμ€ν μμ± - κ³ κΈ - νκ²½λ³μ -> μμ€ν λ³μ νΈμ§ -> μλ‘ λ§λ€κΈ° ->μ΄λ¦: JAVA_HOME λ³μ κ°: C:\Program Files\Java\jdk-19\bin μμ€ν μμ± - κ³ κΈ - νκ²½λ³μ -> μμ€ν λ³μ νΈμ§ -> Path -> C:\Program Files\Java\jdk-19\bin
λ€. cmd λ₯Ό μ€λ₯Έμͺ½ λ²νΌμ λλ¬μ κ΄λ¦¬μ κΆνμΌλ‘ μ€ν (execute cmd with administrative authority)
pip install bs4, requests, pandas
pip install lxml ==> λ§μ½ μλ¬κ° μκΈ΄λ€λ©΄ μ¬κΈ°μ λ€μ΄λ°κ³ pip install νμΌμμΉ\lxml-4.9.0-cp311-cp311-win_amd64.whl
pip install wordcloud ==> λ§μ½ μλ¬κ° μκΈ΄λ€λ©΄ μ¬κΈ°μ λ€μ΄λ°κ³ pip install νμΌμμΉ\wordcloud-1.8.1-cp311-cp311-win_amd64.whl
pip install konlpy ==> JDK κ° κΉλ € μμ΄μΌ μ€λ₯κ° λμ§ μμ΅λλ€.
- py νμΌμ pyinstaller λ‘ exe file λ‘ λ³κ²½νλ €κ³ νλ€λ©΄
κ°. konlpy μ wordcloud λ₯Ό --add-data ν΄μ£Όμ΄μΌ ν©λλ€. κ·Έλ μ§ μμΌλ©΄ stopword κ° μλ€κ±°λ konlpy μμ tag νμΌμ μ°Ύμ μ μλ€λ μ€λ₯κ° λμ¬ κ²μ λλ€.
κ°-1. konlpy μ wordcloud λ λ³΄ν΅ μ¬μ©μμ νμ΄μ¬ μ€μΉ μμΉμ lib ν΄λ μμ μμ΅λλ€.
κ°-2. μ λ μλμ κ°μ΄ μ λ ₯νμΌλ μ°Έκ³ ν΄μ£ΌμΈμ.
pyinstaller --onefile --add-data="C:\\python311\\Lib\site-packages\\konlpy\\;.\konlpy" --add-data="C:\\python311\\Lib\site-packages\\konlpy\\java;.\\konlpy\\java" --add-data="C:\\python311\\Lib\site-packages\\konlpy\\tag\\*;.konlpy\\tag" --add-data="__init__.py;wordcloud" --add-data="__main__.py;wordcloud" --add-data="_version.py;wordcloud" --add-data="color_from_image.py;." --add-data="DroidSansMono.ttf;wordcloud" --add-data="query_integral_image.pyd;wordcloud" --add-data="stopwords;wordcloud" --add-data="tokenization.py;wordcloud" --add-data="wordcloud.py;wordcloud" --add-data="wordcloud_cli.py;wordcloud" naver_news_word_cloud.py
λ. νμλ μλμ§λ§ μ€λ₯κ° κ³μλλ€λ©΄ JPype μ Cython μ€μΉλ₯Ό κ³ λ €νμΈμ. JPype λ μλ° νλ‘κ·Έλ¨(konlpy)μ μ€νμμΌμ£Όλ λͺ¨λ, Cython μ C κΈ°λ° νλ‘κ·Έλ¨μ μ€νμν¬ μ μκ² ν©λλ€.
pip install Cython, JPype1