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:
authorHieu Hoang <fishandfrolick@gmail.com>2012-07-01 00:39:10 +0400
committerHieu Hoang <fishandfrolick@gmail.com>2012-07-01 00:39:10 +0400
commit121e258e84c78e1a2f08ed07b00d795e56e4a17b (patch)
tree2188ed0fe48c2adcfcbfdf15235a72ee0d7372a6 /phrase-extract
parente3dd3a8d2c72f5f1d60b4ec12a628f319a1f1906 (diff)
namespace all classes in mert directory
Diffstat (limited to 'phrase-extract')
-rw-r--r--phrase-extract/extract-ghkm/XmlTreeParser.cpp2
-rw-r--r--phrase-extract/extract-ghkm/XmlTreeParser.h4
-rw-r--r--phrase-extract/extract-lex.cpp5
-rw-r--r--phrase-extract/pcfg-common/xml_tree_parser.cc2
-rw-r--r--phrase-extract/pcfg-common/xml_tree_parser.h4
-rw-r--r--phrase-extract/relax-parse.cpp1
-rw-r--r--phrase-extract/relax-parse.h8
7 files changed, 18 insertions, 8 deletions
diff --git a/phrase-extract/extract-ghkm/XmlTreeParser.cpp b/phrase-extract/extract-ghkm/XmlTreeParser.cpp
index cc961dc0c..b195131cb 100644
--- a/phrase-extract/extract-ghkm/XmlTreeParser.cpp
+++ b/phrase-extract/extract-ghkm/XmlTreeParser.cpp
@@ -27,6 +27,8 @@
#include <cassert>
#include <vector>
+using namespace MosesTraining;
+
namespace Moses {
namespace GHKM {
diff --git a/phrase-extract/extract-ghkm/XmlTreeParser.h b/phrase-extract/extract-ghkm/XmlTreeParser.h
index 664ab11a3..7b63ae1e4 100644
--- a/phrase-extract/extract-ghkm/XmlTreeParser.h
+++ b/phrase-extract/extract-ghkm/XmlTreeParser.h
@@ -43,13 +43,13 @@ class XmlTreeParser {
XmlTreeParser(std::set<std::string> &, std::map<std::string, int> &);
std::auto_ptr<ParseTree> Parse(const std::string &);
private:
- std::auto_ptr<ParseTree> ConvertTree(const SyntaxNode &,
+ std::auto_ptr<ParseTree> ConvertTree(const MosesTraining::SyntaxNode &,
const std::vector<std::string> &);
std::set<std::string> &m_labelSet;
std::map<std::string, int> &m_topLabelSet;
std::string m_line;
- SyntaxTree m_tree;
+ MosesTraining::SyntaxTree m_tree;
std::vector<std::string> m_words;
};
diff --git a/phrase-extract/extract-lex.cpp b/phrase-extract/extract-lex.cpp
index 9b03a6da0..a59450da8 100644
--- a/phrase-extract/extract-lex.cpp
+++ b/phrase-extract/extract-lex.cpp
@@ -6,6 +6,7 @@
#include "InputFileStream.h"
using namespace std;
+using namespace MosesTraining;
float COUNT_INCR = 1;
@@ -80,6 +81,9 @@ int main(int argc, char* argv[])
cerr << "\nFinished\n";
}
+namespace MosesTraining
+{
+
const std::string *Vocab::GetOrAdd(const std::string &word)
{
const string *ret = &(*m_coll.insert(word).first);
@@ -219,4 +223,5 @@ void WordCount::AddCount(float incr)
m_count += incr;
}
+} // namespace
diff --git a/phrase-extract/pcfg-common/xml_tree_parser.cc b/phrase-extract/pcfg-common/xml_tree_parser.cc
index fd9d11334..b6c1da177 100644
--- a/phrase-extract/pcfg-common/xml_tree_parser.cc
+++ b/phrase-extract/pcfg-common/xml_tree_parser.cc
@@ -27,6 +27,8 @@
#include <cassert>
#include <vector>
+using namespace MosesTraining;
+
namespace Moses {
namespace PCFG {
diff --git a/phrase-extract/pcfg-common/xml_tree_parser.h b/phrase-extract/pcfg-common/xml_tree_parser.h
index 6b418c44e..7d01b0684 100644
--- a/phrase-extract/pcfg-common/xml_tree_parser.h
+++ b/phrase-extract/pcfg-common/xml_tree_parser.h
@@ -40,13 +40,13 @@ class XmlTreeParser {
XmlTreeParser();
std::auto_ptr<PcfgTree> Parse(const std::string &);
private:
- std::auto_ptr<PcfgTree> ConvertTree(const SyntaxNode &,
+ std::auto_ptr<PcfgTree> ConvertTree(const MosesTraining::SyntaxNode &,
const std::vector<std::string> &);
std::set<std::string> m_labelSet;
std::map<std::string, int> m_topLabelSet;
std::string m_line;
- ::SyntaxTree m_tree;
+ MosesTraining::SyntaxTree m_tree;
std::vector<std::string> m_words;
};
diff --git a/phrase-extract/relax-parse.cpp b/phrase-extract/relax-parse.cpp
index 6e561b921..ac06174e8 100644
--- a/phrase-extract/relax-parse.cpp
+++ b/phrase-extract/relax-parse.cpp
@@ -25,6 +25,7 @@
#include "tables-core.h"
using namespace std;
+using namespace MosesTraining;
int main(int argc, char* argv[])
{
diff --git a/phrase-extract/relax-parse.h b/phrase-extract/relax-parse.h
index ae5994641..ec604405e 100644
--- a/phrase-extract/relax-parse.h
+++ b/phrase-extract/relax-parse.h
@@ -39,8 +39,8 @@ char SAMTLevel = 0;
// functions
void init(int argc, char* argv[]);
-void store( SyntaxTree &tree, std::vector<std::string> &words );
-void LeftBinarize( SyntaxTree &tree, ParentNodes &parents );
-void RightBinarize( SyntaxTree &tree, ParentNodes &parents );
-void SAMT( SyntaxTree &tree, ParentNodes &parents );
+void store( MosesTraining::SyntaxTree &tree, std::vector<std::string> &words );
+void LeftBinarize( MosesTraining::SyntaxTree &tree, MosesTraining::ParentNodes &parents );
+void RightBinarize( MosesTraining::SyntaxTree &tree, MosesTraining::ParentNodes &parents );
+void SAMT( MosesTraining::SyntaxTree &tree, MosesTraining::ParentNodes &parents );