info.ephyra.questionanalysis
Class QuestionAnalysis

java.lang.Object
  extended by info.ephyra.questionanalysis.QuestionAnalysis

public class QuestionAnalysis
extends java.lang.Object

Analyzes a question string:

Version:
2008-01-23
Author:
Nico Schlaefer

Field Summary
private static java.lang.String context
          String providing additional contextual information on the question.
private static java.util.ArrayList<Dictionary> dicts
          Dictionaries for term extraction.
private static java.util.ArrayList<Ontology> ontologies
          Ontologies for term expansion.
private static Predicate[] predicates
          Predicates used instead of extracting predicates from the question.
private static QuestionClassifier qc
          Question Classifier for determining the answer type.
 
Constructor Summary
QuestionAnalysis()
           
 
Method Summary
static void addDictionary(Dictionary dict)
          Registers a Dictionary.
static void addOntology(Ontology ontology)
          Registers an Ontology.
static AnalyzedQuestion analyze(java.lang.String question)
          Analyzes a question string.
static void clearContext()
          Clears the context string.
static void clearDictionaries()
          Unregisters all Dictionaries.
static void clearOntologies()
          Unregisters all Ontologies.
static void clearPredicates()
          Clears the predicates.
private static java.lang.String[] getAtypes(java.lang.String question)
           
static java.lang.String getContext()
          Returns the context string.
static Dictionary[] getDictionaries()
          Returns the Dictionaries.
static Ontology[] getOntologies()
          Returns the Ontologies.
static Predicate[] getPredicates()
          Returns the predicates.
static void main(java.lang.String[] args)
           
static void setContext(java.lang.String context)
          Sets the context string.
static void setPredicates(Predicate[] predicates)
          Sets predicates that are used instead of extracting predicates from the question.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dicts

private static java.util.ArrayList<Dictionary> dicts
Dictionaries for term extraction.


ontologies

private static java.util.ArrayList<Ontology> ontologies
Ontologies for term expansion.


qc

private static QuestionClassifier qc
Question Classifier for determining the answer type.


context

private static java.lang.String context
String providing additional contextual information on the question.


predicates

private static Predicate[] predicates
Predicates used instead of extracting predicates from the question.

Constructor Detail

QuestionAnalysis

public QuestionAnalysis()
Method Detail

addDictionary

public static void addDictionary(Dictionary dict)
Registers a Dictionary.

Parameters:
dict - a dictionary

addOntology

public static void addOntology(Ontology ontology)
Registers an Ontology.

Parameters:
ontology - an ontology

getDictionaries

public static Dictionary[] getDictionaries()
Returns the Dictionaries.

Returns:
dictionaries

getOntologies

public static Ontology[] getOntologies()
Returns the Ontologies.

Returns:
ontologies

clearDictionaries

public static void clearDictionaries()
Unregisters all Dictionaries.


clearOntologies

public static void clearOntologies()
Unregisters all Ontologies.


setContext

public static void setContext(java.lang.String context)
Sets the context string.

Parameters:
context - context string

getContext

public static java.lang.String getContext()
Returns the context string.

Returns:
context string

clearContext

public static void clearContext()
Clears the context string.


setPredicates

public static void setPredicates(Predicate[] predicates)
Sets predicates that are used instead of extracting predicates from the question.

Parameters:
predicates - the predicates

getPredicates

public static Predicate[] getPredicates()
Returns the predicates.

Returns:
the predicates

clearPredicates

public static void clearPredicates()
Clears the predicates.


getAtypes

private static java.lang.String[] getAtypes(java.lang.String question)

analyze

public static AnalyzedQuestion analyze(java.lang.String question)
Analyzes a question string.

Parameters:
question - question string
Returns:
analyzed question

main

public static void main(java.lang.String[] args)