standup.joke
Class FLevel

java.lang.Object
  extended by standup.joke.FLevel

public class FLevel
extends Object

Abstractly, an FLevel defines a subset of all jokes possibly generated by the STANDUP joke generated based on a threshold of familiarity scores.

Each FLevel defines a pair of FClass values that act as minimum thresholds for the Lexemes in the question and answer of a joke respectively. If the keywords in the question and answer of a joke satisfy these thresholds, the joke satisfies that FLevel.

Aside from defining various methods available to an instance of an FLevel, this method also defines 9 predetermined FLevels, i.e. fl1 to fl9:

FLevel Question FClass Answer FClass
fl1 FClass.fc1 FClass.fc1
fl2 FClass.fc1 FClass.fc2
fl3 FClass.fc2 FClass.fc2
fl4 FClass.fc2 FClass.fc3
fl5 FClass.fc3 FClass.fc3
fl6 FClass.fc3 FClass.fc4
fl7 FClass.fc4 FClass.fc4
fl8 FClass.fc4 FClass.fc5
fl9 FClass.fc5 FClass.fc5

Author:
Ruli Manurung
See Also:
Lexeme.getFamiliarityScore(), FLevel

Field Summary
private  FClass answerFClass
          The minimum threshold FScore frequency allowable by this constraint for answer lexemes.
static FLevel fl1
           
static FLevel fl2
           
static FLevel fl3
           
static FLevel fl4
           
static FLevel fl5
           
static FLevel fl6
           
static FLevel fl7
           
static FLevel fl8
           
static FLevel fl9
           
private  String label
           
private  FClass questionFClass
          The minimum threshold FScore allowable by this constraint for question lexemes.
 
Constructor Summary
FLevel(String l, FClass fq, FClass fa)
           
 
Method Summary
 FClass getAnswerFClass()
           
static FLevel getFLevel(float fcQ, float fcA)
           
static FLevel getFLevel(String label)
           
 FClass getQuestionFClass()
           
 String toString()
           
 boolean validFClasses(float fcQ, float fcA)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

answerFClass

private final FClass answerFClass
The minimum threshold FScore frequency allowable by this constraint for answer lexemes.


questionFClass

private final FClass questionFClass
The minimum threshold FScore allowable by this constraint for question lexemes.


label

private final String label

fl1

public static final FLevel fl1

fl2

public static final FLevel fl2

fl3

public static final FLevel fl3

fl4

public static final FLevel fl4

fl5

public static final FLevel fl5

fl6

public static final FLevel fl6

fl7

public static final FLevel fl7

fl8

public static final FLevel fl8

fl9

public static final FLevel fl9
Constructor Detail

FLevel

FLevel(String l,
       FClass fq,
       FClass fa)
Method Detail

getAnswerFClass

public FClass getAnswerFClass()

getQuestionFClass

public FClass getQuestionFClass()

toString

public String toString()
Overrides:
toString in class Object

validFClasses

public boolean validFClasses(float fcQ,
                             float fcA)

getFLevel

public static FLevel getFLevel(String label)

getFLevel

public static FLevel getFLevel(float fcQ,
                               float fcA)