|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object standup.lexicon.FClass
public class FClass
Abstractly, an FClass
defines a subset of the STANDUP lexicon based
on a threshold of familiarity scores.
Each FClass
has an F-score threshold value, which determines
whether a Lexeme
belongs to that FClass
or not. If a
Lexeme
's F-score is equal to or higher than an FClass
'
threshold, it belongs to that FClass
.
Aside from defining various methods available to an instance of an
FClass
, this method also defines five predetermined FClass
es,
i.e. fc1
to fc5
, which are used to define the
standup.joke.FLevel
s used in joke generation:
FClass | F-score threshold |
fc1 | 0.61 |
fc2 | 0.45 |
fc3 | 0.26 |
fc4 | 0.13 |
fc5 | 0 |
Lexeme.getFamiliarityScore()
Field Summary | |
---|---|
static FClass |
fc1
|
static FClass |
fc2
|
static FClass |
fc3
|
static FClass |
fc4
|
static FClass |
fc5
|
(package private) float |
fScoreThreshold
|
(package private) String |
label
|
Constructor Summary | |
---|---|
FClass(String l,
float f)
Constructor for a new FClass . |
Method Summary | |
---|---|
boolean |
equals(Object obj)
|
static FClass |
getFClass(float fScore)
Returns the predefined FClass (i.e. |
static FClass |
getFClass(Lexeme lex)
Returns the predefined FClass (i.e. |
(package private) String |
getLabel()
Returns the label of this FClass |
float |
getThreshold()
Returns the F-score threshold of this FClass |
int |
hashCode()
|
String |
toString()
|
boolean |
validLexeme(Lexeme lexeme)
Returns true if the given Lexeme 's F-score is equal to
or higher than this FClass ' threshold, false otherwise. |
boolean |
validScore(float score)
Returns true if the given score is equal to or higher than this
FClass ' threshold, false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final FClass fc1
public static final FClass fc2
public static final FClass fc3
public static final FClass fc4
public static final FClass fc5
final String label
final float fScoreThreshold
Constructor Detail |
---|
public FClass(String l, float f)
FClass
.
l
- the label for the new FClass
f
- the F-score threshold for the new FClass
Method Detail |
---|
public float getThreshold()
FClass
String getLabel()
FClass
public String toString()
toString
in class Object
public boolean validScore(float score)
true
if the given score is equal to or higher than this
FClass
' threshold, false
otherwise.
score
-
public boolean validLexeme(Lexeme lexeme)
true
if the given Lexeme
's F-score is equal to
or higher than this FClass
' threshold, false
otherwise.
lexeme
-
public static FClass getFClass(float fScore)
FClass
(i.e. from fc1
to
fc5
) with the highest threshold value that is equal to or
less than the given F-score.
fScore
-
public static FClass getFClass(Lexeme lex)
FClass
(i.e. from fc1
to
fc5
) with the highest threshold value that is equal to or
less than the given Lexeme
's F-score.
lex
-
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |