Adding Query Generation Techniques

The query generation stage in Ephyra's pipeline is organized as a set of query generator components. A query generator transforms an analyzed question into one or more query strings. A new query generation technique can be integrated by adding one of these query generators:

  • Extend the class info.ephyra.querygeneration.generators.QueryGenerator. We recommend to append the suffix G to the class name and to add your new class to the package info.ephyra.querygeneration.generators.
  • Implement the method generateQueries(AnalyzedQuestion). Refer to existing query generators for examples.
  • Finally, you need to add your query generator to one of the init-methods in the main class that you are running. For instance, let us assume that you have developed a new query generation technique for factoid questions, and that you have named your query generator MyQueryG. Then you would add the following line to the query generation part of the initFactoid() method in your main class:
    QueryGeneration.addQueryGenerator(new MyQueryG());

Comments about this tutorial? Please email Nico Schlaefer.