Class ICUNormalizer2CharFilterFactory


  • public class ICUNormalizer2CharFilterFactory
    extends CharFilterFactory
    Factory for ICUNormalizer2CharFilter

    Supports the following attributes:

    • name: A Unicode Normalization Form, one of 'nfc','nfkc', 'nfkc_cf'. Default is nfkc_cf.
    • mode: Either 'compose' or 'decompose'. Default is compose. Use "decompose" with nfc or nfkc, to get nfd or nfkd, respectively.
    • filter: A UnicodeSet pattern. Codepoints outside the set are always left unchanged. Default is [] (the null set, no filtering).
    Since:
    4.10.0
    See Also:
    ICUNormalizer2CharFilter, Normalizer2, FilteredNormalizer2
    • Field Detail

      • normalizer

        private final com.ibm.icu.text.Normalizer2 normalizer
    • Constructor Detail

      • ICUNormalizer2CharFilterFactory

        public ICUNormalizer2CharFilterFactory​(java.util.Map<java.lang.String,​java.lang.String> args)
        Creates a new ICUNormalizer2CharFilterFactory
    • Method Detail

      • create

        public java.io.Reader create​(java.io.Reader input)
        Description copied from class: CharFilterFactory
        Wraps the given Reader with a CharFilter.
        Specified by:
        create in class CharFilterFactory
      • normalize

        public java.io.Reader normalize​(java.io.Reader input)
        Description copied from class: CharFilterFactory
        Normalize the specified input Reader While the default implementation returns input unchanged, char filters that should be applied at normalization time can delegate to create method.
        Overrides:
        normalize in class CharFilterFactory