Cynwell / Text-Level-GNN

Text Level Graph Neural Network for Text Classification
Apache License 2.0
46 stars 13 forks source link

How to get the classification of new data #2

Open suhas-bn-1412 opened 3 years ago

suhas-bn-1412 commented 3 years ago

If I have to classify a new data, how to do it? How to used trained model to classify a new data. I'm kinda new to neural networks. Please help

Cynwell commented 3 years ago

Hi suhas-bn-1412, if you are new to programming in Python, you can consider modifying the dataset file to be in the format of .txt or .csv or any other tabular formats.

The format of each line in the text file should be like this, [class label] [separator] [text data]. "\t" (tab), ",", ", " are commonly used separators. Just to make sure pd.read_csv() can understand your separator. If you are opening with a text editor eg Notepad++, it will look like this: image

If you are opening with Excel, it will look like this: image

And if you have sufficient programming knowledge, you can consider modifying the class TextLevelGNNDatasetClass a little bit for your own use.

Hope this helps!