Update: to do: categorise and decline/conjugate by part of speech. Prioritise common words like and, the, etc. Avoid semi-duplication (renewer/renewing in above run)#!/usr/bin/perl use strict; use warnings; my @words = <DATA>; chomp @words; my $length = 5 + 20*rand(); { use integer; $length += 0; } for my $line (0..$length) { $line and print ".\n"; my $width = 9*rand(); { use integer; $width++; } for my $word ( 0..$width ) { my $where = $#words * rand(); { use integer; $where += 0; } my $choose = $words[$where]; unless ($word) { $choose =~ /^(.)(.*)$/; $choose = uc($1) . $2; } $word and $choose = " $choose"; print $choose; } } print ".\n"; __DATA__ 2 1080 &c 10-point 10th 11-point 12-point etc. for rest of English words
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: First Run
by Lotus1 (Vicar) on Sep 04, 2018 at 21:10 UTC | |
by TheloniusMonk (Sexton) on Sep 05, 2018 at 06:44 UTC | |
|
Re: First Run (updated)
by AnomalousMonk (Archbishop) on Sep 05, 2018 at 14:59 UTC | |
by Lotus1 (Vicar) on Sep 17, 2018 at 20:39 UTC | |
by choroba (Cardinal) on Sep 17, 2018 at 22:35 UTC |