AlexSSH

Untitled

Feb 17th, 2023
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. struct DocumentData {
  2.         std::set<std::string> content;
  3.         std::map<std::string_view, double> freqs;
  4.         int rating;
  5.         DocumentStatus status;
  6.     };
  7.  
  8.     std::set<std::string_view> stop_words_;
  9.     std::map<std::string_view, std::map<int, double>> word_to_document_freqs_;
  10.     std::map<int, DocumentData> documents_;
  11.     std::set<int> document_ids_;
  12.  
  13.     struct QueryWord {
  14.         std::string data;
  15.         bool is_minus;
  16.         bool is_stop;
  17.     };
  18.  
  19.     struct Query {
  20.         std::set<std::string> plus_words;
  21.         std::set<std::string> minus_words;
  22.     };
  23.  
  24.     struct QueryVector {
  25.         std::vector<std::string> plus_words;
  26.         std::vector<std::string> minus_words;
  27.     };
Advertisement
Add Comment
Please, Sign In to add comment