edu.washington.cs.knowitall.nlp.extraction
Class ChunkedBinaryExtraction
java.lang.Object
edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction
- All Implemented Interfaces:
- Extraction<ChunkedSentence>
- Direct Known Subclasses:
- LabeledBinaryExtraction
public class ChunkedBinaryExtraction
- extends java.lang.Object
- implements Extraction<ChunkedSentence>
An Extraction
representing a binary extraction with noun phrase arguments. The relation is
represented as a NpChunkedExtraction
object and the arguments are represented as
NpChunkArgumentExtraction
objects.
- Author:
- afader
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
ChunkedBinaryExtraction
public ChunkedBinaryExtraction(ChunkedExtraction relation,
ChunkedArgumentExtraction argument1,
ChunkedArgumentExtraction argument2)
- Constructs a new
NpChunkedBinaryExtraction
with the given relation and arguments.
- Parameters:
relation
- argument1
- argument2
-
productOfArgs
public static java.util.Collection<ChunkedBinaryExtraction> productOfArgs(ChunkedExtraction rel,
java.lang.Iterable<? extends ChunkedArgumentExtraction> arg1s,
java.lang.Iterable<? extends ChunkedArgumentExtraction> arg2s)
- Constructs a collection of
NpChunkedBinaryExtraction
objects with arguments given by
the cross product of arg1s
with arg2s
, and relation rel
.
- Parameters:
rel
- arg1s
- arg2s
-
- Returns:
- a collection of binary extractions with relation
rel
and arguments from arg1s
and arg2s
.
getSource
public ChunkedSentence getSource()
- Specified by:
getSource
in interface Extraction<ChunkedSentence>
- Returns:
- the source of this extraction.
getArgument1
public ChunkedArgumentExtraction getArgument1()
- Returns:
- the first argument of this extraction.
getRelation
public ChunkedExtraction getRelation()
- Returns:
- the relation of this extraction.
getArgument2
public ChunkedArgumentExtraction getArgument2()
- Returns:
- the second argument of this extraction.
getSentence
public ChunkedSentence getSentence()
- Returns:
- the sentence this extraction came from
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object