|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.columbia.cs.cg.prdualrank.graph.PRDualRankGraph<T,D>
public class PRDualRankGraph<T extends Matchable,D extends Document>
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
The graph connecting patterns and tuples as defined in PRDualRank paper.
This graph associates a Matchable Object with a Document object storing the frequencies with which they occur in the data.
For more information about Graphs, see Section 4 of the mentioned paper.
Constructor Summary | |
---|---|
PRDualRankGraph()
Instantiates a new PRDualRank graph. |
Method Summary | |
---|---|
void |
addContext(Pattern<T,D> pattern,
Relationship tuple,
int frequency)
Adds a new connection between a pattern and a tuple. |
double |
getFreqency(Pattern<T,D> pattern)
Gets the total frequency of a pattern in the graph. |
int |
getFrequency(Relationship tuple)
Gets the total frequency of a tuple. |
int |
getMatchingFrequency(Pattern<T,D> pattern,
Relationship tuple)
Gets the matching frequency between a pattern and a tuple. |
int |
getMatchingFrequency(Relationship tuple,
Pattern<T,D> pattern)
Gets the matching frequency between a tuple and a pattern. |
java.util.Set<Pattern<T,D>> |
getMatchingPatterns(Relationship tuple)
Gets the matching patterns of a given tuple. |
java.util.Set<Relationship> |
getMatchingTuples(Pattern<T,D> pattern)
Gets the matching tuples given a pattern |
java.util.Set<Pattern<T,D>> |
getPatterns()
Gets the patterns from the graph. |
java.util.Set<Relationship> |
getTuples()
Gets the tuples from the graph. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PRDualRankGraph()
Method Detail |
---|
public void addContext(Pattern<T,D> pattern, Relationship tuple, int frequency)
pattern
- the pattern to be added in the graph.tuple
- the tuple to be connected to the pattern.frequency
- the frequency with which this context appears in the 'snippets'public java.util.Set<Pattern<T,D>> getPatterns()
public java.util.Set<Relationship> getTuples()
public int getMatchingFrequency(Pattern<T,D> pattern, Relationship tuple)
pattern
- the patterntuple
- the tuple
public java.util.Set<Relationship> getMatchingTuples(Pattern<T,D> pattern)
pattern
- the pattern
public double getFreqency(Pattern<T,D> pattern)
pattern
- the pattern
public int getFrequency(Relationship tuple)
tuple
- the tuple
public int getMatchingFrequency(Relationship tuple, Pattern<T,D> pattern)
tuple
- the tuplepattern
- the pattern
public java.util.Set<Pattern<T,D>> getMatchingPatterns(Relationship tuple)
tuple
- the tuple
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |