From 2a18010e255810cc2b5bcbe688f3db8eabda23ca Mon Sep 17 00:00:00 2001 From: Chris Dyer Date: Sun, 6 Dec 2009 22:25:25 -0500 Subject: add compound splitting logic and features (Dyer 2008, NAACL) --- src/freqdict.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/freqdict.h') diff --git a/src/freqdict.h b/src/freqdict.h index c9bb4c42..9acf0c33 100644 --- a/src/freqdict.h +++ b/src/freqdict.h @@ -3,17 +3,18 @@ #include #include +#include "wordid.h" class FreqDict { public: - void load(const std::string& fname); - float frequency(const std::string& word) const { - std::map::const_iterator i = counts_.find(word); + void Load(const std::string& fname); + float LookUp(const WordID& word) const { + std::map::const_iterator i = counts_.find(word); if (i == counts_.end()) return 0; return i->second; } private: - std::map counts_; + std::map counts_; }; #endif -- cgit v1.2.3