-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
39 lines (38 loc) · 1.57 KB
/
main.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
#include "ParseNode.h"
#include "Ontology.h"
#include "SemanticNode.h"
#include "Lexicon.h"
int main(int argc, char **argv){
ParseNode x(nullptr, nullptr);
ParseNode y(&x, nullptr);
ParseNode z(&x, nullptr);
x.children_.push_back(&y);
x.children_.push_back(&z);
std::vector<ParseNode *> temp = x.get_leaves();
std::cout << temp[0] << " " << temp[1] << std::endl;
Ontology ont("ont.txt");
SemanticNode* parent1 = new SemanticNode(NULL,1, 2, 1, std::vector<SemanticNode*>());
SemanticNode* parent2 = new SemanticNode(NULL, 1, 2, 2, true, std::vector<SemanticNode*>());
SemanticNode* child1 = new SemanticNode(NULL, 1,2, 1, std::vector<SemanticNode *>());
parent1->children_.push_back(child1);
child1->parent_ = parent1;
std::cout << parent1->print_little() << std::endl;
std::cout << parent2->print_little() << std::endl;
std::cout << child1->print_little() << std::endl;
nodeTuple key = parent1->key();
std::cout << std::get<0>(key) << std::endl;
std::cout << std::get<1>(key) << std::endl;
std::cout << std::get<2>(key) << std::endl;
std::cout << std::get<3>(key) << std::endl;
std::cout << std::get<4>(key) << std::endl;
std::cout << std::get<5>(key) << std::endl;
for (auto x : std::get<6>(key)){
std::cout << x << std::endl;
}
std::cout << parent1->hash() << std::endl;
std::cout << parent2->hash() << std::endl;
std::cout << child1->hash() << std::endl;
parent1->increment_lambdas();
Lexicon* test = new Lexicon(&ont, "lex.txt", "matrix.csv", "dict.csv");
return 0;
}