Package util

Class TextFilter


  • public final class TextFilter
    extends java.lang.Object
    The main purpose of this class is to clear your text. When dealing with tokenization, a common approach before doing it is cleaning up the text first. That means that this class is supposed to clear unwanted characters from a text.
    Since:
    1.0 SNAPSHOT
    Author:
    Arthur Brenno
    • Constructor Summary

      Constructors 
      Constructor Description
      TextFilter()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String clearSymbolsAndNumbers​(@NotNull java.lang.String text)
      Cleans all the non-letter characters from the text.
      static java.util.stream.Stream<java.lang.String> clearSymbolsAndNumbers​(@NotNull java.util.stream.Stream<java.lang.String> textStream)
      Cleans all the non-letter characters from the Stream.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TextFilter

        public TextFilter()
    • Method Detail

      • clearSymbolsAndNumbers

        public static java.lang.String clearSymbolsAndNumbers​(@NotNull
                                                              @NotNull java.lang.String text)
        Cleans all the non-letter characters from the text.
        Parameters:
        text - to be cleaned.
        Returns:
        cleaned text.
      • clearSymbolsAndNumbers

        public static java.util.stream.Stream<java.lang.String> clearSymbolsAndNumbers​(@NotNull
                                                                                       @NotNull java.util.stream.Stream<java.lang.String> textStream)
        Cleans all the non-letter characters from the Stream.
        Parameters:
        textStream - Stream to be cleaned.
        Returns:
        cleaned stream.