// 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/RulesSource.java
// public abstract class RulesSource implements Serializable, Cloneable, Closeable {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 1L;
// 
// 	@Override
// 	public abstract void close();
// 
// 	public double contradiction(Annotation a1, Annotation a2) {
// 		double d = probability(a1, a2);
// 		if (d == 0)
// 			return 0;
// 		if (d < 0)
// 			return Math.abs(d);
// 		return 0.0;
// 	}
// 
// 	@Override
// 	public abstract RulesSource clone();
// 
// 	public double entails(Annotation a1, Annotation a2) {
// 		double d = probability(a1, a2);
// 		if (d == 0)
// 			return 0;
// 		if (d > 0)
// 			return d;
// 		return 0.0;
// 	}
// 
// 	public abstract List<Rule> extractRules(AnnotatedText t, AnnotatedText h);
// 
// 	public abstract double probability(Annotation a1, Annotation a2);
// 
// 	public abstract Set<String> uses();
// 
// }


import lombok.Data;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import org.edits.rules.RulesSource;
package org.edits.distance.match;



@Data
public class SimpleRulesMatcher implements NestedMatcher {

	private static final long serialVersionUID = 1L;
	private final Matcher matcher;
	private final RulesSource source;

	public SimpleRulesMatcher(Matcher matcher_, RulesSource source_) {
		source = source_;
		matcher = matcher_;
	}

	public SimpleRulesMatcher(RulesSource source_) {
		source = source_;
		matcher = new DefaultMatcher();
	}

	@Override
	public Matcher copy() {
		return new SimpleRulesMatcher(matcher.copy(), source.clone());
	}

	@Override
// 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/RulesSource.java
// public abstract class RulesSource implements Serializable, Cloneable, Closeable {
// 
// 	/**
// 	 * 
// 	 */
// 	private static final long serialVersionUID = 1L;
// 
// 	@Override
// 	public abstract void close();
// 
// 	public double contradiction(Annotation a1, Annotation a2) {
// 		double d = probability(a1, a2);
// 		if (d == 0)
// 			return 0;
// 		if (d < 0)
// 			return Math.abs(d);
// 		return 0.0;
// 	}
// 
// 	@Override
// 	public abstract RulesSource clone();
// 
// 	public double entails(Annotation a1, Annotation a2) {
// 		double d = probability(a1, a2);
// 		if (d == 0)
// 			return 0;
// 		if (d > 0)
// 			return d;
// 		return 0.0;
// 	}
// 
// 	public abstract List<Rule> extractRules(AnnotatedText t, AnnotatedText h);
// 
// 	public abstract double probability(Annotation a1, Annotation a2);
// 
// 	public abstract Set<String> uses();
// 
// }


// Path: edits-core/src/main/java/org/edits/distance/match/SimpleRulesMatcher.java
import lombok.Data;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import org.edits.rules.RulesSource;

package org.edits.distance.match;



@Data
public class SimpleRulesMatcher implements NestedMatcher {

	private static final long serialVersionUID = 1L;
	private final Matcher matcher;
	private final RulesSource source;

	public SimpleRulesMatcher(Matcher matcher_, RulesSource source_) {
		source = source_;
		matcher = matcher_;
	}

	public SimpleRulesMatcher(RulesSource source_) {
		source = source_;
		matcher = new DefaultMatcher();
	}

	@Override
	public Matcher copy() {
		return new SimpleRulesMatcher(matcher.copy(), source.clone());
	}

	@Override
	public double match(Annotation node1, Annotation node2, AnnotatedText t, AnnotatedText h, String pairID) {