Class NormalizeLevel


  • public class NormalizeLevel
    extends java.lang.Object
    class representing the character normalization we want to do on query and indexed text. Levels are strict subsets, so doing accent removal means doing codepoint normalizing and case normalizing also.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  NormalizeLevel.Level
      The current levels are as follows: NONE: no changes to input text CODEPOINT: convert text into Unicode Normalization Form Compatibility Composition LOWERCASE: also convert text into lowercase letters ACCENT: do both above and remove accents on characters
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean doRemoveAccents()
      Returns whether accents should be removed from text
      NormalizeLevel.Level getLevel()  
      void inferCodepoint()
      Change the current level to CODEPOINT as inferred by other features' needs.
      void inferLowercase()
      Change the current level to LOWERCASE as inferred by other features' needs.
      • Methods inherited from class java.lang.Object

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

      • NormalizeLevel

        public NormalizeLevel()
        Construct a default (full) normalizelevel,
      • NormalizeLevel

        public NormalizeLevel​(NormalizeLevel.Level level,
                              boolean fromUser)
        Construct for a specific level, possibly user specified
        Parameters:
        level - which level to use
        fromUser - whether this was specified by the user
    • Method Detail

      • doRemoveAccents

        public boolean doRemoveAccents()
        Returns whether accents should be removed from text
      • inferCodepoint

        public void inferCodepoint()
        Change the current level to CODEPOINT as inferred by other features' needs. If the current level was user specified it will not change; also this will not increase the level.
      • inferLowercase

        public void inferLowercase()
        Change the current level to LOWERCASE as inferred by other features' needs. If the current level was user specified it will not change; also this will not increase the level.