Computer Facts
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Computer facts generator

CompFacts uses a context-free grammar to generate computer facts.

These facts are regularly posted to the Twitter account @CompFacts.

An Atom feed is available at

How to help

You can help by submitting enhancements on my GitHub repository Just fork, change, commit, and request me to pull your changes.

The Python version supported is 2.7.


The grammar productions requires the Python Natual Languge Toolkit. It can be installed through the Python Package Index.

Corpus and grammar format

The files are located in directory corpus_data.

Corpus text files are simple lists. The first portion of the filename before the dot is the nonterminal name.

Grammar text files are the production rules. The filename does not matter. The grammar follows the NLTK format.

All files support using # at the start of a line as a comment.

Generating facts

You can test out the generator by running:

python -m compfacts.grammar

Running the server

I included a sample Debian package which I use for running the package as a service. A sample nginx config file is provided. The service will refuse to run if the default compfacts.conf is not configured. Symlink debian to pkg.debian for Debian package building. The commands debuild -b -us -uc and dh_clean will build and clean respectively.

The service requires Tweepy for Twitter status updates and Tornado Web for the RSS and service status pages. Make sure to install Tweepy using pip for latest version.

The Twitter posting service's status can be checked at