edu.iastate.jtm.util
Class TokenProcessor

java.lang.Object
  extended by edu.iastate.jtm.util.TokenProcessor

public class TokenProcessor
extends java.lang.Object

Remove punctuations from left and right of a token.

Author:
Jing Ding

Field Summary
static int DEL
           
static int DEL_LEFT
           
static int DEL_RIGHT
           
static int OPT
           
static int OPT_LEFT
           
static int OPT_RIGHT
           
 
Constructor Summary
TokenProcessor()
           
 
Method Summary
 boolean isChemicalName(java.lang.CharSequence word)
           
static void main(java.lang.String[] args)
           
 void setCharType(CharType ct)
           
 void strip(java.nio.CharBuffer buffer)
           
 void strip(java.nio.CharBuffer buffer, boolean option)
           
 java.lang.String strip(java.lang.String token)
           
 java.lang.String strip(java.lang.String token, boolean option)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEL

public static final int DEL
See Also:
Constant Field Values

DEL_LEFT

public static final int DEL_LEFT
See Also:
Constant Field Values

DEL_RIGHT

public static final int DEL_RIGHT
See Also:
Constant Field Values

OPT

public static final int OPT
See Also:
Constant Field Values

OPT_LEFT

public static final int OPT_LEFT
See Also:
Constant Field Values

OPT_RIGHT

public static final int OPT_RIGHT
See Also:
Constant Field Values
Constructor Detail

TokenProcessor

public TokenProcessor()
Method Detail

setCharType

public void setCharType(CharType ct)

strip

public java.lang.String strip(java.lang.String token)

strip

public java.lang.String strip(java.lang.String token,
                              boolean option)

strip

public void strip(java.nio.CharBuffer buffer)

strip

public void strip(java.nio.CharBuffer buffer,
                  boolean option)

isChemicalName

public boolean isChemicalName(java.lang.CharSequence word)

main

public static void main(java.lang.String[] args)