Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Seide <fseide@microsoft.com>2019-02-17 02:04:51 +0300
committerFrank Seide <fseide@microsoft.com>2019-02-17 02:04:51 +0300
commit980cc933aa332c7870d13aacc877bdf5045f3ed5 (patch)
tree06c482e6e19e1fa3e05cc746f01c3232371659d1 /src/data/vocab.h
parentf19def2803b836e6fbc2df5f217e4c245969c4be (diff)
moved gen of rand word from fakeBatch() to IVocab::randWord(), where factored vocab can override
Diffstat (limited to 'src/data/vocab.h')
-rwxr-xr-xsrc/data/vocab.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/data/vocab.h b/src/data/vocab.h
index dd746ba9..c6f92c90 100755
--- a/src/data/vocab.h
+++ b/src/data/vocab.h
@@ -69,6 +69,9 @@ public:
// create fake vocabulary for collecting batch statistics
void createFake();
+ // generate a fake word (using rand())
+ Word randWord();
+
// give access to base implementation. Returns null if not the requested type.
template<class VocabType> // e.g. FactoredVocab
Ptr<VocabType> tryAs() const { return std::dynamic_pointer_cast<VocabType>(vImpl_); }