Class KatakanaRomanizer
java.lang.Object
org.apache.lucene.analysis.ja.completion.KatakanaRomanizer
Converts a Katakana string to Romaji using the pre-defined
Katakana-Romaji mapping rules. Internally, this repeatedly performs prefix match on the given
char sequence to the pre-built keystroke array until it reaches the end of the sequence, or there
are no matched keystrokes.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static KatakanaRomanizer
private final CharsRef[][]
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic KatakanaRomanizer
Returns the singleton instance ofKatakanaRomenizer
longestKeystrokeMatch
(CharsRef input, int inputOffset) Translates a sequence of katakana to romaji.
-
Field Details
-
ROMAJI_MAP_FILE
- See Also:
-
INSTANCE
-
keystrokes
-
romajiMap
-
-
Constructor Details
-
KatakanaRomanizer
-
-
Method Details
-
getInstance
Returns the singleton instance ofKatakanaRomenizer
-
romanize
Translates a sequence of katakana to romaji. An input can produce multiple outputs because a keystroke can be mapped to multiple romajis. -
longestKeystrokeMatch
-