-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileManagement.h
More file actions
21 lines (16 loc) · 812 Bytes
/
Copy pathFileManagement.h
File metadata and controls
21 lines (16 loc) · 812 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
//
// Created by Sammy Timmins on 8/31/20.
//
#ifndef S20_PA01_SENTIMENTANALYSIS_FILEMANAGEMENT_H
#define S20_PA01_SENTIMENTANALYSIS_FILEMANAGEMENT_H
#include <fstream>
#include <vector>
#include <map>
#include <set>
#include "DSString.h"
//change string to DLString when class is made
void readStopWords(ifstream &stopWordsFile, set<DSString>& stopWords);
void readData(std::ifstream &reviewsFile, std::vector<DSString>& reviews, std::vector<DSString>& sentiments);
void splitReviewsAndRemovePunctuation(std::vector<vector<DSString>>& tokens, std::vector<DSString>& reviews, set<DSString>& stopWords, const int start, const int size);
void addToVocab(std::vector<vector<DSString>>& tokens, vector<DSString>& sentiments, map<DSString, int>& vocabulary);
#endif //S20_PA01_SENTIMENTANALYSIS_FILEMANAGEMENT_H