|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.OpenEphyra
public class OpenEphyra
OpenEphyra is an open framework for question answering (QA).
| Field Summary | |
|---|---|
protected java.lang.String |
dir
The directory of Ephyra, required when Ephyra is used as an API. |
protected static float |
FACTOID_ABS_THRESH
Absolute threshold for factoid question scores. |
protected static int |
FACTOID_MAX_ANSWERS
Maximum number of factoid answers. |
protected static float |
LIST_REL_THRESH
Relative threshold for list question scores (fraction of top score). |
static java.lang.String |
NORMALIZER
Serialized classifier for score normalization. |
| Constructor Summary | |
|---|---|
protected |
OpenEphyra()
Creates a new instance of Ephyra and initializes the system. |
|
OpenEphyra(java.lang.String dir)
Creates a new instance of Ephyra and initializes the system. |
| Method Summary | |
|---|---|
Result |
askFactoid(java.lang.String question)
Asks Ephyra a factoid question and returns a single result or null if no answer could be found. |
Result[] |
askFactoid(java.lang.String question,
int maxAnswers,
float absThresh)
Asks Ephyra a factoid question and returns up to maxAnswers
results that have a score of at least absThresh. |
Result[] |
askList(java.lang.String question,
float relThresh)
Asks Ephyra a list question and returns results that have a score of at least relThresh * top score. |
void |
commandLine()
A command line interface for Ephyra. |
java.lang.String |
getDir()
Returns the directory of the Ephyra engine. |
protected void |
initFactoid()
Initializes the pipeline for factoid questions. |
static void |
main(java.lang.String[] args)
Entry point of Ephyra. |
protected java.lang.String |
readLine()
Reads a line from the command prompt. |
protected Result[] |
runPipeline(AnalyzedQuestion aq,
int maxAnswers,
float absThresh)
Runs the pipeline on a factoid question and returns an array of up to maxAnswers results that have a score of at least
absThresh. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int FACTOID_MAX_ANSWERS
protected static final float FACTOID_ABS_THRESH
protected static final float LIST_REL_THRESH
public static final java.lang.String NORMALIZER
protected java.lang.String dir
| Constructor Detail |
|---|
protected OpenEphyra()
Creates a new instance of Ephyra and initializes the system.
For use as a standalone system.
public OpenEphyra(java.lang.String dir)
Creates a new instance of Ephyra and initializes the system.
For use as an API.
dir - directory of Ephyra| Method Detail |
|---|
public static void main(java.lang.String[] args)
args - command line arguments are ignoredprotected java.lang.String readLine()
protected void initFactoid()
protected Result[] runPipeline(AnalyzedQuestion aq,
int maxAnswers,
float absThresh)
maxAnswers results that have a score of at least
absThresh.
aq - analyzed questionmaxAnswers - maximum number of answersabsThresh - absolute threshold for scores
public java.lang.String getDir()
public void commandLine()
A command line interface for Ephyra.
Repeatedly queries the user for a question, asks the system the question and prints out and logs the results.
The command exit can be used to quit the program.
public Result[] askFactoid(java.lang.String question,
int maxAnswers,
float absThresh)
maxAnswers
results that have a score of at least absThresh.
question - factoid questionmaxAnswers - maximum number of answersabsThresh - absolute threshold for scores
public Result askFactoid(java.lang.String question)
null if no answer could be found.
question - factoid question
null
public Result[] askList(java.lang.String question,
float relThresh)
relThresh * top score.
question - list questionrelThresh - relative threshold for scores
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||