{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"# **Module Test**\n",
"작업에 필요한 모듈이 잘 설치되어 있는지 확인합니다"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"## **1 nltk, Konlpy**\n",
"언어모듈의 작동확인"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from konlpy.tag import Twitter\n",
"twitter = Twitter()\n",
"twitter.pos('파이썬 자연어 수업 입니다')"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from nltk.corpus import stopwords\n",
"stopwords.words('english')[:7]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"
\n",
"## **2 Word Cloud**\n",
"말구름 모듈 Text"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ! pip install ./data/wordcloud-1.5.0-cp36-cp36m-win_amd64.whl"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib inline\n",
"from wordcloud import WordCloud\n",
"wcloud = WordCloud('../data/D2Coding.ttf',\n",
" relative_scaling = 0.2,\n",
" background_color = 'white').generate('파이썬을 활용한 자연어 분석')\n",
"\n",
"import matplotlib.pyplot as plt\n",
"plt.figure(figsize=(12,12))\n",
"plt.imshow(wcloud, interpolation='bilinear')\n",
"plt.axis(\"off\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}