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

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarry Haddow <barry.haddow@gmail.com>2014-08-06 18:29:39 +0400
committerBarry Haddow <barry.haddow@gmail.com>2014-08-06 18:29:39 +0400
commitc99a889420a8ce947fc84192a2395fc2152849a7 (patch)
treee924e41e8e3f6072685899fe2a8ebe62b624a2af /moses/HypergraphOutput.h
parent9106854ec73e5023ad8183ef39b02270bc82566a (diff)
Refactor hypergraph output code
Diffstat (limited to 'moses/HypergraphOutput.h')
-rw-r--r--moses/HypergraphOutput.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/moses/HypergraphOutput.h b/moses/HypergraphOutput.h
new file mode 100644
index 000000000..450cf3605
--- /dev/null
+++ b/moses/HypergraphOutput.h
@@ -0,0 +1,51 @@
+// $Id$
+// vim:tabstop=2
+
+/***********************************************************************
+Moses - factored phrase-based language decoder
+Copyright (C) 2014- University of Edinburgh
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+***********************************************************************/
+
+#ifndef moses_Hypergraph_Output_h
+#define moses_Hypergraph_Output_h
+
+/**
+* Manage the output of hypergraphs.
+**/
+
+namespace Moses {
+
+class Manager;
+
+class HypergraphOutput {
+
+public:
+ /** Initialise output directory and create weights file */
+ HypergraphOutput(size_t precision);
+
+ /** Write this hypergraph to file */
+ void Write(const Manager& manager) const;
+
+private:
+ size_t m_precision;
+ std::string m_hypergraphDir;
+ std::string m_compression;
+ bool m_appendSuffix;
+};
+
+}
+#endif