2장 텍스트 전처리

2.1. 텍스트 전처리 방식

2.2. 토큰화

# 필요한 nltk 라이브러리를 다운로드
import nltk
nltk.download('punkt')
nltk.download('webtext')
nltk.download('wordnet')
nltk.download('stopwords')
nltk.download('averaged_perceptron_tagger')

2.3. 정규화

2.4. 품사 태깅

품사 설명
명사 이름을 나타내는 낱말
대명사 이름을 대신해 가리키는 낱말
수사 수량이나 순서를 가리키는 낱말
조사 도와주는 낱말
동사 움직임을 나타내는 낱말
형용사 상태나 성질을 나타내는 낱말
관형사 체언을 꾸며 주는 낱말
부사 주로 용언을 꾸며주는 낱말
감탄사 놀람, 느낌, 부름, 대답을 나타내는 낱말
태그
ADJ adjective new, good, high, special, big, local
ADP adposition on, of, at, with, by, into, under
ADV adverb really, already, still, early, now
CONJ conjunction and, or, but, if, while, although
DET determiner, article the, a, some, most, every, no, which
NOUN noun year, home, costs, time, Africa
NUM numberal twenty-four, fourth, 1991, 14:24
PRT particle at, on, out, over, per, that, up, with
PRON pronoun he, their, her, its, my, I, us
VERB verb is, say, told, given, playing, would
. punctuation marks .,;!
X other ersatz, esprit, dunno, gr8, univeristy