Enterprise Information Portal APIs

com.ibm.gcs.focus
Class Classifier

java.lang.Object
  |
  +--com.ibm.gcs.focus.Classifier

public class Classifier
extends java.lang.Object

This class encapsulates the methods required to execute the svm classifier. The SVM Classifier is native application written for the windows environment that is jni wrapped to be called from java.


Constructor Summary
Classifier(java.lang.String statBase)
          This constructor takes in a statBase in String form and makes a Classify Object in the Native Environment.
 
Method Summary
 float getClassProb(java.lang.String document)
          Given a document, this returns the probability it is included in the trained class.
static void main(java.lang.String[] args)
           
 int setFocusClass(java.lang.String name)
          This method sets the class to be trained on.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Classifier

public Classifier(java.lang.String statBase)
This constructor takes in a statBase in String form and makes a Classify Object in the Native Environment.
Parameters:
statBase - this string points the code to the correct model file names (something like gcs).The String must be between 1 and 255 characters.
Method Detail

setFocusClass

public int setFocusClass(java.lang.String name)
This method sets the class to be trained on. The name of the class should be a valid one; ie. one that is pre-trained.
Parameters:
name - Name of the Pre Trained Class
Returns:
-1 if there is an error

getClassProb

public float getClassProb(java.lang.String document)
Given a document, this returns the probability it is included in the trained class.
Parameters:
document - The document being classified
Returns:
probability of inclusion in class. If there is a problem, -1 is returned.

main

public static void main(java.lang.String[] args)

EIP Web Crawler APIs

(c) Copyright International Business Machines Corporation 1996, 2002. IBM Corp. All rights reserved.