public final class UnknownDictionary extends BinaryDictionary
BinaryDictionary.ResourceScheme
DICT_FILENAME_SUFFIX, DICT_HEADER, HAS_BASEFORM, HAS_PRONUNCIATION, HAS_READING, POSDICT_FILENAME_SUFFIX, POSDICT_HEADER, TARGETMAP_FILENAME_SUFFIX, TARGETMAP_HEADER, VERSION
INTERNAL_SEPARATOR
Constructor and Description |
---|
UnknownDictionary(BinaryDictionary.ResourceScheme scheme,
String path) |
Modifier and Type | Method and Description |
---|---|
CharacterDefinition |
getCharacterDefinition() |
String |
getInflectionForm(int wordId)
Get inflection form of tokens
|
String |
getInflectionType(int wordId)
Get inflection type of tokens
|
static UnknownDictionary |
getInstance() |
String |
getReading(int wordId,
char[] surface,
int off,
int len)
Get reading of tokens
|
int |
lookup(char[] text,
int offset,
int len) |
getBaseForm, getClassResource, getLeftId, getPartOfSpeech, getPronunciation, getResource, getResource, getRightId, getWordCost, lookupWordIds
public UnknownDictionary(BinaryDictionary.ResourceScheme scheme, String path) throws IOException
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.IOException
public int lookup(char[] text, int offset, int len)
public CharacterDefinition getCharacterDefinition()
public String getReading(int wordId, char[] surface, int off, int len)
Dictionary
getReading
in interface Dictionary
getReading
in class BinaryDictionary
wordId
- word ID of tokenpublic String getInflectionType(int wordId)
Dictionary
getInflectionType
in interface Dictionary
getInflectionType
in class BinaryDictionary
wordId
- word ID of tokenpublic String getInflectionForm(int wordId)
Dictionary
getInflectionForm
in interface Dictionary
getInflectionForm
in class BinaryDictionary
wordId
- word ID of tokenpublic static UnknownDictionary getInstance()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.