// Path: src/edu/antonym/prototype/MetricEvaluator.java
// public interface MetricEvaluator {
// 	public double score(WordMetric metric) throws IOException;
// }
// 
// Path: src/edu/antonym/prototype/Vocabulary.java
// public interface Vocabulary {
// 	public int size();
// 	public int OOVindex();
// 	public String lookupIndex(int index);
// 	public int lookupWord(String word);
// 	public int getVocabSize();
// }
// 
// Path: src/edu/antonym/prototype/WordMetric.java
// public interface WordMetric {
// 	public Vocabulary getVocab();
// 
// 	public double similarity(int word1, int word2);
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import edu.antonym.prototype.MetricEvaluator;
import edu.antonym.prototype.Vocabulary;
import edu.antonym.prototype.WordMetric;
						syn_num++;
						mse_syn+= Math.pow(1-cs,2);
						out.append(Double.toString(cs)+" ");
					}
								
					out.append("\n");
					line = br.readLine();
				}
				mse_ant = mse_ant/ant_num;
				mse_syn = mse_syn/syn_num;
				acc-=mse_ant;
				out.append("\n");
				out.append("Mean squared error for antonym is: " + mse_ant +"\n");
				System.out.println("[SIMPLE ANT TEST" + i + "] Mean squared error for antonym is: " + Double.toString(mse_ant));
				if(syn_num!=0){
					out.append("Mean squared error for synonym is: " + mse_syn +"\n");
					System.out.println("[SIMPLE ANT TEST" + i + "] Mean squared error for synonym is: " + Double.toString(mse_syn));
				}
				out.close();
				br.close();
			}
			System.out.println("Overall accuracy is: "+ acc);
		}
		if(!synfiles.isEmpty()){
			Vocabulary vocab = metric.getVocab();
			int OOV = vocab.OOVindex();
			
			acc = 0.0d;
			for (int i = 0; i < synfiles.size(); i++) {
				int syn_num = 0;
// Path: src/edu/antonym/prototype/MetricEvaluator.java
// public interface MetricEvaluator {
// 	public double score(WordMetric metric) throws IOException;
// }
// 
// Path: src/edu/antonym/prototype/Vocabulary.java
// public interface Vocabulary {
// 	public int size();
// 	public int OOVindex();
// 	public String lookupIndex(int index);
// 	public int lookupWord(String word);
// 	public int getVocabSize();
// }
// 
// Path: src/edu/antonym/prototype/WordMetric.java
// public interface WordMetric {
// 	public Vocabulary getVocab();
// 
// 	public double similarity(int word1, int word2);
// }


// Path: src/edu/antonym/test/TestCase.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.PosixParser;
import edu.antonym.prototype.MetricEvaluator;
import edu.antonym.prototype.Vocabulary;
import edu.antonym.prototype.WordMetric;

						syn_num++;
						mse_syn+= Math.pow(1-cs,2);
						out.append(Double.toString(cs)+" ");
					}
								
					out.append("\n");
					line = br.readLine();
				}
				mse_ant = mse_ant/ant_num;
				mse_syn = mse_syn/syn_num;
				acc-=mse_ant;
				out.append("\n");
				out.append("Mean squared error for antonym is: " + mse_ant +"\n");
				System.out.println("[SIMPLE ANT TEST" + i + "] Mean squared error for antonym is: " + Double.toString(mse_ant));
				if(syn_num!=0){
					out.append("Mean squared error for synonym is: " + mse_syn +"\n");
					System.out.println("[SIMPLE ANT TEST" + i + "] Mean squared error for synonym is: " + Double.toString(mse_syn));
				}
				out.close();
				br.close();
			}
			System.out.println("Overall accuracy is: "+ acc);
		}
		if(!synfiles.isEmpty()){
			Vocabulary vocab = metric.getVocab();
			int OOV = vocab.OOVindex();
			
			acc = 0.0d;
			for (int i = 0; i < synfiles.size(); i++) {
				int syn_num = 0;
				double mse_syn = 0.0;