-
Notifications
You must be signed in to change notification settings - Fork 0
/
StopWordAssociation.cpp
51 lines (40 loc) · 1.57 KB
/
StopWordAssociation.cpp
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
45
46
47
48
49
50
51
//
// Created by seuns on 11/17/2020.
//
#include "StopWordAssociation.h"
StopWordAssociation::StopWordAssociation() {
}
StopWordAssociation::StopWordAssociation(string& word, string& wordAssociation) {
this->word = word;
this->wordAssociation = wordAssociation;
}
bool StopWordAssociation::operator < (const StopWordAssociation& stopWordAssociation) const{
return this->word.compare(stopWordAssociation.word) < 0 ? true : false;
}
bool StopWordAssociation::operator > (const StopWordAssociation& stopWordAssociation) const{
return this->word.compare(stopWordAssociation.word) > 0 ? true : false;
}
bool StopWordAssociation::operator == (const StopWordAssociation& stopWordAssociation) const{
return this->word.compare(stopWordAssociation.word) == 0 ? true : false;
}
bool StopWordAssociation::operator == (const string& stopWordAssociation) const{
return this->word.compare(stopWordAssociation) == 0 ? true : false;
}
bool StopWordAssociation::operator > (const string& stopWordAssociation) const{
return this->word.compare(stopWordAssociation) > 0 ? true : false;
}
bool StopWordAssociation::operator < (const string& stopWordAssociation) const{
return this->word.compare(stopWordAssociation) < 0 ? true : false;
}
void StopWordAssociation::setWord(string& word){
this->word = word;
}
void StopWordAssociation::setWordAssociation(string& wordAssociation){
this->wordAssociation = wordAssociation;
}
string& StopWordAssociation::getWord(){
return this->word;
}
string& StopWordAssociation::getWordAssociation(){
return this->wordAssociation;
}