edu.washington.cs.knowitall.nlp.extraction
Class ChunkedBinaryExtraction

java.lang.Object
  extended by edu.washington.cs.knowitall.nlp.extraction.SpanExtraction
      extended by edu.washington.cs.knowitall.nlp.extraction.ChunkedBinaryExtraction
Direct Known Subclasses:
LabeledBinaryExtraction, NormalizedBinaryExtraction

public class ChunkedBinaryExtraction
extends SpanExtraction

Represents a binary extraction from a ChunkedSentence. A binary extraction has three parts: two arguments (arg1 and arg2) and a relation (rel). Each of these parts corresponds to a disjoint span of words in a sentence. The relation is represented as a ChunkedExtraction object, and the two arguments are represented as ChunkedArgumentExtraction objects.

Author:
afader

Field Summary
static String ARG1
          The field name for the first argument (see SpanExtraction).
static String ARG2
          The field name for the second argument (see SpanExtraction)
static String REL
          The field name for the relation (see SpanExtraction).
 
Constructor Summary
ChunkedBinaryExtraction(ChunkedExtraction rel, ChunkedArgumentExtraction arg1, ChunkedArgumentExtraction arg2)
          Constructs a new instance using the given relation and arguments.
 
Method Summary
 ChunkedArgumentExtraction getArgument1()
           
 ChunkedArgumentExtraction getArgument2()
           
 Iterable<String> getChunkTags()
           
 Iterable<Integer> getIndices()
           
 Iterable<String> getPosTags()
           
 ChunkedExtraction getRelation()
           
 Iterable<String> getTokens()
           
static Collection<ChunkedBinaryExtraction> productOfArgs(ChunkedExtraction rel, Iterable<? extends ChunkedArgumentExtraction> arg1s, Iterable<? extends ChunkedArgumentExtraction> arg2s)
          Given a collection of arg1s, a collection of arg2s, and a relation, returns all (arg1, rel, arg2) extractions, where arg1 and arg2 range over the given collections.
static Collection<ChunkedBinaryExtraction> productOfArgs(ChunkedExtraction rel, Iterable<? extends ChunkedArgumentExtraction> arg1s, Iterable<? extends ChunkedArgumentExtraction> arg2s, boolean allowUnaryRelations)
          Given a collection of arg1s, a collection of arg2s, and a relation, returns all (arg1, rel, arg2) extractions, where arg1 and arg2 range over the given collections.
 String toString()
           
 
Methods inherited from class edu.washington.cs.knowitall.nlp.extraction.SpanExtraction
equals, getField, getField, getFieldName, getFieldNames, getFieldRange, getFieldRange, getFieldRanges, getFields, getNumFields, getProperties, getProperty, getPropertyNames, getSentence, hasField, hashCode, hasProperty, setProperties, setProperty, toBIOLayer
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ARG1

public static final String ARG1
The field name for the first argument (see SpanExtraction).

See Also:
Constant Field Values

REL

public static final String REL
The field name for the relation (see SpanExtraction).

See Also:
Constant Field Values

ARG2

public static final String ARG2
The field name for the second argument (see SpanExtraction)

See Also:
Constant Field Values
Constructor Detail

ChunkedBinaryExtraction

public ChunkedBinaryExtraction(ChunkedExtraction rel,
                               ChunkedArgumentExtraction arg1,
                               ChunkedArgumentExtraction arg2)
Constructs a new instance using the given relation and arguments. The relation and arguments must all be from the same sentence.

Parameters:
rel -
arg1 -
arg2 -
Method Detail

getArgument1

public ChunkedArgumentExtraction getArgument1()
Returns:
the first argument

getRelation

public ChunkedExtraction getRelation()
Returns:
the relation

getArgument2

public ChunkedArgumentExtraction getArgument2()
Returns:
the second argument

getIndices

public Iterable<Integer> getIndices()

getTokens

public Iterable<String> getTokens()

getPosTags

public Iterable<String> getPosTags()

getChunkTags

public Iterable<String> getChunkTags()

toString

public String toString()
Overrides:
toString in class Object

productOfArgs

public static Collection<ChunkedBinaryExtraction> productOfArgs(ChunkedExtraction rel,
                                                                Iterable<? extends ChunkedArgumentExtraction> arg1s,
                                                                Iterable<? extends ChunkedArgumentExtraction> arg2s)
Given a collection of arg1s, a collection of arg2s, and a relation, returns all (arg1, rel, arg2) extractions, where arg1 and arg2 range over the given collections.

Parameters:
rel -
arg1s -
arg2s -
Returns:

productOfArgs

public static Collection<ChunkedBinaryExtraction> productOfArgs(ChunkedExtraction rel,
                                                                Iterable<? extends ChunkedArgumentExtraction> arg1s,
                                                                Iterable<? extends ChunkedArgumentExtraction> arg2s,
                                                                boolean allowUnaryRelations)
Given a collection of arg1s, a collection of arg2s, and a relation, returns all (arg1, rel, arg2) extractions, where arg1 and arg2 range over the given collections.

Parameters:
rel -
arg1s -
arg2s -
Returns:


Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.