Classification: how to handle reviews/long english words in feature set with all other numerical features I am currently working on an use case where feature set contains numeric values such as amount, as well as a review feature which contains long winded english text.
the english text will very well differ between train and test data.
eg 'i have seen and its good' , 'nto ok','timepass',etc

how do i combine the text feature set with numerical data and feed it to a machine learning model?

i will nt be able to use encoding , these text variables are not categorical values . they are varying .

import pandas as panda
from sklearn.feature_extraction.text import TfidfVectorizer

words = ['i hv paid','i dont like','its good','yum yum']

a = panda.DataFrame({'amount':[10,20,30,40],'word':words})

tf = TfidfVectorizer()

csr = tf.fit_transform(words)

#how do i now use my csr to feed both amount and word to my machine learning model
One of the ways to address your use case could be to create 2 separate models, one model using your text data features and another one using your numerical features and combine their results using ensembling.

The other way could be to create numeric features out of your text features (e.g. tf-idf, word2vec) and combine them with your numeric features and feed them to your model.

Sample code-

from sklearn.feature_extraction.text import TfidfVectorizer
import numpy as np
import pandas as pd

words = ['i hv paid','i dont like','its good','yum yum']
tf = TfidfVectorizer()
vector = tf.fit_transform(words)
df = pd.DataFrame([10,20,30,40])
df2 = pd.DataFrame(vector.toarray())
pd.concat([df,df2], axis=1)


Sample output-