Class UserDictionary
java.lang.Object
org.apache.lucene.analysis.ko.dict.UserDictionary
- All Implemented Interfaces:
Dictionary<UserMorphData>
Class for building a User Dictionary. This class allows for adding custom nouns (세종) or compounds
(세종시 세종 시).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TokenInfoFST
private UserMorphData
private static final short
private static final short
private static final short
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFST()
lookup
(char[] chars, int off, int len) Lookup words in textstatic UserDictionary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.lucene.analysis.morph.Dictionary
getLeftId, getRightId, getWordCost
-
Field Details
-
fst
-
RIGHT_ID
private static final short RIGHT_ID- See Also:
-
RIGHT_ID_T
private static final short RIGHT_ID_T- See Also:
-
RIGHT_ID_F
private static final short RIGHT_ID_F- See Also:
-
morphAtts
-
-
Constructor Details
-
UserDictionary
- Throws:
IOException
-
-
Method Details
-
open
- Throws:
IOException
-
getFST
-
getMorphAttributes
- Specified by:
getMorphAttributes
in interfaceDictionary<UserMorphData>
-
lookup
Lookup words in text- Parameters:
chars
- textoff
- offset into textlen
- length of text- Returns:
- array of wordId
- Throws:
IOException
-