From 9b83a2e82aba73b5ff0e848182a8726481a10485 Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 9 Feb 2014 20:50:41 -0500 Subject: adaptive hope-fear learner --- utils/stringlib.h | 15 +++++++++++++++ utils/tdict.cc | 4 ++-- utils/tdict.h | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/stringlib.h b/utils/stringlib.h index f60b7867..2fdbfff8 100644 --- a/utils/stringlib.h +++ b/utils/stringlib.h @@ -242,6 +242,21 @@ void VisitTokens(std::string const& s,F f) { VisitTokens(mp.p,mp.p+s.size(),f); } +template +void VisitTokens(std::string const& s,F f, unsigned start) { + if (0) { + std::vector ss=SplitOnWhitespace(s); + for (unsigned i=0;i