|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object standup.joke.InstantiationConstraintFamiliarityScore
public class InstantiationConstraintFamiliarityScore
An InstantiationConstraint
that constrains the minimum familiarity scores
found in the keyword instantiations of a joke.
Lexeme.getFamiliarityScore()
Field Summary | |
---|---|
(package private) float |
answerThreshold
The minimum threshold FScore frequency allowable by this constraint for answer lexemes. |
(package private) float |
questionThreshold
The minimum threshold FScore allowable by this constraint for question lexemes. |
Constructor Summary | |
---|---|
InstantiationConstraintFamiliarityScore(float _q,
float _a)
Constructor is very simple -- just provide the two threshold values: the first for the question lexemes, and the second for the answer lexemes. |
Method Summary | |
---|---|
String |
getSQLConstraint(Clause s,
List<SQLSelectElement> taqlsses)
Returns an SQL code snippet that is to be appended to the WHERE clause of the SQL query when instantiating the given Clause . |
void |
handleSchema(SQLQuerySchema schemaSQLQuery)
Modifies the given SQLQuerySchema to reflect this constraint. |
String |
toString()
|
boolean |
validate(JokeStructure j)
Returns true if the given JokeStructure satisfies this
constraint, and false if not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
float questionThreshold
float answerThreshold
Constructor Detail |
---|
public InstantiationConstraintFamiliarityScore(float _q, float _a)
_q
- Question lexeme FScore threshold_a
- Answer lexeme FScore thresholdMethod Detail |
---|
public void handleSchema(SQLQuerySchema schemaSQLQuery)
InstantiationConstraint
SQLQuerySchema
to reflect this constraint.
handleSchema
in interface InstantiationConstraint
public String getSQLConstraint(Clause s, List<SQLSelectElement> taqlsses)
InstantiationConstraint
Clause
.
getSQLConstraint
in interface InstantiationConstraint
s
- the Clause
being instantiated.
public boolean validate(JokeStructure j)
JokeConstraint
true
if the given JokeStructure
satisfies this
constraint, and false
if not.
validate
in interface JokeConstraint
j
- the JokeStructure
being validated
true
if j
satisfies this constraint,
false
otherwise.public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |