From eef5de613c75661e5d94baa086f6f2ddc26c7ed0 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Thu, 24 Mar 2016 23:16:07 -0400 Subject: 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. --- lib/util.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/util.h') 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 @@ #ifndef UTIL_H_15DDCA2D #define UTIL_H_15DDCA2D -#include -#include -#include - namespace verbly { template @@ -32,7 +28,7 @@ namespace verbly { while (!input.empty()) { - int divider = input.find(" "); + int divider = input.find(delimiter); if (divider == std::string::npos) { result.push_back(input); @@ -41,7 +37,7 @@ namespace verbly { } else { result.push_back(input.substr(0, divider)); - input = input.substr(divider+1); + input = input.substr(divider+delimiter.length()); } } -- cgit 1.4.1