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;
166 std::cout << std::endl
167 <<
"============================" << std::endl
168 <<
"Keystroke Savings Rate (KSR)" << std::endl
169 <<
" ki + ks " << std::endl
170 <<
"KSR = (1 - ------- ) * 100" << std::endl
171 <<
" kn " << std::endl
172 <<
"where: " << 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
177 <<
"ki : " <<
ki << std::endl
178 <<
"ks : " <<
ks << std::endl
179 <<
"kn : " <<
kn << std::endl
181 <<
"KSR: " <<
getKSR() << std::endl;
205 return ( ( 1 - (
static_cast<double>(
ki +
ks ) /
static_cast<double>(
kn ) ) ) * 100 );
219 std::cout <<
"===> " << t << std::endl
223 std::vector<std::string>::const_iterator i = w.begin();
224 while( i != w.end() && !found ) {
226 std::cout << *i << std::endl;
Presage, the intelligent predictive text entry platform.
std::string prefix() const noexcept(false)
Returns the current prefix.
std::vector< std::string > predict() noexcept(false)
Obtain a prediction.
std::stringstream & m_sstream
void simulate(std::string)
Simulator(PresageCallback *callback, std::stringstream &sstream, const std::string="")
bool getAutoSpace() const
bool find(const std::vector< std::string > &, const std::string &) const