edu.stanford.nlp.process
Class FunctionProcessor

java.lang.Object
  extended byedu.stanford.nlp.process.FunctionProcessor
All Implemented Interfaces:
Processor
Direct Known Subclasses:
LowercaseProcessor, NumberProcessor

public class FunctionProcessor
extends Object
implements Processor

Processor that takes an Function 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  Function appliable
          Function used to transform each document element during processing.
 
Constructor Summary
protected FunctionProcessor()
          Does nothing but allows subclasses with empty constructor.
  FunctionProcessor(Function a)
          Instantiates a new FunctionProcessor for a given Function
 
Method Summary
 Document process(Document in)
          Converts a Document to a different Document, by transforming or filtering the elements in in using the Function 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 Function appliable
Function used to transform each document element during processing.

Constructor Detail

FunctionProcessor

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


FunctionProcessor

public FunctionProcessor(Function a)
Instantiates a new FunctionProcessor for a given Function

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 Function given in the constructor.

Specified by:
process in interface Processor
See Also:
FunctionProcessor


Stanford NLP Group