com.twitter.common.text.combiner
Class DotContractedTokenCombiner

java.lang.Object
  extended by org.apache.lucene.util.AttributeSource
      extended by com.twitter.common.text.token.TokenStream
          extended by com.twitter.common.text.token.TokenProcessor
              extended by com.twitter.common.text.combiner.LookAheadTokenCombiner
                  extended by com.twitter.common.text.combiner.DotContractedTokenCombiner

public class DotContractedTokenCombiner
extends LookAheadTokenCombiner

Combines contracted word followed by dot/period (e.g., Mr. Inc.) back into a single token.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
org.apache.lucene.util.AttributeSource.AttributeFactory, org.apache.lucene.util.AttributeSource.State
 
Constructor Summary
DotContractedTokenCombiner(TokenStream inputStream)
           
 
Method Summary
 boolean canBeCombinedWithNextToken(CharSequence term)
           
 boolean canBeCombinedWithPreviousToken(CharSequence term)
           
 
Methods inherited from class com.twitter.common.text.combiner.LookAheadTokenCombiner
incrementToken, setType
 
Methods inherited from class com.twitter.common.text.token.TokenProcessor
getInputStream, getInstanceOf, reset
 
Methods inherited from class com.twitter.common.text.token.TokenStream
toStringList
 
Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, restoreState, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DotContractedTokenCombiner

public DotContractedTokenCombiner(TokenStream inputStream)
Method Detail

canBeCombinedWithNextToken

public boolean canBeCombinedWithNextToken(CharSequence term)
Specified by:
canBeCombinedWithNextToken in class LookAheadTokenCombiner

canBeCombinedWithPreviousToken

public boolean canBeCombinedWithPreviousToken(CharSequence term)
Specified by:
canBeCombinedWithPreviousToken in class LookAheadTokenCombiner