presage.h   presage.h 
skipping to change at line 155 skipping to change at line 155
* "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" will be * with "grea" or "gran" such as "great" or "grand" will be
* returned in the prediction. * 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 Learn from text offline.
*
* Requests presage to offline learn from \param text. Active
* predictors in presage are capable of online learning (dynamic
* learning triggered by context changes - context-awareness
* enables presage to train predictors on changes in context
* dynamically). This method provides a way to instruct presage to
* learn from a specific body of text, separate from the context.
*
* \param text a text string to learn from.
*
*/
void learn(const std::string text) const 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
* obtain callback to current callback without modifying it) * obtain callback to current callback without modifying it)
* *
* \return pointer to previously used callback * \return pointer to previously used callback
*/ */
PresageCallback* callback(PresageCallback* callback) throw (PresageExce ption); PresageCallback* callback(PresageCallback* callback) throw (PresageExce ption);
/** \brief Request presage to return the completion string for the give n predicted token. /** \brief Request presage to return the completion string for the give n predicted token.
skipping to change at line 231 skipping to change at line 245
*/ */
void save_config() const throw (PresageException); void save_config() const throw (PresageException);
/* /*
* Presage public API ends here * Presage public API ends here
*/ */
private: private:
ProfileManager* profileManager; ProfileManager* profileManager;
Configuration* configuration; Configuration* configuration;
PredictorRegistry* predictorRegistry; PredictorRegistry* predictorRegistry;
ContextTracker* contextTracker; ContextTracker* contextTracker;
PredictorActivator* predictorActivator; PredictorActivator* predictorActivator;
Selector* selector; Selector* selector;
}; };
#endif /* _MSC_VER */ #endif /* _MSC_VER */
#endif /* __cplusplus */ #endif /* __cplusplus */
/* /*
skipping to change at line 276 skipping to change at line 290
presage_t* result); presage_t* result);
void presage_free (presage_t prsg); void presage_free (presage_t prsg);
void presage_free_string (char* str); void presage_free_string (char* str);
void presage_free_string_array (char** str); void presage_free_string_array (char** str);
presage_error_code_t presage_predict (presage_t prsg, presage_error_code_t presage_predict (presage_t prsg,
char*** result); char*** result);
presage_error_code_t presage_learn (presage_t prsg,
const char* text);
presage_error_code_t presage_completion (presage_t prsg, presage_error_code_t presage_completion (presage_t prsg,
const char* token, const char* token,
char** result); char** result);
presage_error_code_t presage_context (presage_t prsg, presage_error_code_t presage_context (presage_t prsg,
char** result); char** result);
presage_error_code_t presage_context_change (presage_t prsg, presage_error_code_t presage_context_change (presage_t prsg,
int* result); int* result);
 End of changes. 3 change blocks. 
1 lines changed or deleted 18 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/