|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.labs.minion.pipeline.StageAdapter com.sun.labs.minion.pipeline.QuestioningStage
public class QuestioningStage
A Stage that tries to identify the questions within a document, and then sends the tokens that form the questions down to the next stage delimited as a field.
Field Summary | |
---|---|
protected static java.lang.String |
logTag
Tag for the log |
static java.lang.String |
PROP_CHECK_NON_FIELD_QUESTIONS
Whether we should look for questions in non-field text. |
static java.lang.String |
PROP_QUESTION_CONTAINING_FIELDS
A list of the fields containing questions that we would like to process. |
static java.lang.String |
PROP_QUESTION_FIELD
|
Fields inherited from class com.sun.labs.minion.pipeline.StageAdapter |
---|
downstream, name |
Constructor Summary | |
---|---|
QuestioningStage()
|
Method Summary | |
---|---|
void |
dump(IndexConfig iC)
Tells a stage that its data must be dumped to the index. |
void |
endDocument(long size)
Processes the event that comes at the end of a document. |
void |
endField(FieldInfo fi)
Processes the event that occurs at the end of a field. |
java.util.Set<java.lang.String> |
getQuestionContainingFields()
|
void |
newProperties(com.sun.labs.util.props.PropertySheet propertySheet)
|
void |
punctuation(Token p)
Processes some punctuation from further up the pipeline. |
void |
setQuestionContainingFields(java.util.Set<java.lang.String> questionFields)
|
void |
startDocument(java.lang.String key)
Process the event that occurs at the start of a document. |
void |
startField(FieldInfo fi)
Checks to see whether we're starting one of the fields in which we'll look for questions. |
void |
token(Token t)
Processes a token from further up the pipeline. |
Methods inherited from class com.sun.labs.minion.pipeline.StageAdapter |
---|
defineField, getDownstream, getName, savedData, setDownstream, setName, shutdown, text |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String logTag
@ConfigComponentList(type=FieldInfo.class) public static final java.lang.String PROP_QUESTION_CONTAINING_FIELDS
@ConfigBoolean(defaultValue=true) public static final java.lang.String PROP_CHECK_NON_FIELD_QUESTIONS
@ConfigComponent(type=FieldInfo.class) public static final java.lang.String PROP_QUESTION_FIELD
Constructor Detail |
---|
public QuestioningStage()
Method Detail |
---|
public void startDocument(java.lang.String key)
StageAdapter
startDocument
in interface Stage
startDocument
in class StageAdapter
key
- The document key for this document.public void startField(FieldInfo fi)
startField
in interface Stage
startField
in interface PipelineStage
startField
in class StageAdapter
fi
- The FieldInfo
object that describes
the field that is starting.StageAdapter.startField(com.sun.labs.minion.FieldInfo)
public void token(Token t)
StageAdapter
token
in interface Stage
token
in class StageAdapter
t
- The token to process.public void endField(FieldInfo fi)
endField
in interface Stage
endField
in interface PipelineStage
endField
in class StageAdapter
fi
- The FieldInfo
object that describes
the field that is ending.public void punctuation(Token p)
StageAdapter
punctuation
in interface Stage
punctuation
in class StageAdapter
p
- The punctuation to process.public void dump(IndexConfig iC)
StageAdapter
dump
in interface Stage
dump
in class StageAdapter
iC
- The configuration for the index, which can be used to
retrieve things like the index directory.public void endDocument(long size)
StageAdapter
endDocument
in interface Stage
endDocument
in class StageAdapter
size
- The size of the data that was processed for this file.public void newProperties(com.sun.labs.util.props.PropertySheet propertySheet) throws com.sun.labs.util.props.PropertyException
newProperties
in interface com.sun.labs.util.props.Configurable
newProperties
in class StageAdapter
com.sun.labs.util.props.PropertyException
public java.util.Set<java.lang.String> getQuestionContainingFields()
public void setQuestionContainingFields(java.util.Set<java.lang.String> questionFields)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |