All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evasion.plugin.geoloc.compass.FairSimilarity Maven / Gradle / Ivy

The newest version!
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.evasion.plugin.geoloc.compass;

import org.apache.lucene.search.DefaultSimilarity;

/**
 *
 * @author sglon
 */
public class FairSimilarity extends DefaultSimilarity {

    /**
     * *
     * serialVersionUID.
     */
    private static final long serialVersionUID = 1L;

    public float lengthNorm(String fieldName, int numTerms) {
        return (float) (1.0 / numTerms);
    }

    public float tf(float freq) {
        return (float) freq;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy