Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- struct DocumentData {
- std::set<std::string> content;
- std::map<std::string_view, double> freqs;
- int rating;
- DocumentStatus status;
- };
- std::set<std::string_view> stop_words_;
- std::map<std::string_view, std::map<int, double>> word_to_document_freqs_;
- std::map<int, DocumentData> documents_;
- std::set<int> document_ids_;
- struct QueryWord {
- std::string data;
- bool is_minus;
- bool is_stop;
- };
- struct Query {
- std::set<std::string> plus_words;
- std::set<std::string> minus_words;
- };
- struct QueryVector {
- std::vector<std::string> plus_words;
- std::vector<std::string> minus_words;
- };
Advertisement
Add Comment
Please, Sign In to add comment