Project

General

Profile

1
package eu.dnetlib.pace.distance.algo;
2

    
3
import com.wcohen.ss.AbstractStringDistance;
4
import eu.dnetlib.pace.distance.SecondStringDistanceAlgo;
5

    
6
public class Levenstein extends SecondStringDistanceAlgo {
7

    
8
	public Levenstein(double w) {
9
		super(w, new com.wcohen.ss.Levenstein());
10
	}
11

    
12
	protected Levenstein(double w, AbstractStringDistance ssalgo) {
13
		super(w, ssalgo);
14
	}
15

    
16
	@Override
17
	public double getWeight() {
18
		return super.weight;
19
	}
20

    
21
	@Override
22
	protected double normalize(double d) {
23
		return 1 / Math.pow(Math.abs(d) + 1, 0.1);
24
	}
25

    
26
}
(8-8/21)