I am using the stackoverflow tab classification csv dataset, which I have loaded into a dataframe:
X = df.post
y = df.tags
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state = 42)
In addition to some other classification models, I would also like to run BERT, however, it requires a variable preproc. I am unsure which function will get that:
import ktrain
from ktrain import text
model = text.text_classifier('bert', (x_train, y_train), preproc=preproc)
learner = ktrain.get_learner(model,train_data=(x_train, y_train), val_data=(x_test, y_test), batch_size=6)
In some documentation I see people use text.texts_from_folder(), but I have everything in a dataframe already. Is there another function in text. that woud help me get preproc?