pteichman / cobe

A Markov chain based text generation library and MegaHAL style chatbot
http://teichman.org/blog/
MIT License
239 stars 51 forks source link

API method for brain statistics #7

Open andrewtryder opened 11 years ago

andrewtryder commented 11 years ago

Hi,

Is there some type of command/API method to grab statistics from the brain like known tokens, etc?

pteichman commented 11 years ago

There's nothing currently in the API, though depending on the statistics this may be easy to add. I've wanted to add estimated probabilities for n-grams (P(token|token1,token2,token3)) and possibly some deeper statistics like word collocations.

The list of known tokens can be easily extracted on the command line for cobe 2.x:

$ sqlite3 cobe.brain "SELECT text FROM tokens"

Is there anything in particular you're looking for?