{ "cells": [ { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "Lg8oHBAuVnhM" }, "source": [ "# **Chapter 1 자연어 다루기**\n", "## **Token:** 어휘 추출하기" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 2037 }, "colab_type": "code", "id": "zfiQShZIVnhO", "outputId": "7191f933-39e9-4360-8777-35f1b4be6689" }, "outputs": [], "source": [ "! apt-get update\n", "! apt-get install g++ openjdk-8-jdk \n", "! pip3 install nltk konlpy\n", "\n", "import nltk\n", "nltk.download('punkt')\n", "nltk.download('tagsets')\n", "nltk.download('averaged_perceptron_tagger')\n", "text_eng = \" Don't hesitate to ask questions\"\n", "text_kor = \"\"\"삼성 갤럭시(GalaxyNote)노트의 신형을 홍보 합니다. \n", "홍보:유관순 031-478-2311 010-8888-9999.\n", "삼성 페이지 https://www.samsung.com/sec/index.html\"\"\"" ] } ], "metadata": { "colab": { "collapsed_sections": [], "name": "01-Token.ipynb", "provenance": [], "version": "0.3.2" }, "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.8" } }, "nbformat": 4, "nbformat_minor": 4 }