minor compile error

This commit is contained in:
Hieu Hoang 2014-02-25 13:17:08 +00:00
parent 98b602e656
commit e8313145ae
5 changed files with 11 additions and 10 deletions

View File

@ -16,10 +16,10 @@ ConsistentPhrase::ConsistentPhrase(const ConsistentPhrase &copy)
{
for (size_t i = 0; i < copy.m_nonTerms.size(); ++i) {
const NonTerm &oldNonTerm = copy.m_nonTerms[i];
m_nonTerms.push_back(NonTerm(
*this,
oldNonTerm.GetLabel(Moses::Input),
oldNonTerm.GetLabel(Moses::Output)));
m_nonTerms.push_back(NonTerm (*this,
oldNonTerm.GetLabel(Moses::Input),
oldNonTerm.GetLabel(Moses::Output)));
}
}

View File

@ -9,7 +9,7 @@
#include <set>
#include <vector>
#include <iostream>
#include <ConsistentPhrase.h>
#include "ConsistentPhrase.h"
class Word;

View File

@ -15,7 +15,7 @@ using namespace std;
NonTerm::NonTerm(const ConsistentPhrase &consistentPhrase,
const std::string &source,
const std::string &target)
:m_consistentPhrase(consistentPhrase)
:m_consistentPhrase(&consistentPhrase)
,m_source(source)
,m_target(target)
{
@ -31,7 +31,7 @@ std::string NonTerm::Debug() const
{
stringstream out;
out << m_source << m_target;
out << "m_consistentPhrase=" << m_consistentPhrase.Debug();
out << "m_consistentPhrase=" << m_consistentPhrase->Debug();
return out.str();
}

View File

@ -14,13 +14,14 @@ class ConsistentPhrase;
class NonTerm : public RuleSymbol
{
public:
NonTerm(const ConsistentPhrase &consistentPhrase,
const std::string &source,
const std::string &target);
virtual ~NonTerm();
const ConsistentPhrase &GetConsistentPhrase() const
{ return m_consistentPhrase; }
{ return *m_consistentPhrase; }
virtual bool IsNonTerm() const
{ return true; }
@ -32,7 +33,7 @@ public:
const std::string &GetLabel(Moses::FactorDirection direction) const;
protected:
const ConsistentPhrase &m_consistentPhrase;
const ConsistentPhrase *m_consistentPhrase;
std::string m_source, m_target;
};

View File

@ -5,7 +5,7 @@
* Author: hieu
*/
#include <RuleSymbol.h>
#include "RuleSymbol.h"
RuleSymbol::RuleSymbol() {
// TODO Auto-generated constructor stub