edu.washington.cs.knowitall.extractor.mapper
Class NormalizedRelationDictionaryFilter

java.lang.Object
  extended by edu.washington.cs.knowitall.extractor.mapper.Mapper<T>
      extended by edu.washington.cs.knowitall.extractor.mapper.FilterMapper<ChunkedExtraction>
          extended by edu.washington.cs.knowitall.extractor.mapper.NormalizedRelationDictionaryFilter

public class NormalizedRelationDictionaryFilter
extends FilterMapper<ChunkedExtraction>

A class used to filter out any relations whose normalized form does not appear in the given dictionary. Relation strings are normalized using the VerbalRelationNormalizer class.

Author:
afader

Constructor Summary
NormalizedRelationDictionaryFilter(java.util.HashSet<java.lang.String> relations)
          Constructs a new filter using the String relations in the given set.
 
Method Summary
 boolean doFilter(ChunkedExtraction extr)
          Returns true if the tokens in the given extraction appear in the set of relations passed to the constructor.
 
Methods inherited from class edu.washington.cs.knowitall.extractor.mapper.FilterMapper
doMap
 
Methods inherited from class edu.washington.cs.knowitall.extractor.mapper.Mapper
disable, enable, isEnabled, map
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NormalizedRelationDictionaryFilter

public NormalizedRelationDictionaryFilter(java.util.HashSet<java.lang.String> relations)
Constructs a new filter using the String relations in the given set. These relations should be normalized using the VerbalRelationNormalizer class, with a space between each token in the string.

Parameters:
relations -
Method Detail

doFilter

public boolean doFilter(ChunkedExtraction extr)
Returns true if the tokens in the given extraction appear in the set of relations passed to the constructor.

Specified by:
doFilter in class FilterMapper<ChunkedExtraction>