// 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 org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import com.google.common.collect.Lists;
import java.util.List;
/**
 * Edits - Edit Distance Textual Entailment Suite Copyright (C) 2011 Milen
 * Kouylekov This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3.0 of the License,
 * or (at your option) any later version. This library is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
 * the GNU Lesser General Public License for more details. You should have
 * received a copy of the GNU Lesser General Public License along with this
 * library; if not, write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301 USA
 */
package org.edits.distance.algorithm;




/**
 * @author Milen Kouylekov
 */
public class CosineSimilarity extends WeightedAlgorithm {

	private static final long serialVersionUID = 1L;

	@Override
	public EditDistanceAlgorithm clone() {
		return defaultCopy();
	}

	@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/distance/algorithm/CosineSimilarity.java
import org.edits.etaf.AnnotatedText;
import org.edits.etaf.Annotation;
import com.google.common.collect.Lists;
import java.util.List;

/**
 * Edits - Edit Distance Textual Entailment Suite Copyright (C) 2011 Milen
 * Kouylekov This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3.0 of the License,
 * or (at your option) any later version. This library is distributed in the
 * hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
 * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
 * the GNU Lesser General Public License for more details. You should have
 * received a copy of the GNU Lesser General Public License along with this
 * library; if not, write to the Free Software Foundation, Inc., 51 Franklin
 * Street, Fifth Floor, Boston, MA 02110-1301 USA
 */
package org.edits.distance.algorithm;




/**
 * @author Milen Kouylekov
 */
public class CosineSimilarity extends WeightedAlgorithm {

	private static final long serialVersionUID = 1L;

	@Override
	public EditDistanceAlgorithm clone() {
		return defaultCopy();
	}

	@Override
	public double distance(List<Annotation> ta, List<Annotation> ha, AnnotatedText t, AnnotatedText h, String pairID) {