org.jasen.core.engine
Class JasenEngineConfiguration

java.lang.Object
  extended byorg.jasen.core.engine.JasenEngineConfiguration

public final class JasenEngineConfiguration
extends Object

Singleton configuration class to hold, and provide thread safe access to engine configuration data.

Author:
Jason Polites

Method Summary
 float getConfidence()
          Gets the confidence we have in the "background information".
 float getEsf()
          Gets the ESF or Effective Size Factor.
 int getFtt()
          Gets the FTT or Few Token Threshold This is just a fudge factor which toggles the engine between two different internal algorithms depending on the number of tokens (words) returned frmo message tokenization
 float getGuess()
          The guess is the value given to a scan when (for whatever reason) no information about the message could be determined.
static JasenEngineConfiguration getInstance()
          Gets the single (per JVM) instance of the configuration
 float getParserContrastThreshold()
          Confguration value for the html parser
 int getParserMicroElementSize()
          Confguration value for the html parser
 int getParserMicroFontSize()
          Confguration value for the html parser
 void setConfidence(float confidence)
          Gets the confidence we have in the "background information".
 void setEsf(float esf)
          Sets the Effective Size Factor
 void setFtt(int fewTokenThreshold)
          Sets the FTT or Few Token Threshold
This is just a fudge factor which toggles the engine between two different internal algorithms depending on the number of tokens (words) returned frmo message tokenization
 void setGuess(float guess)
          Sets the guess value.
 void setParserContrastThreshold(float parserContrastThreshold)
          Confguration value for the html parser
 void setParserMicroElementSize(int parserMicroElementSize)
          Confguration value for the html parser
 void setParserMicroFontSize(int parserMicroFontSize)
          Confguration value for the html parser
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static JasenEngineConfiguration getInstance()
Gets the single (per JVM) instance of the configuration

Returns:
The current JasenEngineConfiguration object

getConfidence

public float getConfidence()
Gets the confidence we have in the "background information".
This is used during the Chi Square calculations

Returns:
Returns the confidence.

setConfidence

public void setConfidence(float confidence)
Gets the confidence we have in the "background information".
This is used during the Chi Square calculations

Parameters:
confidence - The confidence to set.

getEsf

public float getEsf()
Gets the ESF or Effective Size Factor.

Returns:
Returns the esf.

setEsf

public void setEsf(float esf)
Sets the Effective Size Factor

Parameters:
esf - The esf to set.
See Also:
getEsf()

getGuess

public float getGuess()
The guess is the value given to a scan when (for whatever reason) no information about the message could be determined.
This value is also used during chi square calculations as a default value where no other information is available

Returns:
Returns the guess.

setGuess

public void setGuess(float guess)
Sets the guess value. MUST be > 0.0 and < 1.0

Parameters:
guess - The guess to set.

getFtt

public int getFtt()
Gets the FTT or Few Token Threshold This is just a fudge factor which toggles the engine between two different internal algorithms depending on the number of tokens (words) returned frmo message tokenization

Returns:
Returns the ftt (Few Token Threshold)

setFtt

public void setFtt(int fewTokenThreshold)
Sets the FTT or Few Token Threshold
This is just a fudge factor which toggles the engine between two different internal algorithms depending on the number of tokens (words) returned frmo message tokenization

Parameters:
fewTokenThreshold - Should be a number between 1 and 50 (ideally)

getParserContrastThreshold

public float getParserContrastThreshold()
Confguration value for the html parser

Returns:
See Also:
SpamHTMLParser.getContrastThreshold()

setParserContrastThreshold

public void setParserContrastThreshold(float parserContrastThreshold)
Confguration value for the html parser

Parameters:
parserContrastThreshold -
See Also:
SpamHTMLParser.setContrastThreshold(float)

getParserMicroElementSize

public int getParserMicroElementSize()
Confguration value for the html parser

Returns:
See Also:
SpamHTMLParser.getMicroElementSize()

setParserMicroElementSize

public void setParserMicroElementSize(int parserMicroElementSize)
Confguration value for the html parser

Parameters:
parserMicroElementSize -
See Also:
SpamHTMLParser.setMicroElementSize(int)

getParserMicroFontSize

public int getParserMicroFontSize()
Confguration value for the html parser

Returns:
See Also:
SpamHTMLParser.getMicroFontSize()

setParserMicroFontSize

public void setParserMicroFontSize(int parserMicroFontSize)
Confguration value for the html parser

Parameters:
parserMicroFontSize -
See Also:
SpamHTMLParser.setMicroFontSize(int)