presage
0.8.7
|
#include <contextChangeDetector.h>
Public Member Functions | |
ContextChangeDetector (const std::string, const std::string, const std::string, const std::string) | |
~ContextChangeDetector () | |
bool | context_change (const std::string &past_stream) const |
std::string | change (const std::string &past_stream) const |
std::string | get_sliding_window () const |
void | set_sliding_window_size (const std::string &str) |
void | update_sliding_window (const std::string &str) |
Private Member Functions | |
bool | context_change_helper (const std::string &str1, const std::string &str2) const |
Private Attributes | |
std::string::size_type | SLIDING_WINDOW_SIZE |
std::string | sliding_window |
const std::string | wordChars |
const std::string | separatorChars |
const std::string | blankspaceChars |
const std::string | controlChars |
Static Private Attributes | |
static const std::string::size_type | DEFAULT_SLIDING_WINDOW_SIZE = 80 |
Definition at line 36 of file contextChangeDetector.h.
ContextChangeDetector::ContextChangeDetector | ( | const std::string | wChars, |
const std::string | tChars, | ||
const std::string | bChars, | ||
const std::string | cChars | ||
) |
Definition at line 35 of file contextChangeDetector.cpp.
Definition at line 48 of file contextChangeDetector.cpp.
std::string ContextChangeDetector::change | ( | const std::string & | past_stream | ) | const |
Definition at line 204 of file contextChangeDetector.cpp.
References sliding_window.
Referenced by ContextTracker::update().
bool ContextChangeDetector::context_change | ( | const std::string & | past_stream | ) | const |
Definition at line 74 of file contextChangeDetector.cpp.
References context_change_helper(), and sliding_window.
Referenced by ContextTracker::contextChange().
bool ContextChangeDetector::context_change_helper | ( | const std::string & | str1, |
const std::string & | str2 | ||
) | const [private] |
Definition at line 98 of file contextChangeDetector.cpp.
References wordChars.
Referenced by context_change().
std::string ContextChangeDetector::get_sliding_window | ( | ) | const |
Definition at line 239 of file contextChangeDetector.cpp.
References sliding_window.
Referenced by ContextTracker::getSlidingWindowToken(), and ContextTracker::update().
void ContextChangeDetector::set_sliding_window_size | ( | const std::string & | str | ) |
Definition at line 53 of file contextChangeDetector.cpp.
References DEFAULT_SLIDING_WINDOW_SIZE, and SLIDING_WINDOW_SIZE.
Referenced by ContextTracker::set_sliding_window_size().
void ContextChangeDetector::update_sliding_window | ( | const std::string & | str | ) |
Definition at line 62 of file contextChangeDetector.cpp.
References sliding_window, and SLIDING_WINDOW_SIZE.
Referenced by ContextTracker::update().
const std::string ContextChangeDetector::blankspaceChars [private] |
Definition at line 61 of file contextChangeDetector.h.
const std::string ContextChangeDetector::controlChars [private] |
Definition at line 62 of file contextChangeDetector.h.
const std::string::size_type ContextChangeDetector::DEFAULT_SLIDING_WINDOW_SIZE = 80 [static, private] |
Definition at line 55 of file contextChangeDetector.h.
Referenced by set_sliding_window_size().
const std::string ContextChangeDetector::separatorChars [private] |
Definition at line 60 of file contextChangeDetector.h.
std::string ContextChangeDetector::sliding_window [private] |
Definition at line 57 of file contextChangeDetector.h.
Referenced by change(), context_change(), get_sliding_window(), and update_sliding_window().
std::string::size_type ContextChangeDetector::SLIDING_WINDOW_SIZE [private] |
Definition at line 56 of file contextChangeDetector.h.
Referenced by set_sliding_window_size(), and update_sliding_window().
const std::string ContextChangeDetector::wordChars [private] |
Definition at line 59 of file contextChangeDetector.h.
Referenced by context_change_helper().