@Deprecated public class RuleBasedTransliterator extends Transliterator
RuleBasedTransliterator
is a transliterator
built from a set of rules as defined for
Transliterator.createFromRules(String, String, int)
.
See the class Transliterator
documentation for the rule syntax.Transliterator.Factory, Transliterator.Position
FORWARD, REVERSE
Modifier and Type | Method and Description |
---|---|
void |
addSourceTargetSet(UnicodeSet filter,
UnicodeSet sourceSet,
UnicodeSet targetSet)
Deprecated.
This API is ICU internal only.
|
protected void |
handleTransliterate(Replaceable text,
Transliterator.Position index,
boolean incremental)
Deprecated.
This API is ICU internal only.
|
Transliterator |
safeClone()
Deprecated.
This API is ICU internal only.
|
String |
toRules(boolean escapeUnprintable)
Deprecated.
This API is ICU internal only.
|
baseToRules, createFromRules, filteredTransliterate, finishTransliteration, getAvailableIDs, getAvailableSources, getAvailableTargets, getAvailableVariants, getDisplayName, getDisplayName, getDisplayName, getElements, getFilter, getFilterAsUnicodeSet, getID, getInstance, getInstance, getInverse, getMaximumContextLength, getSourceSet, getTargetSet, handleGetSourceSet, registerAlias, registerAny, registerClass, registerFactory, registerInstance, setFilter, setID, setMaximumContextLength, transform, transliterate, transliterate, transliterate, transliterate, transliterate, transliterate, unregister
@Deprecated protected void handleTransliterate(Replaceable text, Transliterator.Position index, boolean incremental)
handleTransliterate
in class Transliterator
text
- the buffer holding transliterated and
untransliterated textindex
- the indices indicating the start, limit, context
start, and context limit of the text.incremental
- if true, assume more text may be inserted at
pos.limit
and act accordingly. Otherwise,
transliterate all text between pos.start
and
pos.limit
and move pos.start
up to
pos.limit
.Transliterator.transliterate(com.ibm.icu.text.Replaceable, int, int)
@Deprecated public String toRules(boolean escapeUnprintable)
toRules
in class Transliterator
escapeUnprintable
- if true then convert unprintable
character to their hex escape representations, \\uxxxx or
\\Uxxxxxxxx. Unprintable characters are those other than
U+000A, U+0020..U+007E.@Deprecated public void addSourceTargetSet(UnicodeSet filter, UnicodeSet sourceSet, UnicodeSet targetSet)
Transliterator
SHOULD BE OVERRIDDEN BY SUBCLASSES. It is probably an error for any transliterator to NOT override this, but we can't force them to for backwards compatibility.
Other methods vector through this.
When gathering the information on source and target, the compound transliterator makes things complicated. For example, suppose we have:
Global FILTER = [ax] a > b; :: NULL; b > c; x > d;While the filter just allows a and x, b is an intermediate result, which could produce c. So the source and target sets cannot be gathered independently. What we have to do is filter the sources for the first transliterator according to the global filter, intersect that transliterator's filter. Based on that we get the target. The next transliterator gets as a global filter (global + last target). And so on.
There is another complication:
Global FILTER = [ax] a >|b; b >c;Even though b would be filtered from the input, whenever we have a backup, it could be part of the input. So ideally we will change the global filter as we go.
addSourceTargetSet
in class Transliterator
targetSet
- TODOTransliterator.getTargetSet()
@Deprecated public Transliterator safeClone()
Copyright © 2016 Unicode, Inc. and others.