info.ephyra.querygeneration.generators
Class BagOfWordsG

java.lang.Object
  extended by info.ephyra.querygeneration.generators.QueryGenerator
      extended by info.ephyra.querygeneration.generators.BagOfWordsG

public class BagOfWordsG
extends QueryGenerator

The BagOfWordsG query generator creates a query from the keywords in the question string.

This class extends the class QueryGenerator.

Version:
2007-07-11
Author:
Nico Schlaefer

Field Summary
private static java.lang.String[] EXTRACTION_TECHNIQUES
          Answer extraction techniques for this query type.
private static float SCORE
          Score assigned to "bag of words" queries.
 
Constructor Summary
BagOfWordsG()
           
 
Method Summary
 Query[] generateQueries(AnalyzedQuestion aq)
          Generates a "bag of words" query from the keywords in the question string.
private  java.lang.String getQueryString(Term[] terms, java.lang.String[] kws)
          Forms a query string from the individual keywords.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SCORE

private static final float SCORE
Score assigned to "bag of words" queries.

See Also:
Constant Field Values

EXTRACTION_TECHNIQUES

private static final java.lang.String[] EXTRACTION_TECHNIQUES
Answer extraction techniques for this query type.

Constructor Detail

BagOfWordsG

public BagOfWordsG()
Method Detail

getQueryString

private java.lang.String getQueryString(Term[] terms,
                                        java.lang.String[] kws)
Forms a query string from the individual keywords.

Parameters:
terms - terms in the question
kws - keywords in the question
Returns:
query string

generateQueries

public Query[] generateQueries(AnalyzedQuestion aq)
Generates a "bag of words" query from the keywords in the question string.

Specified by:
generateQueries in class QueryGenerator
Parameters:
aq - analyzed question
Returns:
Query objects