From b316e309559d7176af6cf0bb7dcd6dbaa83c01cd Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 29 Jan 2016 12:43:00 -0500 Subject: Rewrote how tokens are handled A 'word' is now an object that contains a distribution of forms that word can take. For now, most word just contain one form, the canonical one. The only special use is currently hashtags. Malapropisms have been disabled because of compatibility issues and because an upcoming feature is planned to replace it. --- histogram.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 histogram.h (limited to 'histogram.h') diff --git a/histogram.h b/histogram.h new file mode 100644 index 0000000..5aa2560 --- /dev/null +++ b/histogram.h @@ -0,0 +1,19 @@ +#ifndef HISTOGRAM_H_24094D97 +#define HISTOGRAM_H_24094D97 + +#include +#include + +template +class histogram { + public: + void add(const T& inst); + void compile(); + const T& next() const; + + private: + std::map freqtable; + std::map distribution; +}; + +#endif /* end of include guard: HISTOGRAM_H_24094D97 */ -- cgit 1.4.1