public class TextFileCorpus extends Corpus
cacheFile, config, encoding, eoc, table, trainWords, vocab, vocabIndexMap, vocabMaxSize, vocabSize| 构造器和说明 |
|---|
TextFileCorpus(Config config) |
| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 CorpusIOExceptionpublic void rewind(int numThreads,
int id)
throws IOException
Corpusrewind 在类中 CorpusIOExceptionpublic String nextWord() throws IOException
CorpusnextWord 在类中 CorpusIOExceptionpublic void learnVocab()
throws IOException
IOExceptionCopyright © 2014–2017 码农场. All rights reserved.