Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
krant.sch | 2011-01-12 | 11.8 kB | |
Totals: 1 Item | 11.8 kB | 0 |
What you need: 0) a working linux / unix system with python and a C-compiler installed 0a) The ability to use it: create/edit shellscripts, install cronjobs, etc. 2) wakkerbot ( http://sourceforge.net/projects/wakkerbot/ ) megahal.c, main.c megahal.h crosstab.c crosstab.h Makefile 2a) (maybe) Some of the other .c files found here fuzzcron.c 2b) The python-scripts for slurping and submitting ( to be supplied ...) Compiling and installing: 1) Put the files into a new (empty) directory 2) create/edit megahal.cnf (this could be a copy of megahal_twit.cnf, or a symlink to it) 3) edit megahal.c There are some #defines (starting after line#300) you might want to change. There is some diagnostics/debugging occuring on stderr that you may want to disable. 4) compile: just run make. There are some warnings; I don't care. if you do care: investigate the source of the warnings and go kill yourself. if the compilation fails because RDTSC is not available (this assumes intel+gcc), alter the define to: #define WANT_RDTSC_RANDOM 0 5) (maybe) install. you can install the binary somewhere. or you can keep it in the sourcedir if you want. 6) Run. (./megahal -h for help) megahal expects to find its files in the directory where it is started. It can be instructed to look for them elsewhere. Some of the logging files, etc appear in the current directory anyway. The commandline I use for megahal to be run from a script: "./megahal -g -b -p -r -t 10 -d mydir 2>/dev/null" 7) get some input and feed it to megahal 8) megahal produces a lot of rubble in the directory where it is executed: - two log files (megahal.txt, megahal.log) - megahal.dic: the dump of the dictionary - alzheimer.dmp with the logging of the alzheimer pruning - crosstab.dmp a binary file containing the crosstab coefficients that were found. How to operate MegaHal/wakkerbot. Megahal needs data to grow a brain. The "brain" actually is a) a pair of trees, representing the forward and backward markov-chains b) a dictionary of symbols (tokens) These two entities are stored in the (binary) file "megahal.brn" If megahal is started with a "-d somedir" option, it will load and save it's brainfile from "somedir/megahal.brn" . If there is no brain found, megahal attempts to read a training file 'megahal.trn' from the same directory This file can be empty, but it has to exist. Another way to train megahal is: ./megahal -g -b -p -r -t 0 -d mydir < /some/data/to/be/used/as/training ( -t 0 is almost equivalent to -q ) To keep megahal's brain up to date, it should be fed *all* the data from the telegraaf, not only the topics that wakkerbot is generating replies for. That's where the onderbuik-slurpert is for. NOTE: avoid running two (or more) instances of megahal on the same directory/brain. The binary file megahal.brn might become corrupted, resulting in braindamage. Use lockfiles or whatever mechanism to avoid two instances to be run simultanously. Besides: megahal likes a lot of memory (mine uses about 2.5GB of core); running it twice may be a bit unpleasant to the user-experience. How to get data: the slurpert. dbsuckert3a.py is an OLD version of the sucker. Adapt it to your needs. How to submit: the submittert. You need to create this yourself.