-
Notifications
You must be signed in to change notification settings - Fork 0
/
Word.hpp
46 lines (37 loc) · 1.36 KB
/
Word.hpp
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
#ifndef WORD_INCLUDE
#define WORD_INCLUDE
#include <vector>
#include <string>
#include <utility>
enum WordType { IGNORABLE, INFORMATIVE };
class Word{
static std::vector< class Word *> vocabulary;
private:
//Changing the structure of program to be more useful of Word.hpp
// Adding the static vocabulary for all words find out in a all context Passed
// From Context class only sa1ve the Pointers information,
// Add the time of initialization the pointer became more powerful
const int uniId; //Uniqe Id to each word scaned
const std::string text; // Text of the Word
std::string description; // brief meaning of the word or text
WordType type; // Type of the English word like Object, Subject,
// Verb, adjective, adverb...
static int lastId;
// Assign Unique Id each time
static int idGenerator(){
return lastId++;
}
public:
static class Word * newWord( std::string , WordType );
static std::vector< class Word * > getVocabulary();
static std::vector< class Word * > getOnlyInfoVocab();
static class Word * findVectorPos( std::string &word );
int getId();
WordType getType();
std::string getText();
std::vector< std::pair< int , long long int > > vectorization;
Word( std::string text, WordType = INFORMATIVE );
void printDetails( int i = 0 );
void shortPrint();
};
#endif