// Path: src/main/java/unsw/curation/api/domain/ExtractNumberSimilarity.java
// public class ExtractNumberSimilarity {
// 
// 	private String vector1;
// 	private String vector2;
// 	private double score;
// 	
// 	public ExtractNumberSimilarity(){}
// 	
// 	public ExtractNumberSimilarity(String vector1,String vector2,double score)
// 	{
// 		this.vector1=vector1;
// 		this.vector2=vector2;
// 		this.score=score;
// 	}
// 	
// 	public void setVector1(String vector1)
// 	{
// 		this.vector1=vector1;
// 	}
// 	public String getVector1()
// 	{
// 		return this.vector1;
// 	}
// 	
// 	public void setVecor2(String vector2)
// 	{
// 		this.vector2=vector2;
// 	}
// 	public String getVector2()
// 	{
// 		return this.vector2;
// 	}
// 	public void setScore(double score)
// 	{
// 		this.score=score;
// 	}
// 	public double getScore()
// 	{
// 		return this.score;
// 	}
// }
// 
// Path: src/main/java/unsw/curation/api/domain/abstraction/INumberDiceSimilarity.java
// public interface INumberDiceSimilarity {
// 
// 	double Dice_Vector_Vector(double [] number1,double [] number2);
// 	List<ExtractNumberSimilarity> Dice_Vector_VectorS(String filePath) throws IOException;
// 	List<ExtractNumberSimilarity> Dice_Vector_VectorS(Double [] vector,String filePath) throws IOException;
// }


import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;
import unsw.curation.api.domain.ExtractNumberSimilarity;
import unsw.curation.api.domain.abstraction.INumberDiceSimilarity;

package unsw.curation.api.extractsimilarity;






public class ExtractNumberDiceSimilarityImpl implements INumberDiceSimilarity{

	@Override
	public double Dice_Vector_Vector(double[] number1, double[] number2) {
		List<String> lstarr1=new ArrayList<>();
        List<String> lstarr2=new ArrayList<>();
        for(double num:number1)
        {
            lstarr1.add(String.valueOf(num));
        }
        for(double num:number2)
        {
            lstarr2.add(String.valueOf(num));
        }
        List<String> lstUnique=new ArrayList<>();
        lstUnique.addAll(lstarr1);
        lstUnique.addAll(lstarr2);
        HashSet<String> lstIntersect=new HashSet<>();
        lstIntersect.addAll(lstarr1);
        lstIntersect.retainAll(lstarr2);
        double intersectSize=lstIntersect.size();
        double uniqueSize=lstUnique.size();
        double DiceSimlarity=(2*intersectSize)/uniqueSize;
        return DiceSimlarity;
	}

	@Override

// Path: src/main/java/unsw/curation/api/domain/ExtractNumberSimilarity.java
// public class ExtractNumberSimilarity {
// 
// 	private String vector1;
// 	private String vector2;
// 	private double score;
// 	
// 	public ExtractNumberSimilarity(){}
// 	
// 	public ExtractNumberSimilarity(String vector1,String vector2,double score)
// 	{
// 		this.vector1=vector1;
// 		this.vector2=vector2;
// 		this.score=score;
// 	}
// 	
// 	public void setVector1(String vector1)
// 	{
// 		this.vector1=vector1;
// 	}
// 	public String getVector1()
// 	{
// 		return this.vector1;
// 	}
// 	
// 	public void setVecor2(String vector2)
// 	{
// 		this.vector2=vector2;
// 	}
// 	public String getVector2()
// 	{
// 		return this.vector2;
// 	}
// 	public void setScore(double score)
// 	{
// 		this.score=score;
// 	}
// 	public double getScore()
// 	{
// 		return this.score;
// 	}
// }
// 
// Path: src/main/java/unsw/curation/api/domain/abstraction/INumberDiceSimilarity.java
// public interface INumberDiceSimilarity {
// 
// 	double Dice_Vector_Vector(double [] number1,double [] number2);
// 	List<ExtractNumberSimilarity> Dice_Vector_VectorS(String filePath) throws IOException;
// 	List<ExtractNumberSimilarity> Dice_Vector_VectorS(Double [] vector,String filePath) throws IOException;
// }


// Path: src/main/java/unsw/curation/api/extractsimilarity/ExtractNumberDiceSimilarityImpl.java
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.stream.Collectors;
import unsw.curation.api.domain.ExtractNumberSimilarity;
import unsw.curation.api.domain.abstraction.INumberDiceSimilarity;

package unsw.curation.api.extractsimilarity;






public class ExtractNumberDiceSimilarityImpl implements INumberDiceSimilarity{

	@Override
	public double Dice_Vector_Vector(double[] number1, double[] number2) {
		List<String> lstarr1=new ArrayList<>();
        List<String> lstarr2=new ArrayList<>();
        for(double num:number1)
        {
            lstarr1.add(String.valueOf(num));
        }
        for(double num:number2)
        {
            lstarr2.add(String.valueOf(num));
        }
        List<String> lstUnique=new ArrayList<>();
        lstUnique.addAll(lstarr1);
        lstUnique.addAll(lstarr2);
        HashSet<String> lstIntersect=new HashSet<>();
        lstIntersect.addAll(lstarr1);
        lstIntersect.retainAll(lstarr2);
        double intersectSize=lstIntersect.size();
        double uniqueSize=lstUnique.size();
        double DiceSimlarity=(2*intersectSize)/uniqueSize;
        return DiceSimlarity;
	}

	@Override

	public List<ExtractNumberSimilarity> Dice_Vector_VectorS(String filePath) throws IOException {
