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.
43 lines
991 B
C++
43 lines
991 B
C++
/*
|
|
* Generic hashmap manipulation functions
|
|
*/
|
|
#ifndef MERT_TER_HASHMAP_STRING_INFOS_H_
|
|
#define MERT_TER_HASHMAP_STRING_INFOS_H_
|
|
|
|
#include "stringInfosHasher.h"
|
|
#include <vector>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
|
|
using namespace std;
|
|
|
|
namespace HashMapSpace
|
|
{
|
|
class hashMapStringInfos
|
|
{
|
|
private:
|
|
vector<stringInfosHasher> m_hasher;
|
|
|
|
public:
|
|
// ~hashMap();
|
|
long hashValue ( string key );
|
|
int trouve ( long searchKey );
|
|
int trouve ( string key );
|
|
void addHasher ( string key, vector<string> value );
|
|
void addValue ( string key, vector<string> value );
|
|
stringInfosHasher getHasher ( string key );
|
|
vector<string> getValue ( string key );
|
|
// string searchValue ( string key );
|
|
void setValue ( string key , vector<string> value );
|
|
void printHash();
|
|
vector<stringInfosHasher> getHashMap();
|
|
string printStringHash();
|
|
string printStringHash2();
|
|
string printStringHashForLexicon();
|
|
};
|
|
|
|
}
|
|
|
|
#endif // MERT_TER_HASHMAP_STRING_INFOS_H_
|