summary refs log tree commit diff stats
path: root/generator/frame.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2017-01-16 18:02:50 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2017-01-16 18:02:50 -0500
commit6746da6edd7d9d50efe374eabbb79a3cac882d81 (patch)
treeff20917e08b08d36b9541c1371106596e7bec442 /generator/frame.h
parent4af7e55733098ca42f75a4ffaca1b0f6bab4dd36 (diff)
downloadverbly-6746da6edd7d9d50efe374eabbb79a3cac882d81.tar.gz
verbly-6746da6edd7d9d50efe374eabbb79a3cac882d81.tar.bz2
verbly-6746da6edd7d9d50efe374eabbb79a3cac882d81.zip
Started structural rewrite
The new object structure was designed to build on the existing WordNet
structure, while also adding in all of the data that we get from other sources.
More information about this can be found on the project wiki.

The generator has already been completely rewritten to generate a
datafile that uses the new structure. In addition, a number of indexes
are created, which does double the size of the datafile, but also allows
for much faster lookups. Finally, the new generator is written modularly
and is a lot more readable than the old one.

The verbly interface to the new object structure has mostly been
completed, but has not been tested fully. There is a completely new
search API which utilizes a lot of operator overloading; documentation
on how to use it should go up at some point.

Token processing and verb frames are currently unimplemented. Source for
these have been left in the repository for now.
Diffstat (limited to 'generator/frame.h')
-rw-r--r--generator/frame.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/generator/frame.h b/generator/frame.h new file mode 100644 index 0000000..411ce6c --- /dev/null +++ b/generator/frame.h
@@ -0,0 +1,59 @@
1#ifndef FRAME_H_26770FF1
2#define FRAME_H_26770FF1
3
4#include <list>
5#include "part.h"
6
7namespace verbly {
8 namespace generator {
9
10 class database;
11
12 class frame {
13 public:
14
15 // Aliases
16
17 using const_iterator = std::list<part>::const_iterator;
18
19 // Constructor
20
21 frame();
22
23 // Mutators
24
25 void push_back(part fp);
26
27 // Accessors
28
29 int getId() const
30 {
31 return id_;
32 }
33
34 const_iterator begin() const
35 {
36 return std::begin(parts_);
37 }
38
39 const_iterator end() const
40 {
41 return std::end(parts_);
42 }
43
44 private:
45
46 static int nextId_;
47
48 const int id_;
49
50 std::list<part> parts_;
51
52 };
53
54 database& operator<<(database& db, const frame& arg);
55
56 };
57};
58
59#endif /* end of include guard: FRAME_H_26770FF1 */