// Path: src/main/java/edu/cmu/cs/lti/ark/util/SerializedObjects.java
// public class SerializedObjects {
// 	public static void writeSerializedObject(Object object, String outFile) {
// 		ObjectOutputStream output = null;
// 		try {
// 			output = getObjectOutputStream(outFile);
// 			output.writeObject(object);
// 		} catch(IOException ex){
// 			// TODO: NONONONONO! stop swallowing errors!
// 			ex.printStackTrace();
// 		} finally{
// 			closeQuietly(output);
// 		}
// 	}
// 
// 	public static Object readSerializedObject(String inputFile) {
// 		ObjectInputStream input = null;
// 		Object recoveredObject = null;
// 		try{
// 			input = getObjectInputStream(inputFile);
// 			recoveredObject = input.readObject();
// 		} catch(Exception ex) {
// 			// TODO: NONONONONO! stop swallowing errors!
// 			ex.printStackTrace();
// 		} finally{
// 			closeQuietly(input);
// 		}
// 		return recoveredObject;
// 	}
// 
// 	public static <T> T readObject(final String inputFile) throws IOException, ClassNotFoundException {
// 		return SerializedObjects.<T>readObject(new InputSupplier<ObjectInputStream>() {
// 			@Override public ObjectInputStream getInput() throws IOException {
// 				return getObjectInputStream(inputFile);
// 			} });
// 	}
// 
// 	@SuppressWarnings("unchecked")
// 	public static <T> T readObject(InputSupplier<ObjectInputStream> inputSupplier)
// 			throws IOException, ClassNotFoundException {
// 		final ObjectInputStream input = inputSupplier.getInput();
// 		try{
// 			return (T) input.readObject();
// 		} finally{
// 			closeQuietly(input);
// 		}
// 	}
// 
// 	private static ObjectInputStream getObjectInputStream(String inputFile) throws IOException {
// 		return new ObjectInputStream(new BufferedInputStream(getInputStream(inputFile)));
// 	}
// 
// 	public static InputStream getInputStream(String inputFile) throws IOException {
// 		if(inputFile.endsWith(".gz")) {
// 			return new GZIPInputStream(new FileInputStream(inputFile));
// 		} else {
// 			return new FileInputStream(inputFile);
// 		}
// 	}
// 
// 	private static ObjectOutputStream getObjectOutputStream(String outFile) throws IOException {
// 		OutputStream file = getOutputStream(outFile);
// 		return new ObjectOutputStream(new BufferedOutputStream(file));
// 	}
// 
// 	public static OutputStream getOutputStream(String outFile) throws IOException {
// 		if(outFile.endsWith(".gz")) {
// 			return new GZIPOutputStream(new FileOutputStream(outFile));
// 		} else {
// 			return new FileOutputStream(outFile);
// 		}
// 	}
// }


import java.io.FileReader;
import java.io.IOException;
import java.util.*;
import edu.cmu.cs.lti.ark.fn.data.prep.ParsePreparation;
import edu.cmu.cs.lti.ark.fn.utils.FNModelOptions;
import edu.cmu.cs.lti.ark.util.SerializedObjects;
import edu.cmu.cs.lti.ark.util.ds.Pair;
import gnu.trove.THashMap;
import gnu.trove.THashSet;
import gnu.trove.TObjectDoubleHashMap;
import java.io.BufferedReader;
		{
			BufferedReader inParses = new BufferedReader(new FileReader(options.testParseFile.get()));
			BufferedReader inOrgSentences = new BufferedReader(new FileReader(options.testTokenizedFile.get()));
			String line = null;
			int dummy = 0;
			while((line=inParses.readLine())!=null)
			{
				String line2 = inOrgSentences.readLine().trim();
				if(count<start)	// skip sentences prior to the specified range
				{
					count++;
					continue;
				}
				parses.add(line.trim());
				orgSentenceLines.add(line2);
				tokenNums.add(""+dummy);	// ?? I think 'dummy' is just the offset of the sentence relative to options.startIndex
				originalIndices.add(""+count);
				if(count==(end-1))	// skip sentences after the specified range
					break;
				count++;
				dummy++;
			}				
			inParses.close();
			inOrgSentences.close();
		}
		
		catch(Exception e)
		{
			e.printStackTrace();
		}		
// Path: src/main/java/edu/cmu/cs/lti/ark/util/SerializedObjects.java
// public class SerializedObjects {
// 	public static void writeSerializedObject(Object object, String outFile) {
// 		ObjectOutputStream output = null;
// 		try {
// 			output = getObjectOutputStream(outFile);
// 			output.writeObject(object);
// 		} catch(IOException ex){
// 			// TODO: NONONONONO! stop swallowing errors!
// 			ex.printStackTrace();
// 		} finally{
// 			closeQuietly(output);
// 		}
// 	}
// 
// 	public static Object readSerializedObject(String inputFile) {
// 		ObjectInputStream input = null;
// 		Object recoveredObject = null;
// 		try{
// 			input = getObjectInputStream(inputFile);
// 			recoveredObject = input.readObject();
// 		} catch(Exception ex) {
// 			// TODO: NONONONONO! stop swallowing errors!
// 			ex.printStackTrace();
// 		} finally{
// 			closeQuietly(input);
// 		}
// 		return recoveredObject;
// 	}
// 
// 	public static <T> T readObject(final String inputFile) throws IOException, ClassNotFoundException {
// 		return SerializedObjects.<T>readObject(new InputSupplier<ObjectInputStream>() {
// 			@Override public ObjectInputStream getInput() throws IOException {
// 				return getObjectInputStream(inputFile);
// 			} });
// 	}
// 
// 	@SuppressWarnings("unchecked")
// 	public static <T> T readObject(InputSupplier<ObjectInputStream> inputSupplier)
// 			throws IOException, ClassNotFoundException {
// 		final ObjectInputStream input = inputSupplier.getInput();
// 		try{
// 			return (T) input.readObject();
// 		} finally{
// 			closeQuietly(input);
// 		}
// 	}
// 
// 	private static ObjectInputStream getObjectInputStream(String inputFile) throws IOException {
// 		return new ObjectInputStream(new BufferedInputStream(getInputStream(inputFile)));
// 	}
// 
// 	public static InputStream getInputStream(String inputFile) throws IOException {
// 		if(inputFile.endsWith(".gz")) {
// 			return new GZIPInputStream(new FileInputStream(inputFile));
// 		} else {
// 			return new FileInputStream(inputFile);
// 		}
// 	}
// 
// 	private static ObjectOutputStream getObjectOutputStream(String outFile) throws IOException {
// 		OutputStream file = getOutputStream(outFile);
// 		return new ObjectOutputStream(new BufferedOutputStream(file));
// 	}
// 
// 	public static OutputStream getOutputStream(String outFile) throws IOException {
// 		if(outFile.endsWith(".gz")) {
// 			return new GZIPOutputStream(new FileOutputStream(outFile));
// 		} else {
// 			return new FileOutputStream(outFile);
// 		}
// 	}
// }


// Path: src/main/java/edu/cmu/cs/lti/ark/fn/identification/FrameIdentificationGoldTargets.java
import java.io.FileReader;
import java.io.IOException;
import java.util.*;
import edu.cmu.cs.lti.ark.fn.data.prep.ParsePreparation;
import edu.cmu.cs.lti.ark.fn.utils.FNModelOptions;
import edu.cmu.cs.lti.ark.util.SerializedObjects;
import edu.cmu.cs.lti.ark.util.ds.Pair;
import gnu.trove.THashMap;
import gnu.trove.THashSet;
import gnu.trove.TObjectDoubleHashMap;
import java.io.BufferedReader;

		{
			BufferedReader inParses = new BufferedReader(new FileReader(options.testParseFile.get()));
			BufferedReader inOrgSentences = new BufferedReader(new FileReader(options.testTokenizedFile.get()));
			String line = null;
			int dummy = 0;
			while((line=inParses.readLine())!=null)
			{
				String line2 = inOrgSentences.readLine().trim();
				if(count<start)	// skip sentences prior to the specified range
				{
					count++;
					continue;
				}
				parses.add(line.trim());
				orgSentenceLines.add(line2);
				tokenNums.add(""+dummy);	// ?? I think 'dummy' is just the offset of the sentence relative to options.startIndex
				originalIndices.add(""+count);
				if(count==(end-1))	// skip sentences after the specified range
					break;
				count++;
				dummy++;
			}				
			inParses.close();
			inOrgSentences.close();
		}
		
		catch(Exception e)
		{
			e.printStackTrace();
		}		
		RequiredDataForFrameIdentification r = SerializedObjects.readObject(options.fnIdReqDataFile.get());