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

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

There is a newer version: 2.0.0.2
Show 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