// Path: src/main/java/edu/umass/ciir/trec/types/TRECJudgment.java
// public class TRECJudgment implements Comparable<TRECJudgment> {
//     private int m_topic;
//     private int m_run;
//     private String m_label;
//     private int m_judgment;
// 
//     public TRECJudgment(int t, int r, String l, int j) {
// 	this.m_topic = t;
// 	this.m_run = r;
// 	this.m_label = l;
// 	this.m_judgment = j;
//     }
//     
//     public int getTopic() { return m_topic; }
//     public int getRun() { return m_run; }
//     public String getLabel() { return m_label; }
//     public int getJudgment() { return m_judgment; }
// 
//     public int compareTo(TRECJudgment o) {
// 	if (this.getTopic() < o.getTopic()) return -1;
// 	if (this.getTopic() > o.getTopic()) return 1;
// 	if (this.getRun() < o.getRun()) return -1;
// 	if (this.getRun() > o.getRun()) return 1;
// 	
// 	int labelComp = this.getLabel().compareTo(o.getLabel());
// 	if (labelComp != 0) return labelComp;
// 	
// 	if (this.getJudgment() < o.getJudgment()) return -1;
// 	if (this.getJudgment() > o.getJudgment()) return 1;
// 
// 	return 0;	
//     }
// 
// }
// 
// Path: src/main/java/edu/umass/ciir/trec/types/TRECTopic.java
// public class TRECTopic implements Comparable<TRECTopic> {
// 
//     private int m_number;
//     private String m_title;
//     private String m_description;
//     private String m_narrative;
// 
//     public TRECTopic(int n, String t, String d, String na) {
// 	this.m_number = n;
// 	this.m_title = t;
// 	this.m_description = d;
// 	this.m_narrative = na;
//     }
// 
//     public int getNumber() { return m_number; }
//     public  String getTitle() { return m_title; }
//     public String getDescription() { return m_description; }
//     public String getNarrative() { return m_narrative; }
// 
//     
//     /**
//      * Compares topic number, and if they are equals, returns lexographical comparison of the title fields.
//      */
//     public int compareTo(TRECTopic o) {
// 	if (this.getNumber() < o.getNumber()) return -1;
// 	if (this.getNumber() > o.getNumber()) return 1;	
// 	return (this.getTitle().compareTo(o.getTitle()));
//     }
// }


import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import edu.umass.ciir.trec.types.TRECJudgment;
import edu.umass.ciir.trec.types.TRECTopic;
				cached = m.find();
				attempted = true;
			}
			return cached;
		}

		public TRECTopic next() throws NoSuchElementException {
			TRECTopic element;
			if (!attempted) {
				if (!m.find()) throw new NoSuchElementException();
			}
			element = new TRECTopic(Integer.parseInt(m.group(1)), m.group(2), 
					m.group(3), m.group(4));
			attempted = false;
			return element;
		}

		/**
		 * Not implemented as this is a read-only iterator.
		 */
		public void remove() {}
	}

	public class TRECJudgmentIterator implements Iterator<TRECJudgment> {

		private File source;
		private BufferedReader br;

		public TRECJudgmentIterator(File s) {
			source = s;
// Path: src/main/java/edu/umass/ciir/trec/types/TRECJudgment.java
// public class TRECJudgment implements Comparable<TRECJudgment> {
//     private int m_topic;
//     private int m_run;
//     private String m_label;
//     private int m_judgment;
// 
//     public TRECJudgment(int t, int r, String l, int j) {
// 	this.m_topic = t;
// 	this.m_run = r;
// 	this.m_label = l;
// 	this.m_judgment = j;
//     }
//     
//     public int getTopic() { return m_topic; }
//     public int getRun() { return m_run; }
//     public String getLabel() { return m_label; }
//     public int getJudgment() { return m_judgment; }
// 
//     public int compareTo(TRECJudgment o) {
// 	if (this.getTopic() < o.getTopic()) return -1;
// 	if (this.getTopic() > o.getTopic()) return 1;
// 	if (this.getRun() < o.getRun()) return -1;
// 	if (this.getRun() > o.getRun()) return 1;
// 	
// 	int labelComp = this.getLabel().compareTo(o.getLabel());
// 	if (labelComp != 0) return labelComp;
// 	
// 	if (this.getJudgment() < o.getJudgment()) return -1;
// 	if (this.getJudgment() > o.getJudgment()) return 1;
// 
// 	return 0;	
//     }
// 
// }
// 
// Path: src/main/java/edu/umass/ciir/trec/types/TRECTopic.java
// public class TRECTopic implements Comparable<TRECTopic> {
// 
//     private int m_number;
//     private String m_title;
//     private String m_description;
//     private String m_narrative;
// 
//     public TRECTopic(int n, String t, String d, String na) {
// 	this.m_number = n;
// 	this.m_title = t;
// 	this.m_description = d;
// 	this.m_narrative = na;
//     }
// 
//     public int getNumber() { return m_number; }
//     public  String getTitle() { return m_title; }
//     public String getDescription() { return m_description; }
//     public String getNarrative() { return m_narrative; }
// 
//     
//     /**
//      * Compares topic number, and if they are equals, returns lexographical comparison of the title fields.
//      */
//     public int compareTo(TRECTopic o) {
// 	if (this.getNumber() < o.getNumber()) return -1;
// 	if (this.getNumber() > o.getNumber()) return 1;	
// 	return (this.getTitle().compareTo(o.getTitle()));
//     }
// }


// Path: src/main/java/edu/umass/ciir/trec/parsers/TRECBlog08Parser.java
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import edu.umass.ciir.trec.types.TRECJudgment;
import edu.umass.ciir.trec.types.TRECTopic;

				cached = m.find();
				attempted = true;
			}
			return cached;
		}

		public TRECTopic next() throws NoSuchElementException {
			TRECTopic element;
			if (!attempted) {
				if (!m.find()) throw new NoSuchElementException();
			}
			element = new TRECTopic(Integer.parseInt(m.group(1)), m.group(2), 
					m.group(3), m.group(4));
			attempted = false;
			return element;
		}

		/**
		 * Not implemented as this is a read-only iterator.
		 */
		public void remove() {}
	}

	public class TRECJudgmentIterator implements Iterator<TRECJudgment> {

		private File source;
		private BufferedReader br;

		public TRECJudgmentIterator(File s) {
			source = s;
			try {