-
Notifications
You must be signed in to change notification settings - Fork 1
/
UserInterface.h
44 lines (35 loc) · 1.02 KB
/
UserInterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Created by Karina Shin on 4/23/2022.
//
#ifndef INC_22S_FINAL_PROJ_USERINTERFACE_H
#define INC_22S_FINAL_PROJ_USERINTERFACE_H
#include <iostream>
#include <chrono>
#include <map>
#include "DocParser.h"
#include "QueryProcessor.h"
#include "DSAVLTree.h"
#include "Word.h"
#include "Document.h"
#include "StopWord.h"
#include "include/rapidjson/document.h"
using namespace std;
class UserInterface {
private:
DocParser docReader;
QueryProcessor process;
StopWord stops;
map<int, Word> bestWords;//for ranking
public:
UserInterface();
void run(const string& file);//run search engine
void clearIndex();//delete every tree
void displayResults();
void showText(Document& d);
void stats();
void topWordsHelper(Node<Word>* n);//populates frequency and word vectors
void getTopWords();//prints out top 25 most frequent words
DocParser& getDocParser();//used to access word/org/person avl trees
QueryProcessor& getQueryProcessor();
};
#endif //INC_22S_FINAL_PROJ_USERINTERFACE_H