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 |
detectgetWrappedDetectorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWrappedDetectorprotected 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 nulldict - the dictionary to use, may not be nullminScore - 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 nullprotected boolean isGoodScore(double score)
FilterByScoretrue if the score passes the filter (i.e., the
scored MWE should be kept); false otherwiseisGoodScore in class FilterByScorescore - 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)
FilterByScoregetScorer in class FilterByScoreT - the type of token in the sentencesentence - the sentence for which the scorer should be constructedCopyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.