59 std::set<std::string> seen_tokens;
61 size_t size = prediction.
size();
64 for (
size_t i = 0; i < size; i++)
69 if (seen_tokens.find(token) == seen_tokens.end())
78 for (
int j = i + 1; j < size; j++)
91 seen_tokens.insert(token);
std::string getWord() const
static const double MAX_PROBABILITY
virtual Prediction filter(const Prediction &prediction) const
double getProbability() const
void setProbability(double)
Suggestion getSuggestion(int=0) const
void addSuggestion(Suggestion)