Class UserMorphData
java.lang.Object
org.apache.lucene.analysis.ko.dict.UserMorphData
- All Implemented Interfaces:
KoMorphData
,MorphData
Morphological information for user dictionary.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.lucene.analysis.ko.dict.KoMorphData
KoMorphData.Morpheme
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final short
private final short[]
private final int[][]
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getLeftId
(int morphId) Get left id of specified wordgetLeftPOS
(int morphId) Get the leftPOS.Tag
of specfied word.getMorphemes
(int morphId, char[] surfaceForm, int off, int len) Get the morphemes of specified word (e.g.getPOSType
(int morphId) Get thePOS.Type
of specified word (morpheme, compound, inflect or pre-analysis)getReading
(int morphId) Get the reading of specified word (mainly used for Hanja to Hangul conversion).int
getRightId
(int morphId) Get right id of specified wordgetRightPOS
(int morphId) Get the rightPOS.Tag
of specfied word.int
getWordCost
(int morphId) Get word cost of specified word
-
Field Details
-
WORD_COST
private static final int WORD_COST- See Also:
-
LEFT_ID
private static final short LEFT_ID- See Also:
-
segmentations
private final int[][] segmentations -
rightIds
private final short[] rightIds
-
-
Constructor Details
-
UserMorphData
UserMorphData(int[][] segmentations, short[] rightIds)
-
-
Method Details
-
getLeftId
public int getLeftId(int morphId) Description copied from interface:MorphData
Get left id of specified word -
getRightId
public int getRightId(int morphId) Description copied from interface:MorphData
Get right id of specified word- Specified by:
getRightId
in interfaceMorphData
- Returns:
- right id
-
getWordCost
public int getWordCost(int morphId) Description copied from interface:MorphData
Get word cost of specified word- Specified by:
getWordCost
in interfaceMorphData
- Returns:
- word's cost
-
getPOSType
Description copied from interface:KoMorphData
Get thePOS.Type
of specified word (morpheme, compound, inflect or pre-analysis)- Specified by:
getPOSType
in interfaceKoMorphData
-
getLeftPOS
Description copied from interface:KoMorphData
Get the leftPOS.Tag
of specfied word.For
POS.Type.MORPHEME
andPOS.Type.COMPOUND
the left and right POS are the same.- Specified by:
getLeftPOS
in interfaceKoMorphData
-
getRightPOS
Description copied from interface:KoMorphData
Get the rightPOS.Tag
of specfied word.For
POS.Type.MORPHEME
andPOS.Type.COMPOUND
the left and right POS are the same.- Specified by:
getRightPOS
in interfaceKoMorphData
-
getReading
Description copied from interface:KoMorphData
Get the reading of specified word (mainly used for Hanja to Hangul conversion).- Specified by:
getReading
in interfaceKoMorphData
-
getMorphemes
Description copied from interface:KoMorphData
Get the morphemes of specified word (e.g. 가깝으나: 가깝 + 으나).- Specified by:
getMorphemes
in interfaceKoMorphData
-