![JAR search and dependency download from the Maven repository](/logo.png)
edu.berkeley.nlp.util.Maxer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of berkeleyparser Show documentation
Show all versions of berkeleyparser Show documentation
The Berkeley parser analyzes the grammatical structure of natural language using probabilistic context-free grammars (PCFGs).
The newest version!
package edu.berkeley.nlp.util;
public class Maxer {
private double max = Double.NEGATIVE_INFINITY;
private T argMax = null;
public String toString() {
return argMax.toString() + ": " + Fmt.D(max);
}
public void observe(T t, double val) {
if (val > max) {
max = val;
argMax = t;
}
}
public double getMax() {
return max;
}
public T argMax() {
return argMax;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy