Class ScandinavianNormalizer


  • public final class ScandinavianNormalizer
    extends Object
    This Normalizer does the heavy lifting for a set of Scandinavian normalization filters, normalizing use of the interchangeable Scandinavian characters æÆäÄöÖøØ and folded variants (aa, ao, ae, oe and oo) by transforming them to åÅæÆøØ.
    Since:
    9.0
    NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
    • Constructor Detail

      • ScandinavianNormalizer

        public ScandinavianNormalizer​(Set<ScandinavianNormalizer.Foldings> foldings)
        Create the instance, while choosing which foldings to apply. This may differ between Norwegian, Danish and Swedish.
        Parameters:
        foldings - a Set of Foldings to apply (i.e. AE, OE, AA, AO, OO)
    • Method Detail

      • processToken

        public int processToken​(char[] buffer,
                                int length)
        Takes the original buffer and length as input. Modifies the buffer in-place and returns new length
        Returns:
        new length