{ "cells": [ { "cell_type": "markdown", "metadata": { "_uuid": "1099b04396475b6a0143fa303da9fa44ad87b660" }, "source": [ "# Custom negativity intent recognizer(사용자 맞춤 부정적인 의도 인식기)\n", "\n", "### [(원본)](https://github.com/aws-samples/amazon-comprehend-custom-entity/blob/master/3-AWS-Comprehend-Negative-Intent-Recognizer.ipynb)\n", "\n", "\n", "이 노트북은 우리가 word2vec 모델로 생성한 사용자정의 키워드를 활용하는 Amazon Comprehend의 Custom entities에 대해 학습 데이터셋을 준비하는 방법에 대해 다룹니다. \n", "\n", "우리는 \"frustrated\"와 의미상으로 유사한 키워드를 기반으로 Custom negativity intent recognizer(사용자 맞춤 부정적인 의도 인식기)를 구현할 것입니다.\n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "_cell_guid": "b1076dfc-b9ad-4769-8c92-a6c4dae69d19", "_kg_hide-input": true, "_kg_hide-output": true, "_uuid": "8f2839f25d086af736a60e9eeb907d3b93b6e0e5" }, "outputs": [], "source": [ "# library imports\n", "import re\n", "import numpy as np\n", "import pandas as pd\n", "import matplotlib\n", "import csv\n" ] }, { "cell_type": "markdown", "metadata": { "_uuid": "54e810d8b9c1936c8569093badabc4d7b25ea881" }, "source": [ "이 예제에서는 통신사 도메인을 위해 전처리와 필터링을 거쳤던, 이전 노트북에서 만들었던 데이터넷을 재사용할 것입니다. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "_uuid": "9365c16e4481ec49f5c084f7c3b0cf50dd55047f", "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "(32716, 1)\n" ] }, { "data": { "text/html": [ "
\n", " | text | \n", "
---|---|
0 | \n", "@sprintcare is the worst customer service | @1... | \n", "
1 | \n", "@sprintcare is the worst customer service | @1... | \n", "
2 | \n", "@sprintcare is the worst customer service | @1... | \n", "
3 | \n", "@115714 y’all lie about your “great” connectio... | \n", "
4 | \n", "@115714 whenever I contact customer support, t... | \n", "