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