mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 05:55:02 +03:00
8c3b82e596
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.
44 lines
850 B
C++
44 lines
850 B
C++
/*
|
|
* Generic hashmap manipulation functions
|
|
*/
|
|
|
|
#ifndef MERT_TER_HASHMAP_H_
|
|
#define MERT_TER_HASHMAP_H_
|
|
|
|
#include "stringHasher.h"
|
|
#include <vector>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
#include <locale>
|
|
|
|
using namespace std;
|
|
|
|
namespace HashMapSpace
|
|
{
|
|
class hashMap
|
|
{
|
|
private:
|
|
vector<stringHasher> m_hasher;
|
|
|
|
public:
|
|
// ~hashMap();
|
|
long hashValue ( string key );
|
|
int trouve ( long searchKey );
|
|
int trouve ( string key );
|
|
void addHasher ( string key, string value );
|
|
stringHasher getHasher ( string key );
|
|
string getValue ( string key );
|
|
string searchValue ( string key );
|
|
void setValue ( string key , string value );
|
|
void printHash();
|
|
vector<stringHasher> getHashMap();
|
|
string printStringHash();
|
|
string printStringHash2();
|
|
string printStringHashForLexicon();
|
|
};
|
|
|
|
}
|
|
|
|
#endif // MERT_TER_HASHMAP_H_
|