// Path: edits-core/src/main/java/org/edits/etaf/AnnotatedEntailmentPair.java
// @Data
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "AnnotatedEntailmentPair", propOrder = { "t", "h" })
// public class AnnotatedEntailmentPair {
// 
// 	public static AnnotatedEntailmentPair create(String t2, String h2, EditsTextAnnotator annotator) throws Exception {
// 		AnnotatedEntailmentPair px = new AnnotatedEntailmentPair();
// 		AnnotatedText at = new AnnotatedText();
// 		at.getAnnotation().addAll(annotator.annotate(t2));
// 		px.getT().add(at);
// 		at = new AnnotatedText();
// 		at.getAnnotation().addAll(annotator.annotate(h2));
// 		px.getH().add(at);
// 		return px;
// 	}
// 
// 	@XmlTransient
// 	private Map<String, String> attributes;
// 	@XmlAttribute
// 	protected String entailment;
// 	@XmlElement
// 	protected List<AnnotatedText> h;
// 	@XmlAttribute
// 	protected String id;
// 
// 	@XmlTransient
// 	private int order;
// 
// 	@XmlElement
// 	protected List<AnnotatedText> t;
// 
// 	@XmlAttribute
// 	protected String task;
// 
// 	public AnnotatedEntailmentPair() {
// 		t = Lists.newArrayList();
// 		h = Lists.newArrayList();
// 		attributes = 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;
// 
// }


import java.util.Set;
import org.edits.etaf.AnnotatedEntailmentPair;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import com.google.common.collect.Sets;
package org.edits.engines.weka.features;




public class NegationFeature extends Feature {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private final Set<String> negativeWords;

	public NegationFeature() {
		negativeWords = Sets.newHashSet();
		negativeWords.add("not");
		negativeWords.add("never");
		negativeWords.add("no");
	}

	@Override
	public Feature clone() {
		return new NegationFeature();
	}

	@Override
	public double doubleValue(AnnotatedEntailmentPair pair) {

		int hasNagationinH = 0;
		int hasNagationinT = 0;

// Path: edits-core/src/main/java/org/edits/etaf/AnnotatedEntailmentPair.java
// @Data
// @XmlAccessorType(XmlAccessType.FIELD)
// @XmlType(name = "AnnotatedEntailmentPair", propOrder = { "t", "h" })
// public class AnnotatedEntailmentPair {
// 
// 	public static AnnotatedEntailmentPair create(String t2, String h2, EditsTextAnnotator annotator) throws Exception {
// 		AnnotatedEntailmentPair px = new AnnotatedEntailmentPair();
// 		AnnotatedText at = new AnnotatedText();
// 		at.getAnnotation().addAll(annotator.annotate(t2));
// 		px.getT().add(at);
// 		at = new AnnotatedText();
// 		at.getAnnotation().addAll(annotator.annotate(h2));
// 		px.getH().add(at);
// 		return px;
// 	}
// 
// 	@XmlTransient
// 	private Map<String, String> attributes;
// 	@XmlAttribute
// 	protected String entailment;
// 	@XmlElement
// 	protected List<AnnotatedText> h;
// 	@XmlAttribute
// 	protected String id;
// 
// 	@XmlTransient
// 	private int order;
// 
// 	@XmlElement
// 	protected List<AnnotatedText> t;
// 
// 	@XmlAttribute
// 	protected String task;
// 
// 	public AnnotatedEntailmentPair() {
// 		t = Lists.newArrayList();
// 		h = Lists.newArrayList();
// 		attributes = 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/engines/weka/features/NegationFeature.java
import java.util.Set;
import org.edits.etaf.AnnotatedEntailmentPair;
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import com.google.common.collect.Sets;

package org.edits.engines.weka.features;




public class NegationFeature extends Feature {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private final Set<String> negativeWords;

	public NegationFeature() {
		negativeWords = Sets.newHashSet();
		negativeWords.add("not");
		negativeWords.add("never");
		negativeWords.add("no");
	}

	@Override
	public Feature clone() {
		return new NegationFeature();
	}

	@Override
	public double doubleValue(AnnotatedEntailmentPair pair) {

		int hasNagationinH = 0;
		int hasNagationinT = 0;

		for (AnnotatedText a : pair.getH()) {