{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "

\n", "# **Konlpy**\n", "한글모듈\n", "\n", "## **1 Tagging**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from konlpy.tag import Twitter\n", "twitter = Twitter()\n", "twitter.pos('서울R&D캠퍼스 수업자료')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

\n", "## **2 Stemming**" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "text = \"워런 버핏은 삼성전자가 아닌 애플주식을 왜 샀을까\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%time\n", "print(twitter.pos(text, stem= =Quiz= ))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%time\n", "print(twitter.pos(text))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

\n", "## **3 꼬꼬마, 한나눔**\n", "개별 모듈에 따라 다른결과를 출력" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%time\n", "from konlpy.tag import Kkma\n", "kkma = Kkma()\n", "print(kkma.pos(text))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%time\n", "from konlpy.tag import Hannanum\n", "han = Hannanum()\n", "print(han.pos(text))" ] } ], "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 }