net.java.sen.filter.stream
Class CompoundWordFilter

java.lang.Object
  extended by net.java.sen.filter.stream.CompoundWordFilter
All Implemented Interfaces:
StreamFilter

public class CompoundWordFilter
extends Object
implements StreamFilter

A Filter that replaces a single Token with one or more alternative Tokens. Can be used, for instance, to split compound verbs or nouns into their constituent parts


Constructor Summary
CompoundWordFilter(String compoundFile)
          Creates a CompoundWordFilter from the given file
 
Method Summary
 List<Token> postProcess(List<Token> tokens)
          Post-processes analysed tokens
 void preProcess(Sentence sentence)
          Pre-processes a sentence
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundWordFilter

public CompoundWordFilter(String compoundFile)
Creates a CompoundWordFilter from the given file

Parameters:
compoundFile - The compiled compound file
Method Detail

preProcess

public void preProcess(Sentence sentence)
Description copied from interface: StreamFilter
Pre-processes a sentence

Specified by:
preProcess in interface StreamFilter
Parameters:
sentence - The sentence be pre-processed

postProcess

public List<Token> postProcess(List<Token> tokens)
Description copied from interface: StreamFilter
Post-processes analysed tokens

Specified by:
postProcess in interface StreamFilter
Parameters:
tokens - The analysed tokens
Returns:
The post-processed tokens


Copyright © 2012. All Rights Reserved.