edu.columbia.cs.cg.prdualrank.searchengine.querygenerator.impl
Class ConcatQueryGenerator

java.lang.Object
  extended by edu.columbia.cs.cg.prdualrank.searchengine.querygenerator.QueryGenerator<java.lang.String>
      extended by edu.columbia.cs.cg.prdualrank.searchengine.querygenerator.impl.ConcatQueryGenerator

public class ConcatQueryGenerator
extends QueryGenerator<java.lang.String>

For this Class, Apache Lucene Engine is required.
This class is used for our implementation of: "Searching Patterns for Relation Extraction over the Web: Rediscovering the Pattern-Relation Duality" . Y. Fang and K. C.-C. Chang. In WSDM, pages 825-834, 2011. For further information, WSDM 2011 Conference Website .

Description

Query generator based in the simple concatenation of the strings to be searched.
For instance, for a Relationship (Microsoft Corporation, Redmond Seattle), the generated query will be: "Microsoft Corporation Redmond Seattle".
Comment: Then, depending on how the search engine wants to divide it, it is how the query is going to be issued. One possibility is to send it as boolean query where a document will be a hit, if it contains all the words in the query (order does not matter)
For an Entity (Microsoft Corporation), the generated query will be: "Microsoft Corporation". To understand how the query is issued, please read the Comment above.

Since:
2011-10-07
Version:
0.1
Author:
Pablo Barrio, Goncalo Simoes
See Also:
WSDM 2011 Conference Website

Constructor Summary
ConcatQueryGenerator()
           
 
Method Summary
 java.lang.String generateQuery(Entity role)
          Generate query based on a specific entity
 java.lang.String generateQuery(Relationship relationship)
          Generate query based on a relationship (tuple)
 java.lang.String generateQuery(SearchPattern<Document,TokenizedDocument> pattern)
          Generate query based on a pattern that matches documents (i.e.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcatQueryGenerator

public ConcatQueryGenerator()
Method Detail

generateQuery

public java.lang.String generateQuery(Relationship relationship)
Description copied from class: QueryGenerator
Generate query based on a relationship (tuple)

Specified by:
generateQuery in class QueryGenerator<java.lang.String>
Parameters:
relationship - the relationship
Returns:
the q

generateQuery

public java.lang.String generateQuery(Entity role)
Description copied from class: QueryGenerator
Generate query based on a specific entity

Specified by:
generateQuery in class QueryGenerator<java.lang.String>
Parameters:
role - the role
Returns:
the q

generateQuery

public java.lang.String generateQuery(SearchPattern<Document,TokenizedDocument> pattern)
Description copied from class: QueryGenerator
Generate query based on a pattern that matches documents (i.e. Search Patterns)

Specified by:
generateQuery in class QueryGenerator<java.lang.String>
Parameters:
pattern - the pattern
Returns:
the q