My Project
 All Classes Namespaces Functions Pages
word.h
1 
8 #ifndef WORD_H
9 #define WORD_H
10 
11 #include "../Tokenizer/token.h"
12 #include "../Tokenizer/stokenize.h"
13 #include "set"
14 #include "config.h"
15 
16 using namespace std;
17 
18 namespace NLP
19 {
20 
25 class Word : public Token
26 {
27  private:
28  set<WordType> mTypes;
29  set<string> mDefinitions;
30 
31  public:
32  Word(const Token& other,
33  set<WordType> tags,
34  set<string> defs = set<string>()
35  );
36  Word(const Word& other);
37  Word& operator = (const Word& newToken);
38  ~Word();
39  string getName() const;
40  set<WordType> getTypes() const;
41  string getRawtypes() const;
42  set<string> getDefinitions() const;
43 
44  friend ostream& operator << (ostream& outs, const Word& w)
45  {
46  outs << w.getName();
47  return outs;
48  }
49 
50 }; /* ----- end of class Word ----- */
51 
52 } /* NLP */
53 
54 #endif /* !WORD_H */
55 
A Class to store token and its corresponding tags and definitions.
Definition: word.h:25
Definition: token.h:41