summaryrefslogtreecommitdiff
path: root/utils/corpus_tools.h
diff options
context:
space:
mode:
authorChris Dyer <cdyer@cs.cmu.edu>2012-02-29 01:12:40 -0500
committerChris Dyer <cdyer@cs.cmu.edu>2012-02-29 01:12:40 -0500
commit54bcfb835232d190a5ab6f0bd825de8a50dae126 (patch)
tree161988135be75a47524cdf2efbba7bdf06c9bd65 /utils/corpus_tools.h
parent89238977fc9d8f8d9a6421b0d4f35afc200f08e7 (diff)
cleanup, mpi-ify lblmodel
Diffstat (limited to 'utils/corpus_tools.h')
-rw-r--r--utils/corpus_tools.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/utils/corpus_tools.h b/utils/corpus_tools.h
new file mode 100644
index 00000000..97bdaa94
--- /dev/null
+++ b/utils/corpus_tools.h
@@ -0,0 +1,19 @@
+#ifndef _CORPUS_TOOLS_H_
+#define _CORPUS_TOOLS_H_
+
+#include <string>
+#include <set>
+#include <vector>
+#include "wordid.h"
+
+struct CorpusTools {
+ static void ReadFromFile(const std::string& filename,
+ std::vector<std::vector<WordID> >* src,
+ std::set<WordID>* src_vocab = NULL,
+ std::vector<std::vector<WordID> >* trg = NULL,
+ std::set<WordID>* trg_vocab = NULL,
+ int rank = 0,
+ int size = 1);
+};
+
+#endif