made complaint with namespace irstlm recently introduced in IRSTLM package

This commit is contained in:
Nicola Bertoldi 2014-05-17 21:20:51 +02:00
parent fe1ed42f81
commit 923305a5d0
2 changed files with 12 additions and 0 deletions

View File

@ -26,6 +26,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "n_gram.h"
#include "lmContainer.h"
using namespace irstlm;
#include "IRST.h"
#include "moses/TypeDef.h"
#include "moses/Util.h"
@ -39,6 +41,7 @@ using namespace std;
namespace Moses
{
LanguageModelIRST::LanguageModelIRST(const std::string &line)
:LanguageModelSingleFactor(line)
{

View File

@ -29,9 +29,18 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include "moses/Util.h"
#include "SingleFactor.h"
//this is required because:
//- IRSTLM package uses the namespace irstlm
//- the compilation of "IRST.cpp" requires "using namespace irstlm", which is defined in any file of the IRSTLM package
// but conflicts with these foward declaration of class lmContainer
//- for files in moses/LM the IRSTLM include directory is set
// but not for the rest of files
#ifdef LM_IRST
class lmContainer; // irst lm container for any lm type
class ngram;
class dictionary;
#endif
namespace Moses
{