edu.washington.cs.knowitall.extractor.mapper
Class ReVerbRelationDictionaryFilter
java.lang.Object
edu.washington.cs.knowitall.extractor.mapper.Mapper<T>
edu.washington.cs.knowitall.extractor.mapper.FilterMapper<ChunkedExtraction>
edu.washington.cs.knowitall.extractor.mapper.ReVerbRelationDictionaryFilter
public class ReVerbRelationDictionaryFilter
- extends FilterMapper<ChunkedExtraction>
Filters relations based on how many distinct arg2 values it takes in a large
corpus. These frequencies must be pre-computed and stored in a flat file in
the tab-delimited format (#arg2s, relation). The relations should be
normalized using the VerbalRelationNormalizer class.
By default, this class searches the classpath for a file called
freq_rel.txt.gz and reads the relations with at least 20
distinct arg2s from it.
- Author:
- afader
| Methods inherited from class edu.washington.cs.knowitall.extractor.mapper.FilterMapper |
doMap |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultMinFreq
public static final int defaultMinFreq
- See Also:
- Constant Field Values
ReVerbRelationDictionaryFilter
public ReVerbRelationDictionaryFilter(InputStream in,
int minFreq)
throws IOException
- Constructs a new dictionary filter from the data in
in. This
data should be in the tab-delimited format (#arg2, relation).
- Parameters:
in - the dictionary of relations and their number of distinct
arg2s.minFreq - the minimum number of distinct arg2s a relation must have to
be included.
- Throws:
IOException
ReVerbRelationDictionaryFilter
public ReVerbRelationDictionaryFilter(int minFreq)
throws IOException
- Constructs a new dictionary filter using the data in the file
freq_rel.txt.gz, which is found on the classpath.
- Parameters:
minFreq - the minimum number of distinct arg2s a relation must have to
be included.
- Throws:
IOException
ReVerbRelationDictionaryFilter
public ReVerbRelationDictionaryFilter()
throws IOException
- Constructs a new dictionary filter using the data in the file
freq_rel.txt.gz, and loads all relations with at least 20
distinct arg2s.
- Throws:
IOException
doFilter
public boolean doFilter(ChunkedExtraction extr)
- Specified by:
doFilter in class FilterMapper<ChunkedExtraction>
Copyright © 2010-2012 University of Washington CSE. All Rights Reserved.