public static class ShingleMatrixFilter.OneDimensionalNonWeightedTokenSettingsCodec extends ShingleMatrixFilter.TokenSettingsCodec
ShingleMatrixFilter act like ShingleFilter.
It produces the most simple sort of shingles, ignoring token position increments, et c.
It adds each token as a new column.| Constructor | Description |
|---|---|
OneDimensionalNonWeightedTokenSettingsCodec() |
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
public OneDimensionalNonWeightedTokenSettingsCodec()
public ShingleMatrixFilter.TokenPositioner getTokenPositioner(Token token) throws IOException
ShingleMatrixFilter.TokenSettingsCodecToken is to be inserted to a ShingleMatrixFilter.Matrix.getTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodecShingleMatrixFilter.TokenPositionerIOExceptionpublic void setTokenPositioner(Token token, ShingleMatrixFilter.TokenPositioner tokenPositioner)
ShingleMatrixFilter.TokenSettingsCodecToken is to be inserted to a ShingleMatrixFilter.Matrix.setTokenPositioner in class ShingleMatrixFilter.TokenSettingsCodecpublic float getWeight(Token token)
ShingleMatrixFilter.TokenSettingsCodecgetWeight in class ShingleMatrixFilter.TokenSettingsCodecpublic void setWeight(Token token, float weight)
ShingleMatrixFilter.TokenSettingsCodecsetWeight in class ShingleMatrixFilter.TokenSettingsCodecCopyright © 2000-2018 Apache Software Foundation. All Rights Reserved.