NLP Features with tf-idf error
Budget: $8 – $15 USD
I have a code that wont run the features with the tf idf because it says :
zero-dimensional arrays cannot be concatenated
from sklearn.feature_extraction.text import CountVectorizer
bow_vectorizer = CountVectorizer(max_df=0.90, min_df=2, max_features=1000, stop_words='english')
bow = bow_vectorizer.fit_transform(Features['Tweet'])
bow
Feature = Features.to_numpy()
print(type(Feature))
import numpy as np
D = np.concatenate([tfidf_vectorizer,Feature])
zero-dimensional arrays cannot be concatenated
from sklearn.feature_extraction.text import CountVectorizer
bow_vectorizer = CountVectorizer(max_df=0.90, min_df=2, max_features=1000, stop_words='english')
bow = bow_vectorizer.fit_transform(Features['Tweet'])
bow
Feature = Features.to_numpy()
print(type(Feature))
import numpy as np
D = np.concatenate([tfidf_vectorizer,Feature])