info.ephyra.questionanalysis.atype
Class WordNetAnswerTypeMapping

java.lang.Object
  extended by info.ephyra.questionanalysis.atype.WordNetAnswerTypeMapping

public class WordNetAnswerTypeMapping
extends java.lang.Object

Uses WordNet to map question focus terms to answer types.

Version:
2008-02-10
Author:
Justin Betteridge

Field Summary
private static java.util.Comparator<AnswerType> atypeComparator
           
private static boolean initialized
           
private static org.apache.log4j.Logger log
           
private static net.didion.jwnl.data.PointerUtils pUtils
           
private static java.util.Map<java.lang.String,java.lang.String> wnAtypeMap
           
private static java.util.List<java.lang.String> wnAtypeMapKeys
           
 
Constructor Summary
WordNetAnswerTypeMapping()
           
 
Method Summary
private static java.lang.String buildSynsetString(net.didion.jwnl.data.Synset node)
           
private static AnswerType findWnMapMatch(net.didion.jwnl.data.Synset synset, int level)
           
static java.lang.String getAnswerType(edu.cmu.lti.javelin.qa.Term focusTerm)
           
static void initialize()
          Initializes static resources.
static boolean isInitialized()
           
static void setInitialized(boolean init)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static final org.apache.log4j.Logger log

wnAtypeMap

private static java.util.Map<java.lang.String,java.lang.String> wnAtypeMap

wnAtypeMapKeys

private static java.util.List<java.lang.String> wnAtypeMapKeys

pUtils

private static net.didion.jwnl.data.PointerUtils pUtils

initialized

private static boolean initialized

atypeComparator

private static java.util.Comparator<AnswerType> atypeComparator
Constructor Detail

WordNetAnswerTypeMapping

public WordNetAnswerTypeMapping()
Method Detail

initialize

public static void initialize()
                       throws java.lang.Exception
Initializes static resources. The input properties that must be defined are:

Throws:
java.lang.Exception - if one of the required properties is not defined.

isInitialized

public static boolean isInitialized()

setInitialized

public static void setInitialized(boolean init)

getAnswerType

public static java.lang.String getAnswerType(edu.cmu.lti.javelin.qa.Term focusTerm)

findWnMapMatch

private static AnswerType findWnMapMatch(net.didion.jwnl.data.Synset synset,
                                         int level)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

buildSynsetString

private static java.lang.String buildSynsetString(net.didion.jwnl.data.Synset node)