public class CacheCorpus extends Corpus
cacheFile, config, encoding, eoc, table, trainWords, vocab, vocabIndexMap, vocabMaxSize, vocabSize| Constructor and Description |
|---|
CacheCorpus(Corpus cloneSrc) |
| Modifier and Type | Method and Description |
|---|---|
String |
nextWord()
Read the next word from the corpus
|
int |
readWordIndex() |
void |
rewind(int numThreads,
int id)
reset current corpus to initial status
|
addWordToVocab, close, endOfCorpus, getTrainWords, getVocab, getVocabIndexMap, getVocabSize, shutdownpublic CacheCorpus(Corpus cloneSrc) throws IOException
IOExceptionpublic String nextWord() throws IOException
CorpusnextWord in class CorpusIOExceptionpublic int readWordIndex()
throws IOException
readWordIndex in class CorpusIOExceptionpublic void rewind(int numThreads,
int id)
throws IOException
Corpusrewind in class CorpusIOExceptionCopyright © 2014–2021 码农场. All rights reserved.