summaryrefslogtreecommitdiff
path: root/utils/corpus_tools.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-06-18 20:28:42 -0400
committerChris Dyer <cdyer@cs.cmu.edu>2012-06-18 20:28:42 -0400
commitb89a1d3cb72ac36c137d6ae342f48ab9b8ee6655 (patch)
tree74dbff7519a3f3fe6906fff44128563300fec19b /utils/corpus_tools.h
parent953ec50e659084c13433ea311f6a07e7e1b292f8 (diff)
add non-const iterators to sparse vector, speed up model1 code
Diffstat (limited to 'utils/corpus_tools.h')
-rw-r--r--utils/corpus_tools.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/corpus_tools.h b/utils/corpus_tools.h
index 97bdaa94..f6699d87 100644
--- a/utils/corpus_tools.h
+++ b/utils/corpus_tools.h
@@ -7,6 +7,10 @@
#include "wordid.h"
struct CorpusTools {
+ static void ReadLine(const std::string& line,
+ std::vector<WordID>* src,
+ std::vector<WordID>* trg);
+
static void ReadFromFile(const std::string& filename,
std::vector<std::vector<WordID> >* src,
std::set<WordID>* src_vocab = NULL,