vardwrapper
Class Normalisation

java.lang.Object
  extended by vardwrapper.Normalisation

public class Normalisation
extends java.lang.Object

Represents the attempted normalisation of a single word.


Constructor Summary
Normalisation(boolean isVariant, boolean isNormalised, java.lang.String original, java.lang.String normalised, double confidence)
          Constructor for a normalisation attempt.
 
Method Summary
 double getConfidence()
          The confidence score of the top normalisation.
 java.lang.String getNormalised()
          The top normalisation found, whether or not isNormalised is true.
 java.lang.String getOriginal()
          The original word to be normalised, always present.
static java.lang.String headerString()
          Header string for print out (R).
 boolean isNormalised()
          Whether or not the word has been normalised, will be true if isVariant is true and a normalisation suggestion is found with a confidence score above the threshold used.
 boolean isVariant()
          Whether or not the original word should be normalised, i.e.
 java.lang.String toString()
          Instance string for print out (R).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Normalisation

public Normalisation(boolean isVariant,
                     boolean isNormalised,
                     java.lang.String original,
                     java.lang.String normalised,
                     double confidence)
Constructor for a normalisation attempt.

Parameters:
isVariant - Whether or not the original word should be normalised, i.e. it is not in VARD's dictionary.
isNormalised - Whether or not the word has been normalised, will be true if isVariant is true and a normalisation suggestion is found with a confidence score above the threshold used.
original - the original word to be normalised, always present.
normalised - the top normalisation found, whether or not isNormalised is true. Will be NULL if isVariant is false or no normalisation suggestions are found.
confidence - the confidence score of the top normalisation. Will be 0.0 if isVariant is false or no normalisation suggestions are found.
Method Detail

isVariant

public boolean isVariant()
Whether or not the original word should be normalised, i.e. it is not in VARD's dictionary.

Returns:
true, if original is a variant.

isNormalised

public boolean isNormalised()
Whether or not the word has been normalised, will be true if isVariant is true and a normalisation suggestion is found with a confidence score above the threshold used.

Returns:
true, if a normalisation has been made.

getOriginal

public java.lang.String getOriginal()
The original word to be normalised, always present.

Returns:
the original word.

getNormalised

public java.lang.String getNormalised()
The top normalisation found, whether or not isNormalised is true. Will be NULL if isVariant is false or no normalisation suggestions are found.

Returns:
the top normalisation found, if isVariant and a suggestion is present.

getConfidence

public double getConfidence()
The confidence score of the top normalisation. Will be 0.0 if isVariant is false or no normalisation suggestions are found.

Returns:
the confidence score of getNormalised().

headerString

public static java.lang.String headerString()
Header string for print out (R).

Returns:
"Original\tNormalised\tConfidence\tIs Variant?\tIs Normalised?"

toString

public java.lang.String toString()
Instance string for print out (R).

Overrides:
toString in class java.lang.Object
Returns:
original, normalised, confidence, isVariant, isNormalised (separated by tab).