Package ai.djl.modality.nlp.preprocess
Class LowerCaseConvertor
java.lang.Object
ai.djl.modality.nlp.preprocess.LowerCaseConvertor
- All Implemented Interfaces:
TextProcessor
LowerCaseConvertor converts every character of the input tokens to it's respective lower
case character.-
Constructor Summary
ConstructorsConstructorDescriptionCreates aTextProcessorthat converts input text into lower case character with the default englishLocale.LowerCaseConvertor(Locale locale) Creates aTextProcessorthat converts input text into lower case character given theLocale. -
Method Summary
Modifier and TypeMethodDescriptionpreprocess(List<String> tokens) Applies the preprocessing defined to the given input tokens.
-
Constructor Details
-
LowerCaseConvertor
Creates aTextProcessorthat converts input text into lower case character given theLocale.- Parameters:
locale- the expectedLocaleof the input text
-
LowerCaseConvertor
public LowerCaseConvertor()Creates aTextProcessorthat converts input text into lower case character with the default englishLocale.
-
-
Method Details
-
preprocess
Applies the preprocessing defined to the given input tokens.- Specified by:
preprocessin interfaceTextProcessor- Parameters:
tokens- the tokens created after the input text is tokenized- Returns:
- the preprocessed tokens
-