org.eml.sir.retr
Class QueryGenerator

java.lang.Object
  extended byorg.eml.sir.retr.QueryGenerator

public class QueryGenerator
extends java.lang.Object

Generates queries by a SirDiscourse and settings.

Author:
Hendrik Niederlich (EML-R)

Field Summary
static int CONT_BASE
          Constant for content of QueryGenerator.
static int CONT_WORD
          Constant for content of QueryGenerator.
 
Constructor Summary
QueryGenerator()
          Create a new instance of QueryGenerator.
 
Method Summary
 int getAvoidNegativeProfFeatures()
          Return wether this QueryGenerator is deleting all terms that belong to negative professional features.
 int getBoostPositiveProfFeatures()
          If boost of positive professional features is activated (true), the positive professional feature terms will appear one more time.
 char getPosCategory()
          Return the part-of-speech category that affects the getWordList() and the getBaseList() methods.
 org.apache.lucene.search.Query getQuery(SirDiscourse disc, IndexProperties props)
          Return query.
 int getUseWordsOrBases()
          Return wether to use words or bases.
 boolean isIgnoreIrrelevantClauses()
          Return wether this QueryGenerator ignores irrelevant clauses.
 boolean isTermRepeat()
          Return wether to repeat terms in queries or not.
 boolean isUsingPhrases()
          Return wether this QueryGenerator is using nominal phrases additionally.
 void setAvoidNegativeProfFeatures(int avoidNegativeProfFeatures)
          Delete all terms that belong to negative professional features.
 void setBoostPositiveProfFeatures(int boostPositiveProfFeatures)
          Return wether positive professional features are boosted.
 void setIgnoreIrrelevantClauses(boolean ignoreIrrelevantClauses)
          Set wether this QueryGenerator has to ignore irrelevant clauses.
 void setPosCategory(char posCategory)
          Set the part-of-speech category that affects the getWordList() and the getBaseList() methods.
 void setTermRepeat(boolean termRepeat)
           
 void setUsePhrases(boolean usePhrases)
          Set wether to use nominal phrases additionally or not.
 void setUseWordsOrBases(int wordsOrBases)
          Set wether to use words or bases.
 java.lang.String toString()
          Return a String that contains important information about this instance of QueryGenerator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONT_WORD

public static final int CONT_WORD
Constant for content of QueryGenerator. Content is words.

See Also:
Constant Field Values

CONT_BASE

public static final int CONT_BASE
Constant for content of QueryGenerator. Content is bases.

See Also:
Constant Field Values
Constructor Detail

QueryGenerator

public QueryGenerator()
Create a new instance of QueryGenerator.

Method Detail

getPosCategory

public char getPosCategory()
Return the part-of-speech category that affects the getWordList() and the getBaseList() methods.


setPosCategory

public void setPosCategory(char posCategory)
Set the part-of-speech category that affects the getWordList() and the getBaseList() methods.


isUsingPhrases

public boolean isUsingPhrases()
Return wether this QueryGenerator is using nominal phrases additionally.


setUsePhrases

public void setUsePhrases(boolean usePhrases)
Set wether to use nominal phrases additionally or not.


getUseWordsOrBases

public int getUseWordsOrBases()
Return wether to use words or bases.


setUseWordsOrBases

public void setUseWordsOrBases(int wordsOrBases)
Set wether to use words or bases.


isTermRepeat

public boolean isTermRepeat()
Return wether to repeat terms in queries or not. If boost of positive professional features is activated, the positive professional feature terms will appear one more time. That is the way of boosting them.


setTermRepeat

public void setTermRepeat(boolean termRepeat)
Parameters:
termRepeat - The term repeat to set. Wird gemacht nachdem alle Wörter aus dem Discourse entnommen wurden, aber bevor geboostet oder avoidet wird.

isIgnoreIrrelevantClauses

public boolean isIgnoreIrrelevantClauses()
Return wether this QueryGenerator ignores irrelevant clauses.


setIgnoreIrrelevantClauses

public void setIgnoreIrrelevantClauses(boolean ignoreIrrelevantClauses)
Set wether this QueryGenerator has to ignore irrelevant clauses.


getAvoidNegativeProfFeatures

public int getAvoidNegativeProfFeatures()
Return wether this QueryGenerator is deleting all terms that belong to negative professional features.


setAvoidNegativeProfFeatures

public void setAvoidNegativeProfFeatures(int avoidNegativeProfFeatures)
Delete all terms that belong to negative professional features.


getBoostPositiveProfFeatures

public int getBoostPositiveProfFeatures()
If boost of positive professional features is activated (true), the positive professional feature terms will appear one more time. That is the way of boosting them.


setBoostPositiveProfFeatures

public void setBoostPositiveProfFeatures(int boostPositiveProfFeatures)
Return wether positive professional features are boosted.


getQuery

public org.apache.lucene.search.Query getQuery(SirDiscourse disc,
                                               IndexProperties props)
Return query.


toString

public java.lang.String toString()
Return a String that contains important information about this instance of QueryGenerator.