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 http://www.torwuf.com/compfacts/compfacts.atom.
How to help
You can help by submitting enhancements on my GitHub repository https://github.com/chfoo/CompFacts. 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 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.
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.
pkg.debian for Debian package building.
debuild -b -us -uc and
dh_clean will build and clean
The Twitter posting service's status can be checked at http://www.torwuf.com/compfacts/server_status.