public class LeskAtLeast extends FilterByScore
Modifier and Type | Field and Description |
---|---|
protected edu.mit.jwi.IDictionary |
dict |
protected int |
minScore |
Constructor and Description |
---|
LeskAtLeast(IMWEDetector detector,
edu.mit.jwi.IDictionary dict,
int minScore)
Constructs a new filter that filters out MWEs whose lesk score is not at
least some value.
|
Modifier and Type | Method and Description |
---|---|
protected <T extends IToken> |
getScorer(java.util.List<T> sentence)
Returns a scoring function for the specified sentence.
|
protected boolean |
isGoodScore(double score)
Returns
true if the score passes the filter (i.e., the
scored MWE should be kept); false otherwise |
detect
getWrappedDetector
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWrappedDetector
protected final int minScore
protected final edu.mit.jwi.IDictionary dict
public LeskAtLeast(IMWEDetector detector, edu.mit.jwi.IDictionary dict, int minScore)
detector
- the wrapped detector, may not be null
dict
- the dictionary to use, may not be null
minScore
- the minimum score to use. If the specified score is less than
zero, the score used is zero.java.lang.NullPointerException
- if the detector or dictionary are null
protected boolean isGoodScore(double score)
FilterByScore
true
if the score passes the filter (i.e., the
scored MWE should be kept); false
otherwiseisGoodScore
in class FilterByScore
score
- the score to be checkedtrue
if the score passes the filter (i.e., the
scored MWE should be kept); false
otherwiseprotected <T extends IToken> IScorer<IMWE<T>> getScorer(java.util.List<T> sentence)
FilterByScore
getScorer
in class FilterByScore
T
- the type of token in the sentencesentence
- the sentence for which the scorer should be constructedCopyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.