// Path: edits-core/src/main/java/org/edits/etaf/AnnotatedText.java
// @Data
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "AnnotatedText", propOrder = { "annotation" })
// public class AnnotatedText {
// 
// 	@XmlElement
// 	protected List<Annotation> annotation;
// 
// 	public AnnotatedText() {
// 		annotation = Lists.newArrayList();
// 	}
// }
// 
// Path: edits-core/src/main/java/org/edits/etaf/Annotation.java
// @Data
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "Annotation", propOrder = {})
// @XmlRootElement(name = "annotation")
// public class Annotation {
// 
// 	@XmlAttribute
// 	private String cpostag;
// 	@XmlAttribute
// 	private String deprel;
// 	@XmlAttribute
// 	private int end;
// 	@XmlAttribute
// 	private String feats;
// 	@XmlAttribute
// 	private String form;
// 	@XmlAttribute
// 	private String head;
// 	@XmlAttribute
// 	private String id;
// 	@XmlAttribute
// 	private String lemma;
// 	@XmlAttribute
// 	private String postag;
// 	@XmlAttribute
// 	private int start;
// 
// }


import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.log4j.Log4j;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.FSDirectory;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
package org.edits.rules;





@Log4j
@Data
@EqualsAndHashCode(callSuper = false)
public class IndexRulesSource extends RulesSource {

	private static Map<String, IndexSearcher> searchers;

	private static final long serialVersionUID = 1L;
	public static final String TERMDOC_FIELD = "value";
	public static final String USES_FIELD = "uses";

	public static final String VALUE_FIELD = "termsDoc";

	static {
		searchers = Maps.newHashMap();
	}

// Path: edits-core/src/main/java/org/edits/etaf/AnnotatedText.java
// @Data
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "AnnotatedText", propOrder = { "annotation" })
// public class AnnotatedText {
// 
// 	@XmlElement
// 	protected List<Annotation> annotation;
// 
// 	public AnnotatedText() {
// 		annotation = Lists.newArrayList();
// 	}
// }
// 
// Path: edits-core/src/main/java/org/edits/etaf/Annotation.java
// @Data
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "Annotation", propOrder = {})
// @XmlRootElement(name = "annotation")
// public class Annotation {
// 
// 	@XmlAttribute
// 	private String cpostag;
// 	@XmlAttribute
// 	private String deprel;
// 	@XmlAttribute
// 	private int end;
// 	@XmlAttribute
// 	private String feats;
// 	@XmlAttribute
// 	private String form;
// 	@XmlAttribute
// 	private String head;
// 	@XmlAttribute
// 	private String id;
// 	@XmlAttribute
// 	private String lemma;
// 	@XmlAttribute
// 	private String postag;
// 	@XmlAttribute
// 	private int start;
// 
// }


// Path: edits-core/src/main/java/org/edits/rules/IndexRulesSource.java
import java.io.File;
import java.util.List;
import java.util.Map;
import java.util.Set;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.extern.log4j.Log4j;
import org.apache.lucene.document.Document;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.Term;
import org.apache.lucene.search.BooleanClause.Occur;
import org.apache.lucene.search.BooleanQuery;
import org.apache.lucene.search.IndexSearcher;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.TermQuery;
import org.apache.lucene.search.TopDocs;
import org.apache.lucene.store.FSDirectory;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;

package org.edits.rules;





@Log4j
@Data
@EqualsAndHashCode(callSuper = false)
public class IndexRulesSource extends RulesSource {

	private static Map<String, IndexSearcher> searchers;

	private static final long serialVersionUID = 1L;
	public static final String TERMDOC_FIELD = "value";
	public static final String USES_FIELD = "uses";

	public static final String VALUE_FIELD = "termsDoc";

	static {
		searchers = Maps.newHashMap();
	}

	public static String value(String f, Annotation a1) {