Python으로 배우는 NLP 피처 엔지니어링
Rounak Banik
Data Scientist
| review | label |
|---|---|
'The movie was good and not boring' |
positive |
'The movie was not good and boring' |
negative |
'for you a thousand times over'
[
'for you',
'you a',
'a thousand',
'thousand times',
'times over'
]
'for you a thousand times over'
[
'for you a',
'you a thousand',
'a thousand times',
'thousand times over'
]
바이그램만 생성.
bigrams = CountVectorizer(ngram_range=(2,2))
유니그램, 바이그램, 트라이그램 생성.
ngrams = CountVectorizer(ngram_range=(1,3))
Python으로 배우는 NLP 피처 엔지니어링