Class LowerCaseConvertor

java.lang.Object
ai.djl.modality.nlp.preprocess.LowerCaseConvertor
All Implemented Interfaces:
TextProcessor

public class LowerCaseConvertor extends Object implements TextProcessor
LowerCaseConvertor converts every character of the input tokens to it's respective lower case character.
  • Constructor Details

    • LowerCaseConvertor

      public LowerCaseConvertor(Locale locale)
      Creates a TextProcessor that converts input text into lower case character given the Locale.
      Parameters:
      locale - the expected Locale of the input text
    • LowerCaseConvertor

      public LowerCaseConvertor()
      Creates a TextProcessor that converts input text into lower case character with the default english Locale.
  • Method Details

    • preprocess

      public List<String> preprocess(List<String> tokens)
      Applies the preprocessing defined to the given input tokens.
      Specified by:
      preprocess in interface TextProcessor
      Parameters:
      tokens - the tokens created after the input text is tokenized
      Returns:
      the preprocessed tokens