edu.mit.jmwe.detect
Class Leftmost
java.lang.Object
edu.mit.jmwe.detect.HasMWEDetector
edu.mit.jmwe.detect.ResolveByScore
edu.mit.jmwe.detect.Leftmost
- All Implemented Interfaces:
- IHasMWEDetector, IMWEDetector, IMWEDetectorResolver
public class Leftmost
- extends ResolveByScore
A resolver that chooses the leftmost MWE.
- Since:
- jMWE 1.0.0
- Version:
- $Id: Leftmost.java 616 2011-05-07 01:00:47Z markaf $
- Author:
- M.A. Finlayson
Constructor Summary |
Leftmost(IMWEDetector detector)
Constructs a new resolver that wraps the specified detector |
Method Summary |
protected
|
getScorer(List<T> sentence)
Returns the scoring function for this filter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Leftmost
public Leftmost(IMWEDetector detector)
- Constructs 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
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.