Coder Social home page Coder Social logo

silly-werder's Introduction

Werder - Meaningless gibberish generator
----------------------------------------

This module is used to create pronounceable yet completely
meaningless language.  It is good for sending to a text-
to-speech program (ala festival), generating passwords,
annoying people on irc, and all kinds of fun things.

This new release is a full rewrite of the engine.  It is
based on grammar files derived from real text of real lan­
guages.  Several grammars are provided for you to use, and
you can also create your own.


Sample code:

  use Silly::Werder;

  my $werds = new Silly::Werder;

  # Set the min and max number of werds per line
  $werds->set_werds_num(5, 9);

  # Set the min and max # of syllables per werd
  $werds->set_syllables_num(3, 7);

  # End the sentences in a newline
  $werds->end_with_newline(1);

  # Set the language to mimic
  $werds->set_language(English, small);

  # Return a random sentence, question, or exclamation
  $line = $werds->line;

  $sentence    = $werds->sentence;
  $question    = $werds->question;
  $exclamation = $werds->exclamation;

  # Get a single werd
  $werd = $werds->get_werd;

  # Generate a long random sentence calling as a class method
  Silly::Werder->set_werds_num(10,20);
  print Silly::Werder->line;

  # All of the methods can be used as either class methods
  # or object methods.


Werder was created and implemented by Dave Olszewski, aka cxreg.  You 
can send comments, suggestions, flames, or love letters to 
[email protected]


This code is distributed under the GPL.  See COPYING for details.

silly-werder's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.