Implication of deep learning model on nlp tabular data?

Viewed 117

I have the tabular data. Some of the columns contain the text data. As you can see In the picture.enter image description here

After cleaning the text I converted text into matrixes and object data types into categories.

ids_list = ['arg_id','key_point_id']
for cont in ids_list:
    train_df[cont] = train_df[cont].astype('category')

Here I am using the tokenizer.

from transformers import RobertaTokenizer
tokenizer = RobertaTokenizer.from_pretrained("roberta-base")
train_df["argument"]=train_df["argument"].apply(lambda x:tokenizer(x)['input_ids'])
train_df["topic"]=train_df["topic"].apply(lambda x:tokenizer(x)['input_ids'])
train_df["key_point"]=train_df["key_point"].apply(lambda x:tokenizer(x).['input_ids'])

The final result after making tokens enter image description here After converting in trainX and trainY = label.

Here I am lost How to implement the lstm in here?.

I have seen many examples mostly they have one column other is target column. So I am confused here about how to adjust this data on lstm.

Here is the data if you want to look at it: link to data

0 Answers
Related