presage.h | presage.h | |||
---|---|---|---|---|
skipping to change at line 135 | skipping to change at line 135 | |||
* \param config path to configuration file | * \param config path to configuration file | |||
* | * | |||
* Presage does not take ownership of the callback object. | * Presage does not take ownership of the callback object. | |||
*/ | */ | |||
Presage(PresageCallback* callback, const std::string config) throw (Pre sageException); | Presage(PresageCallback* callback, const std::string config) throw (Pre sageException); | |||
/** Destroys presage. | /** Destroys presage. | |||
*/ | */ | |||
~Presage(); | ~Presage(); | |||
/** \brief Obtain a prediction, and notify presage of newly | /** \brief Obtain a prediction. | |||
* entered text (if any, else empty string). | ||||
* | ||||
* This method notifies presage that new text was entered by | ||||
* the user and requests that presage generates a prediction | ||||
* based on the newly updated context. | ||||
* | ||||
* It is possible to invoke this method passing an empty string as | ||||
* argument, in cases where no text was entered by the user since | ||||
* the previous invocation. | ||||
* | * | |||
* This method returns a prediction based on the current | * This method requests that presage generates a prediction based | |||
* context. The prediction is a std::vector of std::string's. | * on the current context. | |||
* | * | |||
* \return prediction | * \return prediction (vector of strings) based on the current | |||
* context. | ||||
* | * | |||
*/ | */ | |||
std::vector<std::string> predict() throw (PresageException); | std::vector<std::string> predict() throw (PresageException); | |||
/** \brief Obtains a prediction that matches the supplied token | /** \brief Obtain a prediction that matches the supplied token | |||
* filter. | * filter. | |||
* | * | |||
* \param filter a vector of strings to use to filter the | * \param filter a vector of strings to use to filter the | |||
* prediction for desired tokens. I.e. If the current prefix is | * prediction for desired tokens. I.e. If the current prefix is | |||
* "gr" and the filter is ["ea", "an"], then only words starting | * "gr" and the filter is ["ea", "an"], then only words starting | |||
* with "grea" or "gran" such as "great" or "grand" | * with "grea" or "gran" such as "great" or "grand" will be | |||
* returned in the prediction. | ||||
* | * | |||
* \return prediction containing only tokens that begin with one | * \return prediction containing only tokens that begin with one | |||
* of the filter tokens. | * of the filter tokens. | |||
* | * | |||
*/ | */ | |||
std::multimap<double, std::string> predict(std::vector<std::string> fil ter) throw (PresageException); | std::multimap<double, std::string> predict(std::vector<std::string> fil ter) throw (PresageException); | |||
/** \brief Callback getter/setter. | /** \brief Callback getter/setter. | |||
* | * | |||
* \param callback to be used by presage (pass a null pointer to | * \param callback to be used by presage (pass a null pointer to | |||
End of changes. 5 change blocks. | ||||
15 lines changed or deleted | 8 lines changed or added | |||