Ingineria caracteristicilor pentru NLP în Python
Rounak Banik
Data Scientist
| recenzie | etichetă |
|---|---|
'The movie was good and not boring' |
pozitiv |
'The movie was not good and boring' |
negativ |
'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'
]
Generează doar bigramme.
bigrams = CountVectorizer(ngram_range=(2,2))
Generează unigramme, bigramme și trigramme.
ngrams = CountVectorizer(ngram_range=(1,3))
Ingineria caracteristicilor pentru NLP în Python