Emma Lesac
Emma Lesac

Reputation: 37

Instruction for training model in Stanford Core NLP

I am a novice in the area of sentiment analysis, and I am very interested to learn about training models, could you please explain each of the instructions contained in the following command?

java -mx8g edu.stanford.nlp.sentiment.SentimentTraining -numHid 25 -trainPath train.txt -devPath dev.txt -train -model model.ser.gz

what is the function of: -numHid 25 -trainPath train.txt -devPath dev.txt -train -model model.ser.gz

Please could you help me?

Upvotes: 0

Views: 1300

Answers (1)

Jon Gauthier
Jon Gauthier

Reputation: 25572

The more complicated options are described in comments in these classes: RNNOptions, RNNTrainOptions.

The remainder of the options you listed are paths for reading / writing during training.

  • The -trainPath argument points to a labeled sentiment treebank. The trees in this data will be used to train the model parameters (also to seed the model vocabulary).
  • The -devPath argument points to a second labeled sentiment treebank. The trees in this data will be used to periodically evaluate the performance of the model. We won't train on this data; it will only be used to test how well the model generalizes to unseen data.
  • The -model argument specifies where to save the learned sentiment model.

Upvotes: 2

Related Questions