edu.mit.jmwe.detect
Class SmallestVariance

java.lang.Object
  extended by edu.mit.jmwe.detect.HasMWEDetector
      extended by edu.mit.jmwe.detect.ResolveByScore
          extended by edu.mit.jmwe.detect.SmallestVariance
All Implemented Interfaces:
IHasMWEDetector, IMWEDetector, IMWEDetectorResolver

public class SmallestVariance
extends ResolveByScore

A detector resolver that chooses the MWE with the smallest variance.

Since:
jMWE 1.0.0
Version:
$Id: SmallestVariance.java 610 2011-05-06 20:05:20Z markaf $
Author:
M.A. Finlayson

Field Summary
 
Fields inherited from class edu.mit.jmwe.detect.ResolveByScore
chooseLargest
 
Constructor Summary
SmallestVariance(IMWEDetector detector)
          A new resolver that wraps the specified detector.
 
Method Summary
protected
<T extends IToken>
IScorer<IMWE<T>>
getScorer(List<T> sentence)
          Returns the scoring function for this filter.
 
Methods inherited from class edu.mit.jmwe.detect.ResolveByScore
detect
 
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

SmallestVariance

public SmallestVariance(IMWEDetector detector)
A new resolver that wraps the specified detector.

Parameters:
detector - the wrapped detector, may not be null
Throws:
NullPointerException - if the specified detector is null
Since:
jMWE 1.0.0
Method Detail

getScorer

protected <T extends IToken> IScorer<IMWE<T>> getScorer(List<T> sentence)
Description copied from class: ResolveByScore
Returns the scoring function for this filter.

Specified by:
getScorer in class ResolveByScore
Type Parameters:
T - they type of the token
Parameters:
sentence - the sentence to be scored
Returns:
the scorer


Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.