Project

General

Profile

1
package eu.dnetlib.pace.distance;
2

    
3
import com.wcohen.ss.AbstractStringDistance;
4

    
5
public class Levenstein extends SecondStringDistanceAlgo {
6

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

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

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

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

    
25
}
(13-13/27)