
de.julielab.geneexpbase.scoring.TokenJaroSimilarityScorer Maven / Gradle / Ivy
/**
* JaroWinklerScorer.java
*
* Copyright (c) 2007, JULIE Lab.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
*
* Author: tomanek
*
* Current version: 1.4.2
* Since version: 1.4
*
* Creation date: Aug 16, 2007
*
* a scorer based on jaro winkler similarity
**/
package de.julielab.geneexpbase.scoring;
public class TokenJaroSimilarityScorer extends Scorer {
private final TokenJaroSimilarity scorer;
public TokenJaroSimilarityScorer() {
scorer = new TokenJaroSimilarity();
}
public double getScore(String term1, String term2) throws RuntimeException {
return computeAndCacheScore(term1, term2, (t1, t2) -> scorer.score(t1, t2));
}
public String info() {
return "TokenJaroScorer";
}
@Override
public int getScorerType() {
return TOKEN_JAROWINKLER_SCORER;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy