webis-de / ECIR-2015-and-SEMEVAL-2015

The experiment software underlying two papers published at ECIR-2015 and SEMEVAL-2015.
http://webis.de/publications
37 stars 17 forks source link

how to run this program? #1

Open wangyizhen opened 9 years ago

wangyizhen commented 9 years ago

how to run this program?

potthast commented 9 years ago

The main methods are found in SentimentECIR.java and SentimentSemEval.java.

CrowKing001 commented 7 years ago

Here's the documentation I added to the source file to keep things straight when I ran it.

/*
 * Command line structure
 * 
 *  <mode>      Mode to run in. Training mode processes the tweets for features
 *              and places the rusults in an arff file. Evalulation mode takes
 *              the arff file as input, trains the model and processes the test
 *              tweets.
 *                  eval        Run in evaluation mode for just one model
 *                  evalAll     Run in evaluation mode for all models
 *                  train       Run in train mode for just one model
 *                  trainAll    Run in train mode for all models
 *  <twitter>   Twitter file name without extension (variable for this is called PATH in code).
 * -on <name>   Name of output file (partial - see notes)
 * -tf <name>   Name of training file for NRC model
 * -tf2 <name>  Name of training file for GU-MT-LT model
 * -tf3 <name>  Name of training file for KLUE model
 * -tf4 <name>  Name of training file for TeamX model
 * -em          If evaluating a single model
 *                  0 = NRC, 1 = GUM, 2 = KLUE, 3 = TeamX
 * -tm          Run in training mode (build training file for input to eval mode)
 *                  0 = NRC, 1= GUM, 2 = KLUE, 3 = TeamX
 * 
 * Notes
 * Output files are overwritten if they exist
 * Output files are saved in resources/arff/ and have the output name embedded in the full name
 * Input twitter file must be in resources/tweets/ and have .txt extension
 * Input training files must be in resources/arff/ and end with extension .arff
 * 
 * Examples
 * train Trainingsdata-SemEval2013 -on mytest -tm 2
 * > Saves KLUE feature set into resources/arff/Trained-Features-KLUE_mytest.arff
 * trainAll Trainingsdata-SemEval2013 -on mytest
 * > Saves feature set for each model into <model name>_mytest.arff
 * eval Trainingsdata-SemEval2013 -tf Trained-Features-KLUE_mytest -em 2
 * > Compares KLUE model's classification to actual classification in Trainingsdata-SemEval2013.txt
 */