net.sf.classifier4J
Class SimpleClassifier
java.lang.Object
|
+--net.sf.classifier4J.AbstractClassifier
|
+--net.sf.classifier4J.SimpleClassifier
- All Implemented Interfaces:
- IClassifier
- public class SimpleClassifier
- extends AbstractClassifier
- implements IClassifier
Very basic implemntation of the IClassifier
interface.
This implementation just looks for string (set by setSearchWord(java.lang.String)
)
in the input passed to classify(java.lang.String)
- Author:
- Nick Lothian
Method Summary |
double |
classify(java.lang.String input)
Function to determine the probability string matches a criteria. |
java.lang.String |
getSearchWord()
|
void |
setSearchWord(java.lang.String string)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleClassifier
public SimpleClassifier()
getSearchWord
public java.lang.String getSearchWord()
- Returns:
- the word this classifier is searching for
setSearchWord
public void setSearchWord(java.lang.String string)
- Parameters:
string
- The string to look for when matching
classify
public double classify(java.lang.String input)
- Description copied from interface:
IClassifier
- Function to determine the probability string matches a criteria.
- Specified by:
classify
in interface IClassifier
- Parameters:
input
- the string to classify
- Returns:
- the likelyhood that this string is a match for this net.sf.classifier4J. 1 means 100% likely.
- See Also:
IClassifier.classify(java.lang.String)
Copyright © 2003-2005 Nick Lothian. All Rights Reserved.