edu.columbia.cs.cg.prdualrank.inference
Class InferencePRDualRank<T extends Matchable,D extends Document>

java.lang.Object
  extended by edu.columbia.cs.cg.prdualrank.inference.InferencePRDualRank<T,D>

public class InferencePRDualRank<T extends Matchable,D extends Document>
extends java.lang.Object

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

Defines the inference procedure to rank patterns as described in PRDualRank paper.
For more information, please read the Inference formulas QuestP and QuestR in Figure 4 of the mentioned paper.

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

Constructor Summary
InferencePRDualRank()
           
 
Method Summary
 java.util.SortedSet<Pattern<T,D>> getRankedPatterns()
          Gets the ranked patterns according to the pattern ranking function.
 java.util.SortedSet<Relationship> getRankedTuples()
          Gets the ranked tuples.
 void rank(PRDualRankGraph<T,D> gs, RankFunction<Pattern<T,D>> patternRankFunction, RankFunction<Relationship> tupleRankFunction, QuestCalculator<T,D> questCalculator)
          Ranks the patterns and tuples in the graph based on the specified ranking function, using the passed questCalculator.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InferencePRDualRank

public InferencePRDualRank()
Method Detail

rank

public void rank(PRDualRankGraph<T,D> gs,
                 RankFunction<Pattern<T,D>> patternRankFunction,
                 RankFunction<Relationship> tupleRankFunction,
                 QuestCalculator<T,D> questCalculator)
Ranks the patterns and tuples in the graph based on the specified ranking function, using the passed questCalculator.

Parameters:
gs - the graph connecting tuples and patterns.
patternRankFunction - the pattern rank function used to rank patterns.
tupleRankFunction - the tuple rank function used to rank tuples.
questCalculator - the quest calculator used to calculate the required metrics (precision or recall in this case)

getRankedTuples

public java.util.SortedSet<Relationship> getRankedTuples()
Gets the ranked tuples.

Returns:
the ranked tuples according to the tuple ranking function.

getRankedPatterns

public java.util.SortedSet<Pattern<T,D>> getRankedPatterns()
Gets the ranked patterns according to the pattern ranking function.

Returns:
the ranked patterns