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 shortprivate final short[]private final int[][]private static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetLeftId(int morphId) Get left id of specified wordgetLeftPOS(int morphId) Get the leftPOS.Tagof specfied word.getMorphemes(int morphId, char[] surfaceForm, int off, int len) Get the morphemes of specified word (e.g.getPOSType(int morphId) Get thePOS.Typeof specified word (morpheme, compound, inflect or pre-analysis)getReading(int morphId) Get the reading of specified word (mainly used for Hanja to Hangul conversion).intgetRightId(int morphId) Get right id of specified wordgetRightPOS(int morphId) Get the rightPOS.Tagof specfied word.intgetWordCost(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:MorphDataGet left id of specified word -
getRightId
public int getRightId(int morphId) Description copied from interface:MorphDataGet right id of specified word- Specified by:
getRightIdin interfaceMorphData- Returns:
- right id
-
getWordCost
public int getWordCost(int morphId) Description copied from interface:MorphDataGet word cost of specified word- Specified by:
getWordCostin interfaceMorphData- Returns:
- word's cost
-
getPOSType
Description copied from interface:KoMorphDataGet thePOS.Typeof specified word (morpheme, compound, inflect or pre-analysis)- Specified by:
getPOSTypein interfaceKoMorphData
-
getLeftPOS
Description copied from interface:KoMorphDataGet the leftPOS.Tagof specfied word.For
POS.Type.MORPHEMEandPOS.Type.COMPOUNDthe left and right POS are the same.- Specified by:
getLeftPOSin interfaceKoMorphData
-
getRightPOS
Description copied from interface:KoMorphDataGet the rightPOS.Tagof specfied word.For
POS.Type.MORPHEMEandPOS.Type.COMPOUNDthe left and right POS are the same.- Specified by:
getRightPOSin interfaceKoMorphData
-
getReading
Description copied from interface:KoMorphDataGet the reading of specified word (mainly used for Hanja to Hangul conversion).- Specified by:
getReadingin interfaceKoMorphData
-
getMorphemes
Description copied from interface:KoMorphDataGet the morphemes of specified word (e.g. 가깝으나: 가깝 + 으나).- Specified by:
getMorphemesin interfaceKoMorphData
-