mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
47ac8a474d
This change might be useful to avoid duplicating the names. The reason is that although MERT programs are standalone applications, some header files such as data.h and point.h have common guard macro names like "DATA_H" and "POINT_H", and this is not good naming conventions when you want to include external headers. Some files actually include headers in Moses and KenLM's util.
43 lines
928 B
C++
43 lines
928 B
C++
/*
|
|
* Generic hashmap manipulation functions
|
|
*/
|
|
#ifndef MERT_TER_HASHMAP_INFOS_H_
|
|
#define MERT_TER_HASHMAP_INFOS_H_
|
|
|
|
#include "infosHasher.h"
|
|
#include <vector>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
|
|
using namespace std;
|
|
|
|
namespace HashMapSpace
|
|
{
|
|
class hashMapInfos
|
|
{
|
|
private:
|
|
vector<infosHasher> m_hasher;
|
|
|
|
public:
|
|
// ~hashMap();
|
|
long hashValue ( string key );
|
|
int trouve ( long searchKey );
|
|
int trouve ( string key );
|
|
void addHasher ( string key, vector<int> value );
|
|
void addValue ( string key, vector<int> value );
|
|
infosHasher getHasher ( string key );
|
|
vector<int> getValue ( string key );
|
|
// string searchValue ( string key );
|
|
void setValue ( string key , vector<int> value );
|
|
void printHash();
|
|
vector<infosHasher> getHashMap();
|
|
string printStringHash();
|
|
string printStringHash2();
|
|
string printStringHashForLexicon();
|
|
};
|
|
|
|
}
|
|
|
|
#endif // MERT_TER_HASHMAP_INFOS_H_
|