|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fu_berlin.ties.ConfigurableProcessor
de.fu_berlin.ties.TextProcessor
de.fu_berlin.ties.eval.ReEvaluator
public class ReEvaluator
A processor that can be used to re-evaluate the contents of an
EvaluatedExtractionContainer
. This can
be used to switch the
match mode
.
Field Summary |
---|
Fields inherited from class de.fu_berlin.ties.TextProcessor |
---|
CONFIG_POST, KEY_DIRECTORY, KEY_LOCAL_NAME, KEY_OUT_DIRECTORY, KEY_URL |
Constructor Summary | |
---|---|
ReEvaluator()
Creates a new instance, using a default extension and the standard configuration. |
|
ReEvaluator(String outExt)
Creates a new instance, using the standard configuration. |
|
ReEvaluator(String outExt,
TiesConfiguration conf)
Creates a new instance. |
Method Summary | |
---|---|
protected EvaluatedExtractionContainer |
createEvalContainer()
Created an empty container for evaluating extractions, using the stored configuration to initialize target structure and match mode. |
protected void |
doProcess(Reader reader,
Writer writer,
ContextMap context)
Processes the contents of a reader, writing a modified version to a writer. |
void |
reEvalulate(ExtractionContainer orgExtractions,
EvaluatedExtractionContainer newEvaluated)
Re-evaluates the contents of an extraction container. |
EvaluatedExtractionContainer |
reEvalulate(Reader reader)
Re-evaluates the serialized contents of an extraction container, delegating to reEvalulate(ExtractionContainer, EvaluatedExtractionContainer) . |
Methods inherited from class de.fu_berlin.ties.TextProcessor |
---|
getOutFileExt, process, process, process, process, process, process, toString |
Methods inherited from class de.fu_berlin.ties.ConfigurableProcessor |
---|
getConfig |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ReEvaluator()
public ReEvaluator(String outExt)
outExt
- the extension to use for output filespublic ReEvaluator(String outExt, TiesConfiguration conf)
outExt
- the extension to use for output filesconf
- the configuration to useMethod Detail |
---|
protected EvaluatedExtractionContainer createEvalContainer()
public void reEvalulate(ExtractionContainer orgExtractions, EvaluatedExtractionContainer newEvaluated)
orgExtractions
- the extractions to re-evaluatenewEvaluated
- the re-evaluated extractions are added to this
conainerpublic EvaluatedExtractionContainer reEvalulate(Reader reader) throws IOException
reEvalulate(ExtractionContainer, EvaluatedExtractionContainer)
.
reader
- reader containg the extractions to re-evaluate in
DelimSepValues
format; not closed by this
method
IOException
- if an I/O error occurs while reading the extractionsprotected void doProcess(Reader reader, Writer writer, ContextMap context) throws IOException, ProcessingException
doProcess
in class TextProcessor
reader
- reader containing the text to process; should not be closed
by this methodwriter
- the writer to write the processed text to; might be flushed
but not closed by this method; if this method does not use the writer,
the underlying file will be deleted afterwardscontext
- a map of objects that are made available for processing;
when called from the implemented process
methods in this
class, it will contain mappings from IOUtils.KEY_LOCAL_CHARSET
to the character set of the output writer;
from TextProcessor.KEY_OUT_DIRECTORY
to the output directory (File
);
from ContentType.KEY_MIME_TYPE
to the document's MIME type; from
TextProcessor.KEY_LOCAL_NAME
to the local name (String) and either from
TextProcessor.KEY_DIRECTORY
to the input directory (File
), in case of
a local file) or from TextProcessor.KEY_URL
to the URL
(otherwise) of
the processed document
IOException
- if an I/O error occurs
ProcessingException
- if an error occurs during processing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |