-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatasetSentences.h
More file actions
32 lines (23 loc) · 809 Bytes
/
DatasetSentences.h
File metadata and controls
32 lines (23 loc) · 809 Bytes
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
#include<cstdio>
#include<vector>
#include<unordered_map>
using namespace std;
/**
* Map which keeps the reads from the "DatasetSentences.txt" stores only the sentences used for training
* and their index. One can find which senteces are used for testing by looking in datasetSplit.txt and
* retrieve the sentences annotated with 1.
*/
class DatasetSentences {
private:
unordered_map<string, long long> sentences;
public:
// Constructor.
DatasetSentences();
~DatasetSentences();
// Given a sentence retrieve the sentence index.
long long retrieveSentenceIndex(string phrase);
// Retrieve map.
unordered_map<string, long long> getSentencesMap();
// Transform the map to a vector of pairs.
vector<pair<string, long long>> getVectorOfSentences();
};