edu.stanford.nlp.ie.hmm
Class WordTypeStripper

java.lang.Object
  |
  +--edu.stanford.nlp.ie.hmm.WordTypeStripper
All Implemented Interfaces:
Appliable

public class WordTypeStripper
extends Object
implements Appliable

Appliable that sets the type of a TypedTaggedWord to 0.

See Also:
apply(java.lang.Object)

Constructor Summary
WordTypeStripper()
           
 
Method Summary
 Object apply(Object in)
          If in is a TypedTaggedWord, returns a new copy of the word with the type set to 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WordTypeStripper

public WordTypeStripper()
Method Detail

apply

public Object apply(Object in)
If in is a TypedTaggedWord, returns a new copy of the word with the type set to 0. Otherwise returns in directly.

NOTE: Ideally one could just test for HasType and then make a copy of in and call setType but it's not clear how to make the copy.

Specified by:
apply in interface Appliable


Stanford NLP Group