diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-24 23:16:07 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-03-24 23:16:07 -0400 |
commit | eef5de613c75661e5d94baa086f6f2ddc26c7ed0 (patch) | |
tree | 180230f6a245c5bca94d894273f5d2b93ded3f04 /lib/util.h | |
parent | d5ee4e39e5b5b3b8daa85cd972802195ad35e965 (diff) | |
download | verbly-eef5de613c75661e5d94baa086f6f2ddc26c7ed0.tar.gz verbly-eef5de613c75661e5d94baa086f6f2ddc26c7ed0.tar.bz2 verbly-eef5de613c75661e5d94baa086f6f2ddc26c7ed0.zip |
Added verb frames
In addition: - Added prepositions. - Rewrote a lot of the query interface. It now, for a lot of relationships, supports nested AND, OR, and NOT logic. - Rewrote the token class. It is now a union-like class instead of being polymorphic, which means smart pointers are no longer necessary. - Querying with regards to word derivation has been temporarily removed. - Sentinel values are now supported for all word types. - The VerbNet data retrieved from http://verbs.colorado.edu/~mpalmer/projects/verbnet/downloads.html was found to not be perfectly satisfactory in some regards, especially regarding adjective phrases. A patch file is now included in the repository describing the changes made to the VerbNet v3.2 download for the canonical verbly datafile.
Diffstat (limited to 'lib/util.h')
-rw-r--r-- | lib/util.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/util.h b/lib/util.h index 815b47c..fb5fe67 100644 --- a/lib/util.h +++ b/lib/util.h | |||
@@ -1,10 +1,6 @@ | |||
1 | #ifndef UTIL_H_15DDCA2D | 1 | #ifndef UTIL_H_15DDCA2D |
2 | #define UTIL_H_15DDCA2D | 2 | #define UTIL_H_15DDCA2D |
3 | 3 | ||
4 | #include <string> | ||
5 | #include <iterator> | ||
6 | #include <sstream> | ||
7 | |||
8 | namespace verbly { | 4 | namespace verbly { |
9 | 5 | ||
10 | template <class InputIterator> | 6 | template <class InputIterator> |
@@ -32,7 +28,7 @@ namespace verbly { | |||
32 | 28 | ||
33 | while (!input.empty()) | 29 | while (!input.empty()) |
34 | { | 30 | { |
35 | int divider = input.find(" "); | 31 | int divider = input.find(delimiter); |
36 | if (divider == std::string::npos) | 32 | if (divider == std::string::npos) |
37 | { | 33 | { |
38 | result.push_back(input); | 34 | result.push_back(input); |
@@ -41,7 +37,7 @@ namespace verbly { | |||
41 | } else { | 37 | } else { |
42 | result.push_back(input.substr(0, divider)); | 38 | result.push_back(input.substr(0, divider)); |
43 | 39 | ||
44 | input = input.substr(divider+1); | 40 | input = input.substr(divider+delimiter.length()); |
45 | } | 41 | } |
46 | } | 42 | } |
47 | 43 | ||