com.sun.labs.minion.classification
Class KeyWordProfiler

java.lang.Object
  extended by com.sun.labs.minion.classification.KeyWordProfiler
All Implemented Interfaces:
Profiler, com.sun.labs.util.props.Component, com.sun.labs.util.props.Configurable

public class KeyWordProfiler
extends java.lang.Object
implements Profiler, com.sun.labs.util.props.Configurable

A profiler class that puts documents into classes based on the presence of particular keywords.


Field Summary
static java.lang.String PROP_CLASS_FIELD
           
static java.lang.String PROP_FROM_FIELD
           
static java.lang.String PROP_KEYWORD_DATA
           
 
Constructor Summary
KeyWordProfiler()
           
 
Method Summary
 java.lang.String getClassField()
           
 java.lang.String getFromField()
           
 java.lang.String getKeywordData()
           
 java.lang.String getName()
           
 void newProperties(com.sun.labs.util.props.PropertySheet ps)
           
 boolean profile(SearchEngineImpl engine, InvFileMemoryPartition mp, InvFileDiskPartition dp)
          Runs the keyword profile.
 void setClassField(java.lang.String classField)
           
 void setFromField(java.lang.String fromField)
           
 void setKeywordData(java.lang.String keywordData)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_CLASS_FIELD

@ConfigString(defaultValue="class")
public static final java.lang.String PROP_CLASS_FIELD
See Also:
Constant Field Values

PROP_FROM_FIELD

@ConfigString(defaultValue="why")
public static final java.lang.String PROP_FROM_FIELD
See Also:
Constant Field Values

PROP_KEYWORD_DATA

@ConfigString(defaultValue="keywords.xml")
public static final java.lang.String PROP_KEYWORD_DATA
See Also:
Constant Field Values
Constructor Detail

KeyWordProfiler

public KeyWordProfiler()
Method Detail

newProperties

public void newProperties(com.sun.labs.util.props.PropertySheet ps)
                   throws com.sun.labs.util.props.PropertyException
Specified by:
newProperties in interface com.sun.labs.util.props.Configurable
Throws:
com.sun.labs.util.props.PropertyException

getName

public java.lang.String getName()

getClassField

public java.lang.String getClassField()

setClassField

public void setClassField(java.lang.String classField)

getFromField

public java.lang.String getFromField()

setFromField

public void setFromField(java.lang.String fromField)

getKeywordData

public java.lang.String getKeywordData()

setKeywordData

public void setKeywordData(java.lang.String keywordData)

profile

public boolean profile(SearchEngineImpl engine,
                       InvFileMemoryPartition mp,
                       InvFileDiskPartition dp)
Runs the keyword profile.

Specified by:
profile in interface Profiler
Parameters:
engine - the engine in which we'll do the profiling.
mp - the memory partition that's being profiled against.
dp - the partition that we're going to profile against.
Returns:
true if modifications were made to the memory partition, false otherwise.