edu.mit.jmwe.detect.score
Class FractionAsMWEScore<T extends IToken>

java.lang.Object
  extended by edu.mit.jmwe.detect.score.AbstractScorer<IMWE<T>>
      extended by edu.mit.jmwe.detect.score.FractionAsMWEScore<T>
Type Parameters:
T - the type of token used by this scorer
All Implemented Interfaces:
IScorer<IMWE<T>>, Comparator<IMWE<T>>

public class FractionAsMWEScore<T extends IToken>
extends AbstractScorer<IMWE<T>>

A scorer that scores with the fraction of times it appears marked as an MWE, as opposed to a run of unmarked tokens.

Since:
jMWE 1.0.0
Version:
$Id: FractionAsMWEScore.java 608 2011-05-06 19:32:34Z markaf $
Author:
M.A. Finlayson

Constructor Summary
protected FractionAsMWEScore()
          This constructor is marked protected so that this class may be subclassed, but not directly instantiated.
 
Method Summary
static
<T extends IToken>
FractionAsMWEScore<T>
getInstance()
          Returns the singleton instance of this class, instantiating if necessary.
 double score(IMWE<T> mwe)
          Score the specified object.
 
Methods inherited from class edu.mit.jmwe.detect.score.AbstractScorer
compare
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FractionAsMWEScore

protected FractionAsMWEScore()
This constructor is marked protected so that this class may be subclassed, but not directly instantiated.

Since:
jMWE 1.0.0
Method Detail

getInstance

public static <T extends IToken> FractionAsMWEScore<T> getInstance()
Returns the singleton instance of this class, instantiating if necessary.

Returns:
the singleton instance of this class
Since:
jMWE 1.0.0

score

public double score(IMWE<T> mwe)
Description copied from interface: IScorer
Score the specified object. The object may be null, depending on the implementation.

Parameters:
mwe - the object to be scored
Returns:
the score


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