| Hailo documentation | view source | Contained in the Hailo distribution. |
Hailo::Role::Storage - A role representing a Hailo storage backend
readyAsk the storage backend if it considers itself ready to go. E.g. a
storage that requires a brain would return false if it wasn't
passed one.
initializedIf you're connecting to an existing storage that already has a populated schema and is ready to go this'll return true.
orderThe Markov order (chain length) being used.
brainThe name of the resource (file name, database name) to use as storage.
newThis is the constructor. It accept the attributes specified in ATTRIBUTES.
saveSaves the current state.
learn_tokensLearns from a sequence of tokens. Takes an array reference of strings.
make_replyTakes an (optional) array reference of tokens and returns a reply (arrayref of tokens) that might be relevant.
token_totalTakes no arguments. Returns the number of tokens the brain knows.
expr_totalTakes no arguments. Returns the number of expressions the brain knows.
start_learningTakes no arguments. This method is called by Hailo right before learning begins.
stop_learningTakes no arguments. This method is called by Hailo right after learning finishes.
start_trainingTakes no arguments. This method is called by Hailo right before training begins.
stop_trainingTakes no arguments. This method is called by Hailo right after training finishes.
Hinrik Örn Sigurðsson, hinrik.sig@gmail.com
Copyright 2010 Hinrik Örn Sigurðsson
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| Hailo documentation | view source | Contained in the Hailo distribution. |