public abstract class FilterByScore extends HasMWEDetector implements IMWEDetectorFilter
| Constructor and Description |
|---|
FilterByScore(IMWEDetector detector)
Constructs a new MWE detector constraint that wraps the specified MWE Detector.
|
| Modifier and Type | Method and Description |
|---|---|
<T extends IToken> |
detect(java.util.List<T> sentence)
Given a list of tokens, the detector searches for the MWEs in the list.
|
protected abstract <T extends IToken> |
getScorer(java.util.List<T> sentence)
Returns a scoring function for the specified sentence.
|
protected abstract boolean |
isGoodScore(double score)
Returns
true if the score passes the filter (i.e., the
scored MWE should be kept); false otherwise |
getWrappedDetectorclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWrappedDetectorpublic FilterByScore(IMWEDetector detector)
detector - the detector wrapped by this objectjava.lang.NullPointerException - if the specified detector is nullpublic <T extends IToken> java.util.List<IMWE<T>> detect(java.util.List<T> sentence)
IMWEDetectorIMWE objects representing these
multi-word expressions. The method returns an empty list if no MWEs are
found; the method should never return null.detect in interface IMWEDetectordetect in class HasMWEDetectorT - the type of the tokens in the sentencesentence - a sentence which the detector should search for multi-word
expressions.IMWE objects representing the multi-word
expressions found in the sentence. Returns an empty list if no
multi-word expressions are found; never returns nullprotected abstract boolean isGoodScore(double score)
true if the score passes the filter (i.e., the
scored MWE should be kept); false otherwisescore - the score to be checkedtrue if the score passes the filter (i.e., the
scored MWE should be kept); false otherwiseprotected abstract <T extends IToken> IScorer<IMWE<T>> getScorer(java.util.List<T> sentence)
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.