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
|
2017-02-16 22:30:07 +03:00
|
|
|
#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
|
|
|
{
|
2016-06-16 13:01:58 +03:00
|
|
|
template<typename VOCABID>
|
|
|
|
class StoreVocab;
|
2015-12-10 23:49:30 +03:00
|
|
|
|
2016-06-16 13:01:58 +03:00
|
|
|
void add_to_map(StoreVocab<uint64_t> &sourceVocab,
|
2017-02-01 03:59:30 +03:00
|
|
|
const StringPiece &textin);
|
2016-06-16 12:05:17 +03:00
|
|
|
|
|
|
|
void serialize_map(const std::map<uint64_t, std::string> &karta,
|
2017-02-01 03:59:30 +03:00
|
|
|
const std::string &filename);
|
2016-06-16 12:05:17 +03:00
|
|
|
|
|
|
|
void read_map(std::map<uint64_t, std::string> &karta, const char* filename);
|
2015-12-10 23:49:30 +03:00
|
|
|
|
|
|
|
}
|