public abstract class TokenInfoDictionaryCompilerBase<T extends DictionaryEntryBase> extends java.lang.Object implements Compiler
Modifier and Type | Field and Description |
---|---|
protected java.util.List<BufferEntry> |
bufferEntries |
protected java.util.List<GenericDictionaryEntry> |
dictionaryEntries |
protected FeatureInfoMap |
otherInfo |
protected FeatureInfoMap |
posInfo |
protected WordIdMapCompiler |
wordIdsCompiler |
Constructor and Description |
---|
TokenInfoDictionaryCompilerBase(java.lang.String encoding) |
Modifier and Type | Method and Description |
---|---|
void |
addMapping(int sourceId,
int wordId) |
void |
analyzeTokenInfo(java.io.InputStream input) |
java.io.InputStream |
combinedSequentialFileInputStream(java.io.File dir) |
void |
compile() |
protected abstract GenericDictionaryEntry |
generateGenericDictionaryEntry(T entry) |
java.util.List<BufferEntry> |
getBufferEntries()
Deprecated.
|
java.util.List<java.io.File> |
getCsvFiles(java.io.File dir) |
java.util.List<GenericDictionaryEntry> |
getDictionaryEntries()
Deprecated.
|
java.util.List<java.lang.String> |
getSurfaces() |
WordIdMap |
getWordIdMap()
Deprecated.
|
protected abstract T |
parse(java.lang.String line) |
void |
readTokenInfo(java.io.InputStream input) |
void |
setDictionaryEntries(java.util.List<GenericDictionaryEntry> dictionaryEntries)
Deprecated.
|
void |
write(java.lang.String directoryName) |
protected void |
writeDictionary(java.lang.String filename) |
protected void |
writeMap(java.lang.String filename,
FeatureInfoMap map) |
protected void |
writeWordIds(java.lang.String filename) |
protected java.util.List<BufferEntry> bufferEntries
protected FeatureInfoMap posInfo
protected FeatureInfoMap otherInfo
protected WordIdMapCompiler wordIdsCompiler
protected java.util.List<GenericDictionaryEntry> dictionaryEntries
public TokenInfoDictionaryCompilerBase(java.lang.String encoding)
public void analyzeTokenInfo(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public void readTokenInfo(java.io.InputStream input) throws java.io.IOException
java.io.IOException
protected abstract GenericDictionaryEntry generateGenericDictionaryEntry(T entry)
protected abstract T parse(java.lang.String line)
public void compile() throws java.io.IOException
public java.io.InputStream combinedSequentialFileInputStream(java.io.File dir) throws java.io.FileNotFoundException
java.io.FileNotFoundException
public java.util.List<java.io.File> getCsvFiles(java.io.File dir)
public void addMapping(int sourceId, int wordId)
public java.util.List<java.lang.String> getSurfaces()
public void write(java.lang.String directoryName) throws java.io.IOException
java.io.IOException
protected void writeMap(java.lang.String filename, FeatureInfoMap map) throws java.io.IOException
java.io.IOException
protected void writeDictionary(java.lang.String filename) throws java.io.IOException
java.io.IOException
protected void writeWordIds(java.lang.String filename) throws java.io.IOException
java.io.IOException
@Deprecated public WordIdMap getWordIdMap() throws java.io.IOException
java.io.IOException
@Deprecated public java.util.List<BufferEntry> getBufferEntries()
@Deprecated public java.util.List<GenericDictionaryEntry> getDictionaryEntries()
@Deprecated public void setDictionaryEntries(java.util.List<GenericDictionaryEntry> dictionaryEntries)