mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
init moses2
This commit is contained in:
parent
5d851f3838
commit
f467e60fe0
@ -5,8 +5,7 @@
|
||||
* Author: hieu
|
||||
*/
|
||||
|
||||
#ifndef FACTOR_H_
|
||||
#define FACTOR_H_
|
||||
#pragma once
|
||||
|
||||
#include "util/string_piece.hh"
|
||||
#include "util/string_piece_hash.hh"
|
||||
@ -23,7 +22,7 @@ public:
|
||||
}
|
||||
|
||||
inline bool operator==(const Factor &compare) const {
|
||||
return m_string == &compare.m_string;
|
||||
return m_string == compare.m_string;
|
||||
}
|
||||
|
||||
protected:
|
||||
@ -31,4 +30,3 @@ protected:
|
||||
|
||||
};
|
||||
|
||||
#endif /* FACTOR_H_ */
|
||||
|
15
contrib/other-builds/moses2/Main.cpp
Normal file
15
contrib/other-builds/moses2/Main.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include <iostream>
|
||||
#include "StaticData.cpp"
|
||||
#include "Word.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main()
|
||||
{
|
||||
cerr << "Starting..." << endl;
|
||||
|
||||
//StaticData sd;
|
||||
//Word w;
|
||||
|
||||
cerr << "Finished" << endl;
|
||||
}
|
18
contrib/other-builds/moses2/StaticData.cpp
Normal file
18
contrib/other-builds/moses2/StaticData.cpp
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* StaticData.cpp
|
||||
*
|
||||
* Created on: 23 Oct 2015
|
||||
* Author: hieu
|
||||
*/
|
||||
|
||||
#include "StaticData.h"
|
||||
|
||||
StaticData::StaticData() {
|
||||
// TODO Auto-generated constructor stub
|
||||
|
||||
}
|
||||
|
||||
StaticData::~StaticData() {
|
||||
// TODO Auto-generated destructor stub
|
||||
}
|
||||
|
15
contrib/other-builds/moses2/StaticData.h
Normal file
15
contrib/other-builds/moses2/StaticData.h
Normal file
@ -0,0 +1,15 @@
|
||||
/*
|
||||
* StaticData.h
|
||||
*
|
||||
* Created on: 23 Oct 2015
|
||||
* Author: hieu
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
class StaticData {
|
||||
public:
|
||||
StaticData();
|
||||
virtual ~StaticData();
|
||||
};
|
||||
|
@ -9,8 +9,8 @@
|
||||
#define VOCAB_H_
|
||||
|
||||
#include <boost/unordered_set.hpp>
|
||||
#include "util/string_piece.hh"
|
||||
#include "moses/Util.h"
|
||||
//#include "util/string_piece.hh"
|
||||
//#include "moses/Util.h"
|
||||
|
||||
class Vocab {
|
||||
public:
|
||||
@ -21,13 +21,13 @@ public:
|
||||
Vocab();
|
||||
virtual ~Vocab();
|
||||
|
||||
const Factor *AddFactor(const StringPiece &factorString);
|
||||
//const Factor *AddFactor(const StringPiece &factorString);
|
||||
|
||||
protected:
|
||||
static Vocab s_instance;
|
||||
|
||||
typedef boost::unordered_set<Factor*, Moses::UnorderedComparer<Factor>, Moses::UnorderedComparer<Factor>> Set;
|
||||
Set m_set;
|
||||
//typedef boost::unordered_set<Factor*, Moses::UnorderedComparer<Factor>, Moses::UnorderedComparer<Factor>> Set;
|
||||
//Set m_set;
|
||||
|
||||
|
||||
};
|
||||
|
@ -1 +1,2 @@
|
||||
g++ -I../../.. -I../../../boost/include StaticData.cpp Factor.cpp Word.cpp
|
||||
#g++ -I../../.. -I../../../boost/include Factor.cpp Word.cpp StaticData.cpp Main.cpp
|
||||
g++ -I../../.. -I../../../boost/include StaticData.cpp Main.cpp
|
||||
|
Loading…
Reference in New Issue
Block a user