public class MoreFrequentAsMWE extends FilterByScore
Constructor and Description |
---|
MoreFrequentAsMWE(IMWEDetector detector)
Constructs the detector from the given backing detector.
|
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
public MoreFrequentAsMWE(IMWEDetector detector)
detector
- the IMWEDetector that will be used to back this detector. May
not be null
.java.lang.NullPointerException
- if the backing detector is 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.