public class GND extends NXYSignificanceHeuristic
| Modifier and Type | Class and Description |
|---|---|
static class |
GND.GNDBuilder |
NXYSignificanceHeuristic.Frequencies, NXYSignificanceHeuristic.NXYBuilder, NXYSignificanceHeuristic.NXYParserWriteable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
static SignificanceHeuristicParser |
PARSER |
BACKGROUND_IS_SUPERSET, backgroundIsSuperset, INCLUDE_NEGATIVES_FIELD, includeNegatives, SCORE_ERROR_MESSAGEEMPTY_PARAMS| Constructor and Description |
|---|
GND(boolean backgroundIsSuperset) |
GND(StreamInput in)
Read from a stream.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object other) |
double |
getScore(long subsetFreq,
long subsetSize,
long supersetFreq,
long supersetSize)
Calculates Google Normalized Distance, as described in "The Google Similarity Distance", Cilibrasi and Vitanyi, 2007
link: http://arxiv.org/pdf/cs/0412098v3.pdf
|
java.lang.String |
getWriteableName()
Returns the name of the writeable object
|
int |
hashCode() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
build, checkFrequencies, computeNxyscheckFrequencyValidity, rewrite, rewriteclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitisFragmentpublic static final java.lang.String NAME
public static final SignificanceHeuristicParser PARSER
public GND(boolean backgroundIsSuperset)
public GND(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
WriteablewriteTo in interface WriteablewriteTo in class NXYSignificanceHeuristicjava.io.IOExceptionpublic boolean equals(java.lang.Object other)
equals in class NXYSignificanceHeuristicpublic int hashCode()
hashCode in class NXYSignificanceHeuristicpublic double getScore(long subsetFreq,
long subsetSize,
long supersetFreq,
long supersetSize)
getScore in class SignificanceHeuristicsubsetFreq - The frequency of the term in the selected samplesubsetSize - The size of the selected sample (typically number of docs)supersetFreq - The frequency of the term in the superset from which the sample was takensupersetSize - The size of the superset from which the sample was taken (typically number of docs)public java.lang.String getWriteableName()
NamedWriteablepublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
java.io.IOException