public class TextTruncator extends java.lang.Object implements TextProcessor
TextProcessor that truncates text to a maximum size.| Constructor and Description |
|---|
TextTruncator(int maxSize)
Constructs a
TextTruncator. |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<java.lang.String> |
preprocess(java.util.List<java.lang.String> tokens)
Applies the preprocessing defined to the given input tokens.
|
public TextTruncator(int maxSize)
TextTruncator.maxSize - the size to limit the text topublic java.util.List<java.lang.String> preprocess(java.util.List<java.lang.String> tokens)
preprocess in interface TextProcessortokens - the tokens created after the input text is tokenized