|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sf.classifier4J.AbstractClassifier
Implementaion of the IClassifier.setMatchCutoff(double)
and IClassifier.isMatch(java.lang.String)
methods.
Field Summary | |
protected double |
cutoff
|
Fields inherited from interface net.sf.classifier4J.IClassifier |
DEFAULT_CUTOFF, LOWER_BOUND, NEUTRAL_PROBABILITY, UPPER_BOUND |
Constructor Summary | |
AbstractClassifier()
|
Method Summary | |
double |
getMatchCutoff()
|
boolean |
isMatch(double matchProbability)
Convenience method which takes a match probability (calculated by IClassifier.classify(java.lang.String) )
and checks if it would be classified as a match or not |
boolean |
isMatch(java.lang.String input)
Implementation of IClassifier.isMatch(java.lang.String)
method. |
void |
setMatchCutoff(double cutoff)
This implementation throws an IllegalArgumentException if cutoff is greater than 1 or less than 0. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.classifier4J.IClassifier |
classify |
Field Detail |
protected double cutoff
Constructor Detail |
public AbstractClassifier()
Method Detail |
public void setMatchCutoff(double cutoff)
This implementation throws an IllegalArgumentException if cutoff is greater than 1 or less than 0.
setMatchCutoff
in interface IClassifier
cutoff
- Used to determine the mimimum probability that should be classified as a match
java.lang.IllegalArgumentException
- if if cutoff is greater than 1 or less than 0public double getMatchCutoff()
public boolean isMatch(java.lang.String input) throws ClassifierException
Implementation of IClassifier.isMatch(java.lang.String)
method.
isMatch
in interface IClassifier
input
- the string to classify
ClassifierException
- If a non-recoverable problem occursIClassifier.isMatch(java.lang.String)
public boolean isMatch(double matchProbability)
IClassifier
IClassifier.classify(java.lang.String)
)
and checks if it would be classified as a match or not
isMatch
in interface IClassifier
matchProbability
-
IClassifier.isMatch(double)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |