public class ReadSentimentDataset extends Object
Modifier and Type | Method and Description |
---|---|
static Tree |
convertTree(List<Integer> parentPointers,
List<String> sentence,
Map<List<String>,Integer> phraseIds,
Map<Integer,Double> sentimentScores,
PTBEscapingProcessor escaper) |
static void |
main(String[] args)
This program converts the format of the Sentiment data set
prepared by Richard, Jean, etc.
|
public static Tree convertTree(List<Integer> parentPointers, List<String> sentence, Map<List<String>,Integer> phraseIds, Map<Integer,Double> sentimentScores, PTBEscapingProcessor escaper)
public static void main(String[] args)
java edu.stanford.nlp.sentiment.ReadSentimentDataset -dictionary stanfordSentimentTreebank/dictionary.txt -sentiment stanfordSentimentTreebank/sentiment_labels.txt -tokens stanfordSentimentTreebank/SOStr.txt -parse stanfordSentimentTreebank/STree.txt -split stanfordSentimentTreebank/datasetSplit.txt -train train.txt -dev dev.txt -test test.txt
-dictionary
, -sentiment
,
-tokens
, -parse
, -split
Path to the corresponding files from the dataset -train
, -dev
, -test
Paths for saving the corresponding output files java edu.stanford.nlp.sentiment.ReadSentimentDataset -inputDir ../data/sentiment/stanfordSentimentTreebank -outputDir .