2017-03-02 155 views
0

我是新來的NLP和情緒分析領域特別。我的目標是培訓斯坦福CoreNLP情緒模型。我知道作爲培訓數據提供的句子應該採用以下格式。斯坦福corenlp情緒訓練集

(3 (2 (2 The) (2 Rock)) (4 (3 (2 is) (4 (2 destined) (2 (2 (2 (2 (2 to) (2 (2 be) (2 (2 the) (2 (2 21st) (2 (2 (2 Century) (2 's)) (2 (3 new) (2 (2 ``) (2 Conan)))))))) (2 '')) (2 and)) (3 (2 that) (3 (2 he) (3 (2 's) (3 (2 going) (3 (2 to) (4 (3 (2 make) (3 (3 (2 a) (3 splash)) (2 (2 even) (3 greater)))) (2 (2 than) (2 (2 (2 (2 (1 (2 Arnold) (2 Schwarzenegger)) (2 ,)) (2 (2 Jean-Claud) (2 (2 Van) (2 Damme)))) (2 or)) (2 (2 Steven) (2 Segal))))))))))))) (2 .))) 

我也知道我可以用我自己的訓練數據使用以下命令創建情感訓練模型。

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

我的問題是,我有權訪問用來訓練模型的訓練數據集嗎?如果是,那我可以在哪裏找到它? 另外,有沒有一種方法可以將新句子附加到原始訓練數據集並創建火車模型?

+0

參見[如何訓練斯坦福NLP情感分析工具(http://stackoverflow.com/questions/22586658/how-to-train-the-stanford-nlp-情感分析工具)。 –

回答

0

的數據,請訪問:http://nlp.stanford.edu/sentiment/

如果你只需要創建一個新的數據具有相同的格式,你可以把文件的目錄,並設置-trainPath到該目錄設置。它將加載該目錄中的所有文件並對其進行訓練。

樣本命令:

java -Xmx8g edu.stanford.nlp.sentiment.SentimentTraining -train -numHid 25 -trainPath trees/training-data/ -model model.ser.gz