Feature Engineering for NLP in Python
Rounak Banik
Data Scientist
| รีวิว | ป้ายกำกับ |
|---|---|
'The movie was good and not boring' |
เชิงบวก |
'The movie was not good and boring' |
เชิงลบ |
'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'
]
สร้างเฉพาะ bigram
bigrams = CountVectorizer(ngram_range=(2,2))
สร้าง unigram, bigram และ trigram
ngrams = CountVectorizer(ngram_range=(1,3))
Feature Engineering for NLP in Python