Class UnknownDictionary
java.lang.Object
org.apache.lucene.analysis.ja.dict.BinaryDictionary
org.apache.lucene.analysis.ja.dict.UnknownDictionary
- All Implemented Interfaces:
Dictionary
Dictionary for unknown-word handling.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.apache.lucene.analysis.ja.dict.BinaryDictionary
BinaryDictionary.ResourceScheme -
Field Summary
FieldsFields inherited from class org.apache.lucene.analysis.ja.dict.BinaryDictionary
DICT_FILENAME_SUFFIX, DICT_HEADER, HAS_BASEFORM, HAS_PRONUNCIATION, HAS_READING, POSDICT_FILENAME_SUFFIX, POSDICT_HEADER, TARGETMAP_FILENAME_SUFFIX, TARGETMAP_HEADER, VERSIONFields inherited from interface org.apache.lucene.analysis.ja.dict.Dictionary
INTERNAL_SEPARATOR -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateUnknownDictionary(BinaryDictionary.ResourceScheme scheme, String path) -
Method Summary
Modifier and TypeMethodDescriptiongetInflectionForm(int wordId) Get inflection form of tokensgetInflectionType(int wordId) Get inflection type of tokensstatic UnknownDictionarygetReading(int wordId, char[] surface, int off, int len) Get reading of tokensintlookup(char[] text, int offset, int len) Methods inherited from class org.apache.lucene.analysis.ja.dict.BinaryDictionary
getBaseForm, getClassResource, getLeftId, getPartOfSpeech, getPronunciation, getResource, getResource, getRightId, getWordCost, lookupWordIds
-
Field Details
-
characterDefinition
-
-
Constructor Details
-
UnknownDictionary
- Parameters:
scheme- scheme for loading resources (FILE or CLASSPATH).path- where to load resources from; a path, including the file base name without extension; this is used to match multiple files with the same base name.- Throws:
IOException
-
UnknownDictionary
- Throws:
IOException
-
-
Method Details
-
lookup
public int lookup(char[] text, int offset, int len) -
getCharacterDefinition
-
getReading
Description copied from interface:DictionaryGet reading of tokens- Specified by:
getReadingin interfaceDictionary- Overrides:
getReadingin classBinaryDictionary- Parameters:
wordId- word ID of token- Returns:
- Reading of the token
-
getInflectionType
Description copied from interface:DictionaryGet inflection type of tokens- Specified by:
getInflectionTypein interfaceDictionary- Overrides:
getInflectionTypein classBinaryDictionary- Parameters:
wordId- word ID of token- Returns:
- inflection type, or null
-
getInflectionForm
Description copied from interface:DictionaryGet inflection form of tokens- Specified by:
getInflectionFormin interfaceDictionary- Overrides:
getInflectionFormin classBinaryDictionary- Parameters:
wordId- word ID of token- Returns:
- inflection form, or null
-
getInstance
-