|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.questionanalysis.atype.AnswerType
public class AnswerType
A basic class which contains hierarchical answer type information.
| Field Summary | |
|---|---|
protected double |
confidence
|
protected int |
level
the level in an answer type hierarchy, 1 being the top level answer type, 2 being the first subtype level, etc |
private static long |
serialVersionUID
|
protected java.util.List<AnswerType> |
subtypes
|
protected java.lang.String |
type
|
| Constructor Summary | |
|---|---|
AnswerType(int level,
double confidence,
java.lang.String type)
Constructs an Answer Type object. |
|
AnswerType(int level,
double confidence,
java.lang.String type,
java.util.List<AnswerType> subtypes)
Constructs an Answer Type object with pre-defined list of subtypes. |
|
| Method Summary | |
|---|---|
static AnswerType |
constructFromString(java.lang.String answerTypeStr)
Construct answer type from a String that looks like NUMEX.MONEY This string cannot have multiple types at any level (e.g NUMEX|PERSON not allowed) Any number of "." |
boolean |
equals(java.lang.Object obj)
|
double |
getConfidence()
|
java.lang.String |
getFullType(int classLevels)
|
int |
getLevel()
|
java.util.List<AnswerType> |
getSubtypes()
|
java.lang.String |
getType()
|
int |
hashCode()
|
boolean |
isTopLevel()
|
void |
setConfidence(double confidence)
|
void |
setLevel(int level)
Sets the Answer Type level |
void |
setSubtypes(java.util.List<AnswerType> subtypes)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
protected int level
protected double confidence
protected java.lang.String type
protected java.util.List<AnswerType> subtypes
| Constructor Detail |
|---|
public AnswerType(int level,
double confidence,
java.lang.String type)
level - A int indicating the level of this answer type in answer
type hierarchyconfidence - A double indicating the confidence scoretype - A String indicating the type
public AnswerType(int level,
double confidence,
java.lang.String type,
java.util.List<AnswerType> subtypes)
level - A int indicating the level of this answer type in answer
type hierarchyconfidence - A double indicating the confidence scoretype - A String indicating the typesubtypes - A List containing subtype information about the current
answer type| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int getLevel()
public boolean isTopLevel()
public void setLevel(int level)
level - the answer type levelpublic java.lang.String getType()
public double getConfidence()
public java.util.List<AnswerType> getSubtypes()
public void setConfidence(double confidence)
public void setSubtypes(java.util.List<AnswerType> subtypes)
public java.lang.String getFullType(int classLevels)
public static AnswerType constructFromString(java.lang.String answerTypeStr)
This string cannot have multiple types at any level (e.g NUMEX|PERSON not allowed) Any number of "."-separated subtypes can be present. Subtypes called DEFAULT are ignored.
answerTypeStr - the String from which to construct an AnswerType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||