baines / insobot

C99 modular IRC bot with markov chains
MIT License
74 stars 5 forks source link

Tracking topics in mod_markov #3

Open baines opened 7 years ago

baines commented 7 years ago

Currently mod_markov generates text completely randomly; I think it could be interesting to take recent text into account, to say more relevant things.

The basic idea is to see which words are being said frequently, use something like wordnet to get similar words, then give a probability boost to those words when generating a sentence.

The per-word total stored in the word_ht hash table can be used to see how rare a word is (if we also store the total word count). This would allow very common words like "a", "the", etc to be excluded from being topic words.