Skip to content

Code for two Zulip bots, one that simply publicly posts PM's sent to it, and one that generates text based on the user's post history using NLTK's NGram model

Notifications You must be signed in to change notification settings

phsteve/zulipbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zulip bots

This code requires Zulip's Python API bindings, available here.

Code for two Zulip bots.

printspms.py

This was my first, simple "Hello World"-esque bot I wrote. When a user sends it a PM, it will post the text of the PM to a stream and disclose the sender's name. Violates the user's privacy by design. Currently trying to market it to the NSA.

markov.py

####Usage:

Send a PM to 'katzbot' with the stream names from which you wish to generate text, separated by commas. It will reject nonexistent streams. Example: 455 Broadway, Off-Topic

####Status:

Mostly working! Could use some fine-tuning and more sanitization of text. It's intended to operate similarly to the what-would-i-say webapp that was making the rounds on social media in early November 2013. A user sends the bot a PM, the bot looks up the history of each stream in the PM, then uses the history to generate a random sentence that sounds like the user wrote it. Initially I used NLTK's trigram sentence generator, but the results were not sufficiently hilarious, so I modified the NLTK code to use bigrams instead. Still in active development.

About

Code for two Zulip bots, one that simply publicly posts PM's sent to it, and one that generates text based on the user's post history using NLTK's NGram model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages