mosesdecoder/probingpt/vocabid.h

30 lines
781 B
C
Raw Normal View History

2015-11-13 03:05:54 +03:00
//Serialization
#include <boost/serialization/serialization.hpp>
#include <boost/serialization/map.hpp>
#include <boost/archive/text_iarchive.hpp>
#include <boost/archive/text_oarchive.hpp>
#include <fstream>
#include <iostream>
#include <vector>
#include <map> //Container
#include "hash.h" //Hash of elements
2015-11-13 03:05:54 +03:00
#include "util/string_piece.hh" //Tokenization and work with StringPiece
#include "util/tokenize_piece.hh"
2017-02-16 00:26:28 +03:00
namespace probingpt
2015-12-10 23:49:30 +03:00
{
template<typename VOCABID>
class StoreVocab;
2015-12-10 23:49:30 +03:00
void add_to_map(StoreVocab<uint64_t> &sourceVocab,
2017-02-01 03:59:30 +03:00
const StringPiece &textin);
void serialize_map(const std::map<uint64_t, std::string> &karta,
2017-02-01 03:59:30 +03:00
const std::string &filename);
void read_map(std::map<uint64_t, std::string> &karta, const char* filename);
2015-12-10 23:49:30 +03:00
}