edu.stanford.nlp.process
Class DocumentProcessor

java.lang.Object
  |
  +--edu.stanford.nlp.process.DocumentProcessor
All Implemented Interfaces:
Processor
Direct Known Subclasses:
LowercaseProcessor, NumberProcessor

public class DocumentProcessor
extends Object
implements Processor

Processor that takes an Appliable and applies to every element in the input Document. This is useful when you want to transform each element in an isolated way.

Author:
Sepandar Kamvar (sdkamvar@stanford.edu)

Field Summary
protected  Appliable appliable
          Appliable used to transform each document element during processing.
 
Constructor Summary
protected DocumentProcessor()
          Does nothing but allows subclasses with empty constructor.
  DocumentProcessor(Appliable a)
          Instantiates a new DocumentProcessor for a given Appliable
 
Method Summary
 Document process(Document in)
          Converts a Document to a different Document, by transforming or filtering the elements in in using the Appliable given in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

appliable

protected Appliable appliable
Appliable used to transform each document element during processing.

Constructor Detail

DocumentProcessor

protected DocumentProcessor()
Does nothing but allows subclasses with empty constructor.


DocumentProcessor

public DocumentProcessor(Appliable a)
Instantiates a new DocumentProcessor for a given Appliable

Method Detail

process

public Document process(Document in)
Converts a Document to a different Document, by transforming or filtering the elements in in using the Appliable given in the constructor.

Specified by:
process in interface Processor
See Also:
DocumentProcessor


Stanford NLP Group