presage
0.9.1
src
tools
simulator
simulator.h
Go to the documentation of this file.
1
2
/******************************************************
3
* Presage, an extensible predictive text entry system
4
* ---------------------------------------------------
5
*
6
* Copyright (C) 2008 Matteo Vescovi <matteo.vescovi@yahoo.co.uk>
7
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation; either version 2 of the License, or
11
(at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License along
19
with this program; if not, write to the Free Software Foundation, Inc.,
20
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21
*
22
**********(*)*/
23
24
25
#ifndef PRESAGE_SIMULATOR
26
#define PRESAGE_SIMULATOR
27
28
#include "
presage.h
"
29
30
#include <sstream>
31
52
class
Simulator
{
53
public
:
54
Simulator
(
PresageCallback
* callback,
55
std::stringstream& sstream,
56
const
std::string =
""
);
57
~Simulator
();
58
59
void
simulate
(std::string);
60
// void reset();
61
void
results
()
const
;
62
int
getKi
()
const
;
63
int
getKs
()
const
;
64
int
getKn
()
const
;
65
double
getKSR
()
const
;
66
67
bool
getAutoSpace
()
const
;
68
void
setAutoSpace
(
bool
);
69
70
void
setKs
(
int
);
71
72
void
silentMode
(
bool
);
73
74
private
:
75
Presage
*
presagePtr
;
76
77
bool
find
(
const
std::vector<std::string>&,
const
std::string& )
const
;
78
79
bool
autoSpace
;
// determines whether predictive system is able to insert a space at the end of the word
80
81
int
ki
;
82
int
ks
;
83
int
kn
;
84
85
bool
silent_mode
;
86
87
std::stringstream&
m_sstream
;
88
};
89
90
91
#endif
// PRESAGE_SIMULATOR
PresageCallback
Definition
presageCallback.h:66
Presage
Presage, the intelligent predictive text entry platform.
Definition
presage.h:107
Simulator
Definition
simulator.h:52
Simulator::m_sstream
std::stringstream & m_sstream
Definition
simulator.h:87
Simulator::getKSR
double getKSR() const
Definition
simulator.cpp:203
Simulator::~Simulator
~Simulator()
Definition
simulator.cpp:46
Simulator::silentMode
void silentMode(bool)
Definition
simulator.cpp:246
Simulator::setAutoSpace
void setAutoSpace(bool)
Definition
simulator.cpp:241
Simulator::simulate
void simulate(std::string)
Definition
simulator.cpp:52
Simulator::silent_mode
bool silent_mode
Definition
simulator.h:85
Simulator::results
void results() const
Definition
simulator.cpp:164
Simulator::ki
int ki
Definition
simulator.h:81
Simulator::getKs
int getKs() const
Definition
simulator.cpp:191
Simulator::getAutoSpace
bool getAutoSpace() const
Definition
simulator.cpp:236
Simulator::kn
int kn
Definition
simulator.h:83
Simulator::find
bool find(const std::vector< std::string > &, const std::string &) const
Definition
simulator.cpp:216
Simulator::setKs
void setKs(int)
Definition
simulator.cpp:209
Simulator::getKn
int getKn() const
Definition
simulator.cpp:197
Simulator::autoSpace
bool autoSpace
Definition
simulator.h:79
Simulator::presagePtr
Presage * presagePtr
Definition
simulator.h:75
Simulator::ks
int ks
Definition
simulator.h:82
Simulator::getKi
int getKi() const
Definition
simulator.cpp:185
presage.h
Generated on Fri Nov 11 2022 10:03:01 for presage by
1.9.8