mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-29 06:52:34 +03:00
minor compile error
This commit is contained in:
parent
98b602e656
commit
e8313145ae
@ -16,10 +16,10 @@ ConsistentPhrase::ConsistentPhrase(const ConsistentPhrase ©)
|
||||
{
|
||||
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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <ConsistentPhrase.h>
|
||||
#include "ConsistentPhrase.h"
|
||||
|
||||
class Word;
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
* Author: hieu
|
||||
*/
|
||||
|
||||
#include <RuleSymbol.h>
|
||||
#include "RuleSymbol.h"
|
||||
|
||||
RuleSymbol::RuleSymbol() {
|
||||
// TODO Auto-generated constructor stub
|
||||
|
Loading…
Reference in New Issue
Block a user