org.apache.lucene.analysis.shingle
Class ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

java.lang.Object
  extended by org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TokenSettingsCodec
      extended by org.apache.lucene.analysis.shingle.ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
Enclosing class:
ShingleMatrixFilter

public static class ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec
extends ShingleMatrixFilter.TokenSettingsCodec

A codec that creates a two dimensional matrix by treating tokens from the input stream with 0 position increment as new rows to the current column.


Constructor Summary
ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec()
           
 
Method Summary
 ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token)
          Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
 float getWeight(Token token)
          Have this method return 1f in order to 'disable' weights.
 void setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
          Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.
 void setWeight(Token token, float weight)
          Have this method do nothing in order to 'disable' weights.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec

public ShingleMatrixFilter.TwoDimensionalNonWeightedSynonymTokenSettingsCodec()
Method Detail

getTokenPositioner

public ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token)
                                                       throws IOException
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Retrieves information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Specified by:
getTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec
Returns:
ShingleMatrixFilter.TokenPositioner
Throws:
IOException

setTokenPositioner

public void setTokenPositioner(Token token,
                               ShingleMatrixFilter.TokenPositioner tokenPositioner)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Sets information on how a Token is to be inserted to a ShingleMatrixFilter.Matrix.

Specified by:
setTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodec

getWeight

public float getWeight(Token token)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Have this method return 1f in order to 'disable' weights.

Specified by:
getWeight in class ShingleMatrixFilter.TokenSettingsCodec
Returns:
the weight of parameter token

setWeight

public void setWeight(Token token,
                      float weight)
Description copied from class: ShingleMatrixFilter.TokenSettingsCodec
Have this method do nothing in order to 'disable' weights.

Specified by:
setWeight in class ShingleMatrixFilter.TokenSettingsCodec


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.