dbot
dbot copied to clipboard
Natural Language Features
I was thinking of creating a module which does the following:
- Adds a hook to ~qadd, which scans the new additions to the quotes for definitions like "Sam is pro."
- The grammar parser will take these definitions and store facts like is(Sam, pro)
- Add a command like ~question Is Sam pro?
- Respond 'Sam is in fact pro!' since we have this stored as a fact.
I actually have most of the Prolog code written to do this already, we could perhaps use this module to call that: https://github.com/kloni/node-prolog-swi
Furthermore, this would allow us to extend user profiles (#159) with a list of automatically created facts about a user.
@reality Could we perhaps enhance this to not just accept input from qadd but use a listener on every line in the channel? It won't be any more open to abuse than qadd, and I imagine it would be quite easy to use realityonce-style lines for facts?
I love the idea of showing this data on #159 profiles, we'd also need a command for a user to remove facts from their own profile, perhaps as well as an admin or moderator.
Hmm, we could in fact just scan all PRIVMSG data for facts. The more time someone states a fact, the more weight it has. If five people say Quantum of Solace is shit, and one says it's not, then ~question is quantum of solace shit? yields a yes.
~approved
this.