public final class ScandinavianFoldingFilter extends TokenFilter
It's a semantically more destructive solution than ScandinavianNormalizationFilter
but
can in addition help with matching raksmorgas as r"aksm"orgas.
blabaersyltetoj == blab"arsyltet"oj == blaabaarsyltetoej == blabarsyltetoj r"aksm"orgas == raeksmorgas == raeksm"orgaos == raeksmoergaas == raksmorgas
Background: Swedish a"a"o are in fact the same letters as Norwegian and Danish aaeo and thus interchangeable when used between these languages. They are however folded differently when people type them on a keyboard lacking these characters.
In that situation almost all Swedish people use a, a, o instead of a, "a, "o.
Norwegians and Danes on the other hand usually type aa, ae and oe instead of a, ae and o. Some do however use a, a, o, oo, ao and sometimes permutations of everything above.
This filter solves that mismatch problem, but might also cause new.
ScandinavianNormalizationFilter
AttributeSource.State
input
DEFAULT_TOKEN_ATTRIBUTE_FACTORY
Constructor and Description |
---|
ScandinavianFoldingFilter(TokenStream input) |
Modifier and Type | Method and Description |
---|---|
boolean |
incrementToken() |
close, end, reset
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
public ScandinavianFoldingFilter(TokenStream input)
public boolean incrementToken() throws IOException
incrementToken
in class TokenStream
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.