// 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.Closeable;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
package org.edits.rules;



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;
	}

// 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
import java.io.Closeable;
import java.io.Serializable;
import java.util.List;
import java.util.Set;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;

package org.edits.rules;



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);