random_data 1.3.1 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +12 -1
- data/Manifest.txt +4 -13
- data/{README.txt → README.rdoc} +8 -2
- data/Rakefile +31 -3
- data/lib/random_data.rb +12 -10
- data/lib/random_data/array_randomizer.rb +44 -0
- data/lib/random_data/markov.rb +77 -0
- data/lib/random_data/names.rb +9 -9
- data/lib/random_data/version.rb +1 -7
- data/script/console +10 -0
- data/script/destroy +2 -2
- data/script/generate +2 -2
- data/script/txt2html +12 -15
- data/test/henry_v_prolog.txt +41 -0
- data/test/test_helper.rb +0 -1
- data/test/test_random_data.rb +63 -1
- metadata +35 -25
- data/config/hoe.rb +0 -74
- data/config/requirements.rb +0 -17
- data/log/debug.log +0 -0
- data/setup.rb +0 -1585
- data/tasks/deployment.rake +0 -27
- data/tasks/environment.rake +0 -7
- data/tasks/website.rake +0 -9
- data/website/index.html +0 -11
- data/website/index.txt +0 -39
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/stylesheets/screen.css +0 -138
- data/website/template.rhtml +0 -48
data/History.txt
CHANGED
@@ -1,4 +1,15 @@
|
|
1
|
-
== 1.
|
1
|
+
== 1.5.0 2008-11-06
|
2
|
+
* 2 major enhancement:
|
3
|
+
* Totally cleaned up and reconfigured hoe using newgem 1.0's conventions
|
4
|
+
* Added Markov model text generator (courtesy of Hugh Sasse)
|
5
|
+
|
6
|
+
* 1 minor enhancement:
|
7
|
+
* Added roulette method to Array (courtesy of Hugh Sasse)
|
8
|
+
|
9
|
+
* 1 minor fix:
|
10
|
+
* Fixed newline bug in the name generator (courtesy of Harold Gimenez)
|
11
|
+
|
12
|
+
== 1.3.1 2008-06-06
|
2
13
|
|
3
14
|
* 2 minor enhancements:
|
4
15
|
* Added added more last and firstnames (courtesy of Hugh Sasse)
|
data/Manifest.txt
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
History.txt
|
2
2
|
License.txt
|
3
3
|
Manifest.txt
|
4
|
-
README.
|
4
|
+
README.rdoc
|
5
5
|
Rakefile
|
6
|
-
config/hoe.rb
|
7
|
-
config/requirements.rb
|
8
6
|
lib/random_data.rb
|
9
7
|
lib/random_data/array_randomizer.rb
|
10
8
|
lib/random_data/booleans.rb
|
@@ -12,22 +10,15 @@ lib/random_data/contact_info.rb
|
|
12
10
|
lib/random_data/dates.rb
|
13
11
|
lib/random_data/grammar.rb
|
14
12
|
lib/random_data/locations.rb
|
13
|
+
lib/random_data/markov.rb
|
15
14
|
lib/random_data/names.rb
|
16
15
|
lib/random_data/numbers.rb
|
17
16
|
lib/random_data/text.rb
|
18
17
|
lib/random_data/version.rb
|
19
|
-
|
18
|
+
script/console
|
20
19
|
script/destroy
|
21
20
|
script/generate
|
22
21
|
script/txt2html
|
23
|
-
|
24
|
-
tasks/deployment.rake
|
25
|
-
tasks/environment.rake
|
26
|
-
tasks/website.rake
|
22
|
+
test/henry_v_prolog.txt
|
27
23
|
test/test_helper.rb
|
28
24
|
test/test_random_data.rb
|
29
|
-
website/index.html
|
30
|
-
website/index.txt
|
31
|
-
website/javascripts/rounded_corners_lite.inc.js
|
32
|
-
website/stylesheets/screen.css
|
33
|
-
website/template.rhtml
|
data/{README.txt → README.rdoc}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
=
|
1
|
+
= random_data
|
2
2
|
|
3
3
|
This gem provides a Random singleton class with a series of methods for generating random test data including names, mailing addresses, dates, phone numbers, e-mail addresses, and text. Instead of:
|
4
4
|
|
@@ -26,7 +26,7 @@ Random.date, Random.date_between
|
|
26
26
|
Random.address_line_1, Random.address_line_2, Random.zipcode, Random.uk_post_code, Random.state, Random.state_full, Random.country, Random.city
|
27
27
|
|
28
28
|
=== Name Methods
|
29
|
-
Random.firstname, Random.initial, Random.lastname
|
29
|
+
Random.firstname, Random.firstname_male, Random.firstname_female, Random.initial, Random.lastname
|
30
30
|
|
31
31
|
=== Text Methods
|
32
32
|
Random.alphanumeric, Random.paragraphs
|
@@ -40,8 +40,14 @@ Random.number, Random.bit, Random.bits
|
|
40
40
|
=== Boolean Methods
|
41
41
|
Random.boolean
|
42
42
|
|
43
|
+
=== Markov Generator Methods
|
44
|
+
Random.MarkovGenerator.new
|
45
|
+
Random.MarkovGenerator.insert
|
46
|
+
Random.MarkovGenerator.generate
|
47
|
+
|
43
48
|
=== Array Extension
|
44
49
|
Array.rand
|
50
|
+
Array.roulette
|
45
51
|
|
46
52
|
=== Choose From File Methods
|
47
53
|
Random implements a method_missing helper that will choose a line at random from a file in your load path. See Random::method_missing for details.
|
data/Rakefile
CHANGED
@@ -1,4 +1,32 @@
|
|
1
|
-
require
|
2
|
-
require '
|
1
|
+
%w[rubygems rake rake/clean fileutils newgem rubigen].each { |f| require f }
|
2
|
+
require File.dirname(__FILE__) + '/lib/random_data'
|
3
3
|
|
4
|
-
|
4
|
+
# Generate all the Rake tasks
|
5
|
+
# Run 'rake -T' to see list of generated tasks (from gem root directory)
|
6
|
+
$hoe = Hoe.new('random_data', RandomData::VERSION) do |p|
|
7
|
+
p.developer('Mike Subelsky', 'mike@subelsky.com')
|
8
|
+
p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
|
9
|
+
p.rubyforge_name = "random-data"
|
10
|
+
p.description = "A Ruby gem that provides a Random class with a series of methods for generating random test data including names, mailing addresses, dates, phone numbers, e-mail addresses, and text."
|
11
|
+
p.summary = "A Ruby gem that provides a Random class with a series of methods for generating random test data including names, mailing addresses, dates, phone numbers, e-mail addresses, and text."
|
12
|
+
p.email = 'random_data@mikeshop.net'
|
13
|
+
# p.remote_rdoc_dir = 'random-data'
|
14
|
+
|
15
|
+
# p.extra_deps = [
|
16
|
+
# ['activesupport','>= 2.0.2'],
|
17
|
+
# ]
|
18
|
+
p.extra_dev_deps = [
|
19
|
+
['newgem', ">= #{::Newgem::VERSION}"]
|
20
|
+
]
|
21
|
+
|
22
|
+
p.clean_globs |= %w[**/.DS_Store tmp *.log]
|
23
|
+
path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
|
24
|
+
p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
|
25
|
+
p.rsync_args = '-av --delete --ignore-errors'
|
26
|
+
end
|
27
|
+
|
28
|
+
require 'newgem/tasks' # load /tasks/*.rake
|
29
|
+
Dir['tasks/**/*.rake'].each { |t| load t }
|
30
|
+
|
31
|
+
# TODO - want other tests/tasks run by default? Add them to the list
|
32
|
+
# task :default => [:spec, :features]
|
data/lib/random_data.rb
CHANGED
@@ -1,14 +1,16 @@
|
|
1
|
-
|
1
|
+
dir = "#{File.dirname(__FILE__)}/random_data"
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
3
|
+
require "#{dir}/array_randomizer"
|
4
|
+
require "#{dir}/booleans"
|
5
|
+
require "#{dir}/contact_info"
|
6
|
+
require "#{dir}/dates"
|
7
|
+
require "#{dir}/locations"
|
8
|
+
require "#{dir}/names"
|
9
|
+
require "#{dir}/numbers"
|
10
|
+
require "#{dir}/text"
|
11
|
+
require "#{dir}/markov"
|
12
|
+
require "#{dir}/grammar"
|
13
|
+
require "#{dir}/version"
|
12
14
|
|
13
15
|
class Random
|
14
16
|
extend RandomData::Booleans
|
@@ -12,6 +12,50 @@ module RandomData
|
|
12
12
|
return self[Kernel.rand(self.size)]
|
13
13
|
end
|
14
14
|
|
15
|
+
# Takes an array of non-negative weights
|
16
|
+
# and returns the index selected by a
|
17
|
+
# roulette wheel weighted according to those
|
18
|
+
# weights.
|
19
|
+
# If a block is given then k is used to determine
|
20
|
+
# how many times the block is called. In this
|
21
|
+
# case nil is returned.
|
22
|
+
def roulette(k=1)
|
23
|
+
wheel = []
|
24
|
+
weight = 0
|
25
|
+
# Create the cumulative array.
|
26
|
+
self.each do |x|
|
27
|
+
raise "Illegal negative weight #{x}" if x < 0
|
28
|
+
wheel.push(weight += x)
|
29
|
+
end
|
30
|
+
# print "wheel is #{wheel.inspect}\n";
|
31
|
+
# print "weight is #{weight.inspect}\n";
|
32
|
+
raise "Array had all zero weights" if weight.zero?
|
33
|
+
wheel.push(weight + 1) #Add extra element
|
34
|
+
if block_given?
|
35
|
+
k.times do
|
36
|
+
r = Kernel.rand() # so we don't pick up that from array.
|
37
|
+
# print "r is #{r.inspect}\n";
|
38
|
+
roll = weight.to_f * r
|
39
|
+
# print "roll is #{roll.inspect}\n";
|
40
|
+
0.upto(self.size - 1) do |i|
|
41
|
+
if wheel[i+1] > roll
|
42
|
+
yield i
|
43
|
+
break
|
44
|
+
end # if
|
45
|
+
end # upto
|
46
|
+
end # if block_given?
|
47
|
+
return nil
|
48
|
+
else
|
49
|
+
r = Kernel.rand() # so we don't pick up that from array.
|
50
|
+
# print "r is #{r.inspect}\n";
|
51
|
+
roll = weight.to_f * r
|
52
|
+
# print "roll is #{roll.inspect}\n";
|
53
|
+
0.upto(self.size - 1) do |i|
|
54
|
+
return i if wheel[i+1] > roll
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
15
59
|
end
|
16
60
|
|
17
61
|
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
# Methods to create a markov chain from some input text.
|
2
|
+
|
3
|
+
|
4
|
+
module RandomData
|
5
|
+
class MarkovGenerator
|
6
|
+
|
7
|
+
def initialize(memory = 1)
|
8
|
+
@memory_size = memory
|
9
|
+
@table = Hash.new {|h,k| h[k] = {}}
|
10
|
+
@state = []
|
11
|
+
end
|
12
|
+
|
13
|
+
|
14
|
+
# given the next token of input add it to the
|
15
|
+
# table
|
16
|
+
def insert(result)
|
17
|
+
# puts "insert called with #{result}"
|
18
|
+
tabindex = Marshal.dump(@state)
|
19
|
+
if @table[tabindex].has_key?(result)
|
20
|
+
@table[tabindex][result] += 1
|
21
|
+
else
|
22
|
+
@table[tabindex][result] = 1
|
23
|
+
end
|
24
|
+
# puts "table #{@table.inspect}"
|
25
|
+
next_state(result)
|
26
|
+
end
|
27
|
+
|
28
|
+
def next_state(result)
|
29
|
+
@state.shift if @state.size >= @memory_size
|
30
|
+
@state.push(result)
|
31
|
+
# puts "@state is #{@state.inspect}"
|
32
|
+
end
|
33
|
+
|
34
|
+
def generate(n=1, clear_state=false)
|
35
|
+
@state = [] if clear_state
|
36
|
+
results = []
|
37
|
+
n.times do
|
38
|
+
retry_count = 0
|
39
|
+
begin
|
40
|
+
result_hash = @table[Marshal.dump(@state)]
|
41
|
+
the_keys,the_vals = [],[]
|
42
|
+
result_hash.each_pair do |k,v|
|
43
|
+
the_keys << k
|
44
|
+
the_vals << v
|
45
|
+
end
|
46
|
+
# get the weighted random value, by index.
|
47
|
+
i = the_vals.roulette
|
48
|
+
rescue
|
49
|
+
# puts "results:#{result_hash.inspect}";
|
50
|
+
# puts "keys:#{the_keys.inspect}";
|
51
|
+
# puts "vals:#{the_vals.inspect}";
|
52
|
+
# puts "state:#{@state.inspect}";
|
53
|
+
@state = []
|
54
|
+
retry_count += 1
|
55
|
+
if retry_count < 5
|
56
|
+
retry
|
57
|
+
else
|
58
|
+
# puts
|
59
|
+
# puts "table:#{@table.inspect}";
|
60
|
+
raise
|
61
|
+
end
|
62
|
+
end
|
63
|
+
result = the_keys[i]
|
64
|
+
# puts "index:#{i.inspect}";
|
65
|
+
|
66
|
+
next_state(result)
|
67
|
+
if block_given?
|
68
|
+
yield result
|
69
|
+
end
|
70
|
+
results << result
|
71
|
+
end
|
72
|
+
return results
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
|
77
|
+
end
|
data/lib/random_data/names.rb
CHANGED
@@ -9,10 +9,10 @@ module RandomData
|
|
9
9
|
('A'..'Z').to_a.rand
|
10
10
|
end
|
11
11
|
|
12
|
-
@@lastnames = %w(ABEL ANDERSON ANDREWS ANTHONY BAKER BROWN BURROWS CLARK CLARKE CLARKSON DAVIDSON DAVIES DAVIS
|
13
|
-
DENT EDWARDS GARCIA GRANT HALL HARRIS HARRISON JACKSON JEFFRIES JEFFERSON JOHNSON JONES
|
14
|
-
KIRBY KIRK LAKE LEE LEWIS MARTIN MARTINEZ MAJOR MILLER MOORE OATES PETERS PETERSON ROBERTSON
|
15
|
-
ROBINSON RODRIGUEZ SMITH SMYTHE STEVENS TAYLOR THATCHER THOMAS THOMPSON WALKER WASHINGTON WHITE
|
12
|
+
@@lastnames = %w(ABEL ANDERSON ANDREWS ANTHONY BAKER BROWN BURROWS CLARK CLARKE CLARKSON DAVIDSON DAVIES DAVIS
|
13
|
+
DENT EDWARDS GARCIA GRANT HALL HARRIS HARRISON JACKSON JEFFRIES JEFFERSON JOHNSON JONES
|
14
|
+
KIRBY KIRK LAKE LEE LEWIS MARTIN MARTINEZ MAJOR MILLER MOORE OATES PETERS PETERSON ROBERTSON
|
15
|
+
ROBINSON RODRIGUEZ SMITH SMYTHE STEVENS TAYLOR THATCHER THOMAS THOMPSON WALKER WASHINGTON WHITE
|
16
16
|
WILLIAMS WILSON YORKE)
|
17
17
|
|
18
18
|
# Returns a random lastname
|
@@ -25,13 +25,13 @@ module RandomData
|
|
25
25
|
@@lastnames.rand.capitalize
|
26
26
|
end
|
27
27
|
|
28
|
-
@@male_first_names = %w(ADAM ANTHONY ARTHUR BRIAN CHARLES CHRISTOPHER DANIEL DAVID DONALD EDGAR EDWARD EDWIN
|
29
|
-
GEORGE HAROLD HERBERT HUGH JAMES JASON JOHN JOSEPH KENNETH KEVIN MARCUS MARK MATTHEW
|
28
|
+
@@male_first_names = %w(ADAM ANTHONY ARTHUR BRIAN CHARLES CHRISTOPHER DANIEL DAVID DONALD EDGAR EDWARD EDWIN
|
29
|
+
GEORGE HAROLD HERBERT HUGH JAMES JASON JOHN JOSEPH KENNETH KEVIN MARCUS MARK MATTHEW
|
30
30
|
MICHAEL PAUL PHILIP RICHARD ROBERT ROGER RONALD SIMON STEVEN TERRY THOMAS WILLIAM)
|
31
31
|
|
32
|
-
@@female_first_names = %w(ALISON ANN ANNA ANNE BARBARA BETTY BERYL CAROL CHARLOTTE CHERYL DEBORAH DIANA DONNA
|
33
|
-
DOROTHY ELIZABETH EVE FELICITY FIONA HELEN HELENA JENNIFER JESSICA JUDITH KAREN KIMBERLY
|
34
|
-
LAURA LINDA LISA LUCY MARGARET MARIA MARY MICHELLE NANCY PATRICIA POLLY ROBYN RUTH SANDRA
|
32
|
+
@@female_first_names = %w(ALISON ANN ANNA ANNE BARBARA BETTY BERYL CAROL CHARLOTTE CHERYL DEBORAH DIANA DONNA
|
33
|
+
DOROTHY ELIZABETH EVE FELICITY FIONA HELEN HELENA JENNIFER JESSICA JUDITH KAREN KIMBERLY
|
34
|
+
LAURA LINDA LISA LUCY MARGARET MARIA MARY MICHELLE NANCY PATRICIA POLLY ROBYN RUTH SANDRA
|
35
35
|
SARAH SHARON SUSAN TABITHA URSULA VICTORIA WENDY)
|
36
36
|
|
37
37
|
@@first_names = @@male_first_names + @@female_first_names
|
data/lib/random_data/version.rb
CHANGED
data/script/console
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# File: script/console
|
3
|
+
irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
|
4
|
+
|
5
|
+
libs = " -r irb/completion"
|
6
|
+
# Perhaps use a console_lib to store any extra methods I may want available in the cosole
|
7
|
+
# libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
|
8
|
+
libs << " -r #{File.dirname(__FILE__) + '/../lib/random_data.rb'}"
|
9
|
+
puts "Loading random_data gem"
|
10
|
+
exec "#{irb} #{libs} --simple-prompt"
|
data/script/destroy
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.join(File.dirname(__FILE__), '..')
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
3
|
|
4
4
|
begin
|
5
5
|
require 'rubigen'
|
@@ -10,5 +10,5 @@ end
|
|
10
10
|
require 'rubigen/scripts/destroy'
|
11
11
|
|
12
12
|
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme]
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
14
|
RubiGen::Scripts::Destroy.new.run(ARGV)
|
data/script/generate
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
APP_ROOT = File.join(File.dirname(__FILE__), '..')
|
2
|
+
APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
|
3
3
|
|
4
4
|
begin
|
5
5
|
require 'rubigen'
|
@@ -10,5 +10,5 @@ end
|
|
10
10
|
require 'rubigen/scripts/generate'
|
11
11
|
|
12
12
|
ARGV.shift if ['--help', '-h'].include?(ARGV[0])
|
13
|
-
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme]
|
13
|
+
RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
|
14
14
|
RubiGen::Scripts::Generate.new.run(ARGV)
|
data/script/txt2html
CHANGED
@@ -1,20 +1,17 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
require 'newgem'
|
6
|
-
rescue LoadError
|
7
|
-
puts "\n\nGenerating the website requires the newgem RubyGem"
|
8
|
-
puts "Install: gem install newgem\n\n"
|
9
|
-
exit(1)
|
10
|
-
end
|
3
|
+
load File.dirname(__FILE__) + "/../Rakefile"
|
4
|
+
require 'rubyforge'
|
11
5
|
require 'redcloth'
|
12
6
|
require 'syntax/convertors/html'
|
13
7
|
require 'erb'
|
14
|
-
require File.dirname(__FILE__) + '/../lib/random_data/version.rb'
|
15
8
|
|
16
|
-
|
17
|
-
|
9
|
+
download = "http://rubyforge.org/projects/#{$hoe.rubyforge_name}"
|
10
|
+
version = $hoe.version
|
11
|
+
|
12
|
+
def rubyforge_project_id
|
13
|
+
RubyForge.new.configure.autoconfig["group_ids"][$hoe.rubyforge_name]
|
14
|
+
end
|
18
15
|
|
19
16
|
class Fixnum
|
20
17
|
def ordinal
|
@@ -42,10 +39,9 @@ end
|
|
42
39
|
|
43
40
|
if ARGV.length >= 1
|
44
41
|
src, template = ARGV
|
45
|
-
template ||= File.join(File.dirname(__FILE__), '/../website/template.
|
46
|
-
|
42
|
+
template ||= File.join(File.dirname(__FILE__), '/../website/template.html.erb')
|
47
43
|
else
|
48
|
-
puts("Usage: #{File.split($0).last} source.txt [template.
|
44
|
+
puts("Usage: #{File.split($0).last} source.txt [template.html.erb] > output.html")
|
49
45
|
exit!
|
50
46
|
end
|
51
47
|
|
@@ -55,7 +51,8 @@ title = nil
|
|
55
51
|
body = nil
|
56
52
|
File.open(src) do |fsrc|
|
57
53
|
title_text = fsrc.readline
|
58
|
-
|
54
|
+
body_text_template = fsrc.read
|
55
|
+
body_text = ERB.new(body_text_template).result(binding)
|
59
56
|
syntax_items = []
|
60
57
|
body_text.gsub!(%r!<(pre|code)[^>]*?syntax=['"]([^'"]+)[^>]*>(.*?)</\1>!m){
|
61
58
|
ident = syntax_items.length
|
@@ -0,0 +1,41 @@
|
|
1
|
+
PROLOGUE
|
2
|
+
|
3
|
+
Enter CHORUS
|
4
|
+
|
5
|
+
CHORUS.
|
6
|
+
O for a Muse of fire, that would ascend
|
7
|
+
The brightest heaven of invention,
|
8
|
+
A kingdom for a stage, princes to act,
|
9
|
+
And monarchs to behold the swelling scene!
|
10
|
+
Then should the warlike Harry, like himself,
|
11
|
+
Assume the port of Mars; and at his heels,
|
12
|
+
Leash'd in like hounds, should famine, sword, and fire,
|
13
|
+
Crouch for employment. But pardon, gentles all,
|
14
|
+
The flat unraised spirits that hath dar'd
|
15
|
+
On this unworthy scaffold to bring forth
|
16
|
+
So great an object. Can this cockpit hold
|
17
|
+
The vasty fields of France? Or may we cram
|
18
|
+
Within this wooden O the very casques
|
19
|
+
That did affright the air at Agincourt?
|
20
|
+
O, pardon! since a crooked figure may
|
21
|
+
Attest in little place a million;
|
22
|
+
And let us, ciphers to this great accompt,
|
23
|
+
On your imaginary forces work.
|
24
|
+
Suppose within the girdle of these walls
|
25
|
+
Are now confin'd two mighty monarchies,
|
26
|
+
Whose high upreared and abutting fronts
|
27
|
+
The perilous narrow ocean parts asunder.
|
28
|
+
Piece out our imperfections with your thoughts:
|
29
|
+
Into a thousand parts divide one man,
|
30
|
+
And make imaginary puissance;
|
31
|
+
Think, when we talk of horses, that you see them
|
32
|
+
Printing their proud hoofs i' th' receiving earth;
|
33
|
+
For 'tis your thoughts that now must deck our kings,
|
34
|
+
Carry them here and there, jumping o'er times,
|
35
|
+
Turning th' accomplishment of many years
|
36
|
+
Into an hour-glass; for the which supply,
|
37
|
+
Admit me Chorus to this history;
|
38
|
+
Who prologue-like, your humble patience pray
|
39
|
+
Gently to hear, kindly to judge, our play.
|
40
|
+
|
41
|
+
|