info.ephyra.querygeneration.generators
Class BagOfTermsG

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

public class BagOfTermsG
extends QueryGenerator

The BagOfTermsG query generator creates a query from the terms 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 terms" queries.
 
Constructor Summary
BagOfTermsG()
           
 
Method Summary
 Query[] generateQueries(AnalyzedQuestion aq)
          Generates a "bag of terms" query from the terms in the question string.
private  java.lang.String getQueryString(Term[] terms, java.lang.String[] kws)
          Forms a query string from the terms and 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 terms" 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

BagOfTermsG

public BagOfTermsG()
Method Detail

getQueryString

private java.lang.String getQueryString(Term[] terms,
                                        java.lang.String[] kws)
Forms a query string from the terms and 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 terms" query from the terms in the question string.

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