30 std::stringstream& sstream,
79 std::string::size_type i = 0;
81 while( i < str.size() && !hit ) {
105 kn += str.size() + 1;
125 if( i == str.size() ) {
130 kn += str.size() + 1;
167 <<
"============================" <<
std::endl 168 <<
"Keystroke Savings Rate (KSR)" <<
std::endl 170 <<
"KSR = (1 - ------- ) * 100" <<
std::endl 173 <<
" ki = actual keystrokes" <<
std::endl 174 <<
" ks = keystrokes required to select suggestion" <<
std::endl 175 <<
" kn = keystrokes required with no prediction enabled" <<
std::endl 205 return ( ( 1 - ( static_cast<double>(
ki +
ks ) / static_cast<double>(
kn ) ) ) * 100 );
223 std::vector<std::string>::const_iterator i = w.begin();
224 while( i != w.end() && !found ) {
std::vector< std::string > predict()
Obtain a prediction.
bool getAutoSpace() const
std::stringstream & m_sstream
bool find(const std::vector< std::string > &, const std::string &) const
void simulate(std::string)
Presage, the intelligent predictive text entry platform.
std::string prefix() const
Returns the current prefix.
Simulator(PresageCallback *callback, std::stringstream &sstream, const std::string="")
const Logger< _charT, _Traits > & endl(const Logger< _charT, _Traits > &lgr)