NAME

Games::Commentator - make a human-like comment

SYNOPSIS

use Games::Commentator 'make_comment';
my $comment = make_comment ({
    organization => 'British Airways',
    person => 'Richard Branson',
    about => 'the cost of flights',
});
    

The contents of $comment are a random comment, something like this:

Seriously, people. Bit of insight might be in order. Am afraid Richard Branson is as useful as a chocolate tea pot. Even when the most educated fall prey to the tentacles of the cost of flying, one can well imagine the plight of vacuous zeros who easily falter in the heat of the moment. You will struggle to find a bigger collection of wimps and sheep than British Airways. Crystal-clear answer to self-evident question. No.

Many people will think this was written by a person rather than a computer.

FUNCTIONS

make_comment

my $comment = make_comment ({
    organization => 'British Airways',
    person => 'Richard Branson',
    about => 'the cost of flights',
});
    

The contents of $comment are a random comment. All of the variables are optional. There are currently four variables:

organization

An organization about which the comment discusses, usually in a derogatory way.

person

A human being about whom the comment discusses, usually in a derogatory way. The default sex is male. To specify female, use the "sex" option.

sex

Either 'male' or 'female' in lower case. This controls whether the pronoun is "he" or "she", "him" or "her", etc.

about

A topic about which the comment discusses, usually in a derogatory way.

get_variables

use Games::Commentator 'get_variables';
my @variables = get_variables ();

Get a list of the variables which can be sent to "make_comment".

TO DO

Add optional spelling mistakes

Add an option to put in spelling mistakes to the output, to make it look more like a real comment.

Add a seed option

Add a seed option so that results can be reproduced.

SCRIPT

There is a script called "comment" in the distribution. Run on its own it produces a comment without any "about", etc. There are command-line options to supply "about" and so on:

comment -about "Richard Branson"

etc.

ABOUT

This computer program is based on an idea of the late Raymond Christopher Davis. Ray's original notion was to make a computer program which produced headlines like those of "The Sun" newspaper from random phrases. The current program adjusts this notion to use random phrases to generate web comments. Amazingly enough, many people think that these comments are made by a human.

Another inspiration for the project was the Twat-o-tron.

The comment module has been in action for some time at the following web site: http://www.lemoda.net/games/fake-comments/. You will find its output under YouTube videos, on Facebook pages, etc.

The comments do appear to come from a human, but please do not use this module for spamming.

The comments themselves are largely garnered from British news websites and then adapted to make them more random by substituting similar words. The tone of the output comments is one of anger and frustration, because it seemed more amusing to have a computer make such comments.

AUTHOR

Ben Bullock, <bkb@cpan.org>

COPYRIGHT & LICENCE

This package and associated files are copyright (C) 2012 Ben Bullock.

You can use, copy, modify and redistribute this package and associated files under the Perl Artistic Licence or the GNU General Public Licence.