ruidan / Aspect-level-sentiment

Code and dataset for ACL2018 paper "Exploiting Document Knowledge for Aspect-level Sentiment Classification"
Apache License 2.0
148 stars 32 forks source link

Predicting output for new sentences with the new model #2

Open Arjunsankarlal opened 5 years ago

Arjunsankarlal commented 5 years ago

Hi, I tried retraining the model, it went on training and showed the loss during every epoch but at the end of the training it didn't save anything (Model or Word vector file), which I could use for further predictions. Also is there a way to use model and find the sentiment of the input sentence?

ruidan commented 5 years ago

The current code print the metrics and losses of train, dev, and test sets at the end of each epoch. If you want to test on other datasets , you need to save the model which the current code dose not support. But you can simply follow the instruction of saving models in Keras and add this part by yourself. Then you can reload the saved model, and use it to make predictions on new instances.

Arjunsankarlal commented 5 years ago

Thanks for the information @ruidan. Well how to predict the output of some sentence with the current pretrained model that is available?