|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jmwe.detect.HasMWEDetector
edu.mit.jmwe.detect.FilterByScore
public abstract class FilterByScore
Removes all MWEs from the wrapped detector's results whose score is "no good", where "no good" is implementation dependent.
Constructor Summary | |
---|---|
FilterByScore(IMWEDetector detector)
Constructs a new MWE detector constraint that wraps the specified MWE Detector. |
Method Summary | ||
---|---|---|
|
detect(List<T> sentence)
Given a list of tokens, the detector searches for the MWEs in the list. |
|
protected abstract
|
getScorer(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 |
Methods inherited from class edu.mit.jmwe.detect.HasMWEDetector |
---|
getWrappedDetector |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface edu.mit.jmwe.detect.IHasMWEDetector |
---|
getWrappedDetector |
Constructor Detail |
---|
public FilterByScore(IMWEDetector detector)
detector
- the detector wrapped by this object
NullPointerException
- if the specified detector is null
Method Detail |
---|
public <T extends IToken> List<IMWE<T>> detect(List<T> sentence)
IMWEDetector
IMWE
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 IMWEDetector
detect
in class HasMWEDetector
T
- 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 null
protected abstract boolean isGoodScore(double score)
true
if the score passes the filter (i.e., the
scored MWE should be kept); false
otherwise
score
- the score to be checked
true
if the score passes the filter (i.e., the
scored MWE should be kept); false
otherwiseprotected abstract <T extends IToken> IScorer<IMWE<T>> getScorer(List<T> sentence)
T
- the type of token in the sentencesentence
- the sentence for which the scorer should be constructed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |