presage  0.8.7
Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
ContextChangeDetector Class Reference

#include <contextChangeDetector.h>

List of all members.

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

Detailed Description

Definition at line 36 of file contextChangeDetector.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().

Here is the caller graph for this function:

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().

Here is the call graph for this function:

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

Definition at line 239 of file contextChangeDetector.cpp.

References sliding_window.

Referenced by ContextTracker::getSlidingWindowToken(), and ContextTracker::update().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:

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().

Here is the caller graph for this function:


Member Data Documentation

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::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().


The documentation for this class was generated from the following files: