haiku_gadget 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/haiku_gadget/dictionary.rb +2 -1
- data/lib/haiku_gadget/line_templates.rb +31 -8
- data/lib/haiku_gadget/version.rb +1 -1
- data/lib/haiku_gadget/word_template.rb +1 -1
- data/lib/haiku_gadget/word_type.rb +2 -2
- data/lib/words.yml +44 -37
- data/spec/haiku_gadget/haiku_gadget_spec.rb +13 -0
- data/test_haiku.rb +10 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04cebce23f2732458d8c4d88799924a8626ca82e
|
4
|
+
data.tar.gz: 9818adab21bdecec6087ba934963e7cf4e1b7054
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 09c4ed48ba8e792b903dcc1adb6999c6e1b03fbfe54b4ce10c170566a9830c8379ca22b3dffad3e8c7dc29caa04ee9737bed7d5b7f34df232fe533f36745556f
|
7
|
+
data.tar.gz: e7343102c46b86bced304a815d3118b914f0f9698677dc363bd5daba6b22b6763f6ef762575b86dd986ed8c42934675085c72009883c1f73e2c2b773260c1a14
|
@@ -12,12 +12,13 @@ module HaikuGadget
|
|
12
12
|
determiner: WordType.new(:determiner, true),
|
13
13
|
to_be: WordType.new(:to_be, true),
|
14
14
|
adjective: WordType.new(:adjective, true),
|
15
|
+
adjective_adverb: WordType.new(:adjective_adverb),
|
15
16
|
noun: WordType.new(:noun, true, :plural),
|
16
17
|
mass_noun: WordType.new(:mass_noun),
|
17
18
|
mass_noun_determiner: WordType.new(:mass_noun_determiner),
|
18
19
|
verb: WordType.new(:verb, true, :singular),
|
19
20
|
verb_self: WordType.new(:verb_self, true, :singular),
|
20
|
-
|
21
|
+
verb_adverb: WordType.new(:verb_adverb),
|
21
22
|
transition_join: WordType.new(:transition_join)
|
22
23
|
}
|
23
24
|
|
@@ -18,11 +18,11 @@ module HaikuGadget
|
|
18
18
|
|
19
19
|
# imperative action (command)
|
20
20
|
LineTemplate.new(
|
21
|
-
WordTemplate.new(:adverb, 2),
|
22
21
|
WordTemplate.new(:verb, 1, :plural),
|
23
22
|
WordTemplate.new(:determiner, 0, :plural),
|
24
23
|
WordTemplate.new(:adjective, 0, :plural),
|
25
|
-
WordTemplate.new(:noun, 1, :plural)
|
24
|
+
WordTemplate.new(:noun, 1, :plural),
|
25
|
+
WordTemplate.new(:verb_adverb)
|
26
26
|
),
|
27
27
|
|
28
28
|
# mass/abstract noun is adj
|
@@ -97,7 +97,7 @@ module HaikuGadget
|
|
97
97
|
WordTemplate.new(:determiner, 1, :singular, 2),
|
98
98
|
WordTemplate.new(:adjective, 0, :singular, 2),
|
99
99
|
WordTemplate.new(:noun, 1, :singular, 2),
|
100
|
-
WordTemplate.new(:
|
100
|
+
WordTemplate.new(:verb_adverb)
|
101
101
|
),
|
102
102
|
|
103
103
|
LineTemplate.new(
|
@@ -106,7 +106,7 @@ module HaikuGadget
|
|
106
106
|
WordTemplate.new(:determiner, 0, :plural, 2),
|
107
107
|
WordTemplate.new(:adjective, 0, :plural, 2),
|
108
108
|
WordTemplate.new(:noun, 1, :plural, 2),
|
109
|
-
WordTemplate.new(:
|
109
|
+
WordTemplate.new(:verb_adverb)
|
110
110
|
)
|
111
111
|
],
|
112
112
|
|
@@ -139,7 +139,7 @@ module HaikuGadget
|
|
139
139
|
WordTemplate.new(:adjective, 0, :singular, 1),
|
140
140
|
WordTemplate.new(:noun, 1, :singular, 1),
|
141
141
|
WordTemplate.new(:verb_self, 1, :singular, 1),
|
142
|
-
WordTemplate.new(:
|
142
|
+
WordTemplate.new(:verb_adverb)
|
143
143
|
),
|
144
144
|
|
145
145
|
LineTemplate.new(
|
@@ -148,7 +148,7 @@ module HaikuGadget
|
|
148
148
|
WordTemplate.new(:adjective, 0, :plural, 1),
|
149
149
|
WordTemplate.new(:noun, 1, :plural, 1),
|
150
150
|
WordTemplate.new(:verb_self, 1, :plural, 1),
|
151
|
-
WordTemplate.new(:
|
151
|
+
WordTemplate.new(:verb_adverb)
|
152
152
|
)
|
153
153
|
]
|
154
154
|
]
|
@@ -174,8 +174,30 @@ module HaikuGadget
|
|
174
174
|
]
|
175
175
|
]
|
176
176
|
|
177
|
+
SHORT_LINES = [
|
178
|
+
[
|
179
|
+
LineTemplate.new(
|
180
|
+
WordTemplate.custom([
|
181
|
+
'it is', 'it was',
|
182
|
+
'that is', 'that was',
|
183
|
+
'we are', 'we were',
|
184
|
+
'they are', 'they were'
|
185
|
+
], 2),
|
186
|
+
WordTemplate.new(:adjective_adverb),
|
187
|
+
WordTemplate.new(:adjective, 1, :singular)
|
188
|
+
),
|
189
|
+
|
190
|
+
LineTemplate.new(
|
191
|
+
WordTemplate.custom(%w(it's that's we're they're), 1),
|
192
|
+
WordTemplate.new(:adjective_adverb),
|
193
|
+
WordTemplate.new(:adjective, 1, :singular)
|
194
|
+
)
|
195
|
+
]
|
196
|
+
]
|
197
|
+
|
177
198
|
ALL_TOP_LINES = [
|
178
|
-
COMMON_LINES
|
199
|
+
COMMON_LINES,
|
200
|
+
SHORT_LINES
|
179
201
|
].flatten(1)
|
180
202
|
|
181
203
|
ALL_MIDDLE_LINES = [
|
@@ -185,7 +207,8 @@ module HaikuGadget
|
|
185
207
|
|
186
208
|
ALL_BOTTOM_LINES = [
|
187
209
|
COMMON_LINES,
|
188
|
-
BOTTOM_LINES
|
210
|
+
BOTTOM_LINES,
|
211
|
+
SHORT_LINES
|
189
212
|
].flatten(1)
|
190
213
|
|
191
214
|
end
|
data/lib/haiku_gadget/version.rb
CHANGED
@@ -17,7 +17,7 @@ module HaikuGadget
|
|
17
17
|
word_type = Dictionary::WORD_TYPES[base_symbol_or_word_type]
|
18
18
|
end
|
19
19
|
|
20
|
-
fail
|
20
|
+
fail "unknown word type '#{base_symbol_or_word_type.to_s}'" unless word_type
|
21
21
|
|
22
22
|
# check if template plurality needs to be set or changed
|
23
23
|
if word_type.can_be_plural
|
@@ -24,8 +24,8 @@ module HaikuGadget
|
|
24
24
|
# this is a redundant error check and should not happen
|
25
25
|
plurality = [:singular, :plural].sample if @can_be_plural && plurality == :none
|
26
26
|
|
27
|
-
if @can_be_plural && [:singular, :plural].include?(plurality)
|
28
|
-
# word can be plural
|
27
|
+
if plurality == :common || (@can_be_plural && [:singular, :plural].include?(plurality))
|
28
|
+
# word can be plural or is from the common set
|
29
29
|
"#{@base_symbol.to_s}_#{plurality.to_s}".to_sym
|
30
30
|
else
|
31
31
|
# word type is not relevent to plurality
|
data/lib/words.yml
CHANGED
@@ -24,25 +24,10 @@
|
|
24
24
|
[[are not, 'aren''t'], [were not, 'weren''t'], will be]
|
25
25
|
]
|
26
26
|
|
27
|
-
:adjective_common: [
|
28
|
-
[red, fresh, weird, burnt, white, flat, round, weak, old, new, young, swell, sweet, dazed, vague, warmed, cool, strong, blue, clear, soft, hard, black, big, small, tight, loose, long, short, wry, young, green, bold, good, bad, kind, mean, wet, dry, free, light, dark, dim, wise, grim, huge, worn, numb, wild, tall, short, hot, cold, sad, gray, green, gold, raw, rich, poor, bored, dull, calm, smart, dumb, grand, keen, bright, bent, foul, close, chrome, low, last, first, next, fun, high, late, quaint, top, lost, cute, real, strict, fast, slow, rough, damp, smooth, clean, great, quick, swift, slick, nice, fat, punk, right, wrong, curved, doomed, frayed, crazed, closed, [north, west, south, east]],
|
29
|
-
[orange, mental, tired, gloomy, murky, salty, balanced, frosted, confused, opened, tasty, frozen, boiling, slimy, failed, oblong, broken, silver, faulty, limestone, opaque, silly, spinning, busted, lazy, flying, awesome, folded, rhythmic, floating, smoking, twisted, wispy, uncooked, complex, bubbly, bankrupt, moving, crispy, laundered, rounded, ample, dirty, catered, constrained, cosmic, choking, bizarre, sanded, roasted, spastic, dapper, swanky, able, fabled, stable, leaning, correct, staggered, open, evil, edgy, pricey, costly, fancy, stranded, meager, modest, humble, slimy, simple, unkind, unwound, teenage, heavy, standard, hollow, eager, rotten, unwise, grounded, boring, crazy, major, minor, naive, valid, random, happy, endless, human, splendid, certain, somber, livid, lonely, jealous, dreary, lovely, cheerful, secure, renowned, spicy, drunken, bulky, breaded, better, shorter, smaller, larger, smarter, faster, longer, distant, wealthy, dismayed, vital, colored, abstract, vivid, ancient, bitter, sour, airy, timely, sunny, current, funky, skinny, bloody, girly, boyish, roomy, royal, marine, varied, fuzzy, helpful, crafty, silky, plastic, laser, upper, lower, cloudy, stronger, weaker, bigger, taller, greater, guilty, finished, [northern, western, southern, eastern]],
|
30
|
-
[redundant, ecstatic, respected, uncovered, populous, required, unstable, communist, communal, religious, circular, feminine, masculine, incorrect, embarrassed, misshapen, glorious, hovering, uncaring, expanded, insulted, discovered, commissioned, considered, opulent, casual, ultimate, imminent, exacting, creative, furious, destructive, digital, analog, essential, albino, nuclear, atomic, chocolate, overweight, invalid, possible, advertised, natural, terrific, amazing, confident, exacting, primary, lunatic, satisfied, impressive, noteworthy, suitable, musical, eternal, skydiving, expected, parallel, factual, immobile, ballistic, innocent, inverted, beautiful],
|
31
|
-
[undulating, incredible, unforgiving, acceptable, elaborate, necessary, stimulated, simulated, measurable, recommended, mandatory, honorable, identical, overstated, altruistic, generated, extraneous, aluminum, obfuscated, appropriate, symbiotic, calculated, mysterious, unknowable, contemplative, incapable, overbearing, high quality, low quality, microbial, questionable, knowledgeable, elemental, hilarious, inferior, meticulous, underwater, modulated]
|
32
|
-
]
|
33
|
-
:adjective_singular: [
|
34
|
-
[one]
|
35
|
-
]
|
36
|
-
:adjective_plural: [
|
37
|
-
[two, three, four, [five, six, eight, nine, ten, twelve]],
|
38
|
-
[zero, many, seven, twenty, thirty, [thirteen, fourteen, fifteen, sixteen, eighteen, nineteen, forty, fifty]],
|
39
|
-
[one hundred, several, numerous]
|
40
|
-
]
|
41
|
-
|
42
27
|
:noun_common: [
|
43
|
-
[thing, bug, head, toe, eye, phone, web, ball, hand, ear, sheet, bed, car, truck, plane, brain, day, sun, square, bike, lake, creek, stone, moon, shoe, yacht, field, thought, sword, wig, boy, girl, kid, pet, fig, moth, dog, bun, cat, bat, oar, lip, grain, soul, ape, duck, ray, beam, leg, rat, bear, boar, boat, door, goon, gob, plank, brick, stake, cube, ant, cord, bowl, chord, crate, wire, wreath, spear, isle, tree, wheel, hut, hat, gnat, spot, pond, cork, star, tribe, wine, beer, drink, film, bum, cup, rock, hook, path, king, queen, jack, mob, skill, job, cow, chair, disk, pit, hole, card, hill, mound, knob, zoo, light, fool, pill, quark, cloud, glove, sock, boot, slave, shrub, cook, pie, bird, snake, worm, tank, pen, weed, flute, nest, pot, bee, pan, gem, mom, dad, son, jeep, train, nun, pal, month, year, week, shark, yak, joke, owl, skunk, worm, egg, cake, pea, grape, bean, spore, seed, fruit, wing, fire, world, heart, rod, board, nail, end, ring, sea, key, god, word, night, knight, bone, room, toy, side, top, book, name, game, ship, test, park, time, bag, school, clone, shop, store, war, whale, frog, trail, mind, task, hour, smile, mile, punk, pawn, sound, flame, way, state, sphere, globe, group, part, case, point, home, fact],
|
44
|
-
[zombie, ninja, pirate, monkey, robot, hot dog, space ship, rain drop, circle, tv, flower, typhoon, garden, cookie, taco, gyro, mountain, painting, river, meadow, island, morsel, marble, mitten, trombone, nugget, chicken, donkey, llama, hamster, raisin, nation, rocket, bottle, anvil, sunset, muskrat, treasure, coastline, building, concept, forest, python, dinner, hammer, robber, jacket, singer, puppet, valley, comet, scooter, joker, pebble, kayak, airplane, table, atom, movie, poster, fountain, missile, pimple, player, shovel, window, rooster, biscuit, raven, eagle, question, vampire, peon, otter, camel, suburb, towel, turkey, pencil, planet, viking, squirrel, snowboard, dweller, lemon, photo, item, skillet, mother, father, brother, sister, elder, aardvark, apple, object, pickle, staple, wizard, raccoon, tadpole, spigot, daughter, mantra, pizza, calzone, vision, haiku, pixel, onion, glacier, penguin, cobra, dolphin, spider, trumpet, donut, ion, aura, geezer, freedom, attempt, pigeon, teacher, battle, laser, poem, minute, temple, jackpot, issue, statement, student, problem, system, program, number, dollar, orbit, [sunday, monday, tuesday, wednesday, thursday, friday, saturday]],
|
45
|
-
[spatula, tornado, hurricane, restaurant, computer, radio, stereo, commuter, newspaper, hairdryer, photograph, sombrero, burrito, telephone, animal, bicycle, dinosaur, iguana, kangaroo, umbrella, hiking boot, dishwasher, asteroid, meteor, cruise liner, oil tanker, apple pie, gorilla, tricycle, artichoke, musician, visitor, disaster, piano, canteloupe, pyramid, article, location, banana, hemisphere, area],
|
28
|
+
[thing, bug, head, toe, eye, phone, web, ball, hand, ear, sheet, bed, car, truck, plane, brain, day, sun, square, bike, lake, creek, stone, moon, shoe, yacht, field, thought, sword, wig, boy, girl, kid, pet, fig, moth, dog, bun, cat, bat, oar, lip, grain, soul, ape, duck, ray, beam, leg, rat, bear, boar, boat, door, goon, gob, plank, brick, stake, cube, ant, cord, bowl, chord, crate, wire, wreath, spear, isle, tree, wheel, hut, hat, gnat, spot, pond, cork, star, tribe, wine, beer, drink, film, bum, cup, rock, hook, path, king, queen, jack, mob, skill, job, cow, chair, disk, pit, hole, card, hill, mound, knob, zoo, light, fool, pill, quark, cloud, glove, sock, boot, slave, shrub, cook, pie, bird, snake, worm, tank, pen, weed, flute, nest, pot, bee, pan, gem, mom, dad, son, jeep, train, nun, pal, month, year, week, shark, yak, joke, owl, skunk, worm, egg, cake, pea, grape, bean, spore, seed, fruit, wing, fire, world, heart, rod, board, nail, end, ring, sea, key, god, word, night, knight, bone, room, toy, side, top, book, name, game, ship, test, park, time, bag, school, clone, shop, store, war, whale, frog, trail, mind, task, hour, smile, mile, punk, pawn, sound, flame, way, state, sphere, globe, group, part, case, point, home, fact, sack, mood],
|
29
|
+
[zombie, ninja, pirate, monkey, robot, hot dog, space ship, rain drop, circle, tv, flower, typhoon, garden, cookie, taco, gyro, mountain, painting, river, meadow, island, morsel, marble, mitten, trombone, nugget, chicken, donkey, llama, hamster, raisin, nation, rocket, bottle, anvil, sunset, muskrat, treasure, coastline, building, concept, forest, python, dinner, hammer, robber, jacket, singer, puppet, valley, comet, scooter, joker, pebble, kayak, airplane, table, atom, movie, poster, fountain, missile, pimple, player, shovel, window, rooster, biscuit, raven, eagle, question, vampire, peon, otter, camel, suburb, towel, turkey, pencil, planet, viking, squirrel, snowboard, dweller, lemon, photo, item, skillet, mother, father, brother, sister, elder, aardvark, apple, object, pickle, staple, wizard, raccoon, tadpole, spigot, daughter, mantra, pizza, calzone, vision, haiku, pixel, onion, glacier, penguin, cobra, dolphin, spider, trumpet, donut, ion, aura, geezer, freedom, attempt, pigeon, teacher, battle, laser, poem, minute, temple, jackpot, issue, statement, student, problem, system, program, number, dollar, orbit, canyon, color, [sunday, monday, tuesday, wednesday, thursday, friday, saturday]],
|
30
|
+
[spatula, tornado, hurricane, restaurant, computer, radio, stereo, commuter, newspaper, hairdryer, photograph, sombrero, burrito, telephone, animal, bicycle, dinosaur, iguana, kangaroo, umbrella, hiking boot, dishwasher, asteroid, meteor, cruise liner, oil tanker, apple pie, gorilla, tricycle, artichoke, musician, visitor, disaster, piano, canteloupe, pyramid, article, location, banana, hemisphere, area, equation],
|
46
31
|
[fortune cookie, ecosystem, obligation, generator, generation, ambassador, elevator, watermelon, convertible, calculator, harmonica, operation, invitation, kindergarten, helicopter, alligator, caterpillar, constellation, germination, politician, corporation, advertisement, declaration, astronomer, variation, perimeter, population, semicircle, operator, aquarium, disappointment, kaleidoscope, television, orangutan, washing machine, environment]
|
47
32
|
]
|
48
33
|
:noun_singular: [
|
@@ -63,46 +48,68 @@
|
|
63
48
|
]
|
64
49
|
|
65
50
|
:mass_noun: [
|
66
|
-
[fun, love, snow, funk, earth, space, dust, pain, life, health, death, loss, thought, beer, wine, dirt, fire, flame, style, lore, wind, force, fog, haze, time, war, peace, doom, food, art, gloom, hope, ice, oil, gold, light, cheese, grass, breath, steel, iron, stone, zen, stuff, hair, soup, sense, air, gas, ground, foam, glass, wealth, slime, cloth, tea, juice, fruit, jazz, heat, speed, glue, noise, wood, milk, cake, rice, work, grief, fish, lust, sleep, heart, night, skin, blood, sand, math, rain, youth, lore, grace, corn, bread, glee, mist, jive, help, trash, cream, silk, land, guilt],
|
67
|
-
[metal, essence, power, magic, evil, peril, disease, vapor, butter, sugar, darkness, fortune, soda, success, failure, water, passion, wonder, beauty, reason, fabric, lava, jello, ketchup, coffee, jelly, ice cream, sadness, goodness, physics, money, ethics, traffic, plastic, dancing, anger, danger, softness, friendship, trouble, culture, virtue, fuel, music, freedom, cornbread, lightning, sorrow, mustard, fluid, liquid, knowledge, silver, plasma],
|
68
|
-
[happiness, gravity, desire, misfortune, pestilence, certainty, mystery, energy, chocolate, honesty, poverty, laziness, chemistry, furniture, equipment, violence, liberty, jealousy, gelato, intention, religion, cookie dough, atmosphere],
|
69
|
-
[society, community, contemplation, inconvenience, humanity, morality, information, intelligence, stupidity, geometry]
|
51
|
+
[fun, love, snow, funk, earth, space, dust, pain, life, health, death, loss, thought, beer, wine, dirt, fire, flame, style, lore, wind, force, fog, haze, time, war, peace, doom, food, art, gloom, hope, ice, oil, gold, light, cheese, grass, breath, steel, iron, stone, zen, stuff, hair, soup, sense, air, gas, ground, foam, glass, wealth, slime, cloth, tea, juice, fruit, jazz, heat, speed, glue, noise, wood, milk, cake, rice, work, grief, fish, lust, sleep, heart, night, skin, blood, sand, math, rain, youth, lore, grace, corn, bread, glee, mist, jive, help, trash, cream, silk, land, guilt, loss, grits, booze, grit, grime, stew],
|
52
|
+
[metal, essence, power, magic, evil, peril, disease, vapor, butter, sugar, darkness, fortune, soda, success, failure, water, passion, wonder, beauty, reason, fabric, lava, jello, ketchup, coffee, jelly, ice cream, sadness, goodness, physics, money, ethics, traffic, plastic, dancing, anger, danger, softness, friendship, trouble, culture, virtue, fuel, music, freedom, cornbread, lightning, sorrow, mustard, fluid, liquid, knowledge, silver, plasma, pudding, vision, thunder],
|
53
|
+
[happiness, gravity, desire, misfortune, pestilence, certainty, mystery, energy, chocolate, honesty, poverty, laziness, chemistry, furniture, equipment, violence, liberty, jealousy, gelato, intention, religion, cookie dough, atmosphere, alcohol],
|
54
|
+
[society, community, contemplation, inconvenience, humanity, morality, information, intelligence, stupidity, geometry, cereal]
|
70
55
|
]
|
71
56
|
|
72
57
|
:verb_common: [
|
73
|
-
[get, drain, pat, climb, bend, give, take, pour, yank, clip, spread, build, shape, hate, throw, find, hear, see, smell, taste, eat, like, wake, tempt, smack, fold, farm, sip, lure, rip, rock, poke, warm, pull, grab, shove, pet, cut, get, bang, bust, bet, trick, lick, steal, boil, toast, dunk, gulp, meet, dig, form, roll, bathe, trap, treat, feed, hack, kick, heal, blast, lift, draw, cook, shake, bring, see, want, need, feel, love, hug, break, make, shock, paint, gain, kill, fund, hire, read, bake, own, rob, herd, rent, move, pay, jab, stop, start, turn, tear, fire, eye, scare, ask, win, make, ship, test, ride, clone, train, drive, know, buy, store, save, help, clean, spin, keep, thank, tell, call, leave, lead, spend, serve, send, sell, hit],
|
74
|
-
[consume, destroy, attack, nurture, explore, open, construct, befriend, explain, target, retain, prevent, protest, direct, procure, locate, staple, strangle, topple, avoid, reveal, survey, maintain, fasten, harden, straighten, offer, transform, tickle, question, deceive, mislead, support, become, revive, connect, iron, annoy, forget, handle, answer, inspect, behold, design, acquire, obtain, believe, dazzle, honor, master, gather, savor, adjust, expect, create, instruct, afford, succeed, battle, launder, include, exclude, follow, return, receive, cover, program, orbit],
|
75
|
-
[imagine, examine, interrupt, activate, agitate, animate, apprehend, calibrate, captivate, celebrate, complicate, decimate, decipher, dishonor, dominate, enliven, generate, jettison, isolate, medicate, nominate, orient, overwhelm, recycle, terminate, violate, discover, calculate, estimate, understand, remember, consider, develop, simulate]
|
58
|
+
[get, drain, pat, climb, bend, give, take, pour, yank, clip, spread, build, shape, hate, throw, find, hear, see, smell, taste, eat, like, wake, tempt, smack, fold, farm, sip, lure, rip, rock, poke, warm, pull, grab, shove, pet, cut, get, bang, bust, bet, trick, lick, steal, boil, toast, dunk, gulp, meet, dig, form, roll, bathe, trap, treat, feed, hack, kick, heal, blast, lift, draw, cook, shake, bring, see, want, need, feel, love, hug, break, make, shock, paint, gain, kill, fund, hire, read, bake, own, rob, herd, rent, move, pay, jab, stop, start, turn, tear, fire, eye, scare, ask, win, make, ship, test, ride, clone, train, drive, know, buy, store, save, help, clean, spin, keep, thank, tell, call, leave, lead, spend, serve, send, sell, hit, swirl, brew, joke],
|
59
|
+
[consume, destroy, attack, nurture, explore, open, construct, befriend, explain, target, retain, prevent, protest, direct, procure, locate, staple, strangle, topple, avoid, reveal, survey, maintain, fasten, harden, straighten, offer, transform, tickle, question, deceive, mislead, support, become, revive, connect, iron, annoy, forget, handle, answer, inspect, behold, design, acquire, obtain, believe, dazzle, honor, master, gather, savor, adjust, expect, create, instruct, afford, succeed, battle, launder, include, exclude, follow, return, receive, cover, program, orbit, describe, forgive, betray, correct, collect, excite],
|
60
|
+
[imagine, examine, interrupt, activate, agitate, animate, apprehend, calibrate, captivate, celebrate, complicate, decimate, decipher, dishonor, dominate, enliven, generate, jettison, isolate, medicate, nominate, orient, overwhelm, recycle, terminate, violate, discover, calculate, estimate, understand, remember, consider, develop, simulate, circumvent]
|
76
61
|
]
|
77
62
|
:verb_singular: [
|
78
63
|
[has, soothes],
|
79
64
|
[eases, nudges, uses, raises, slices, falls on, dreams of, jumps over, looks at, looks for, studies, tosses, touches, coaxes, pushes, reaches, punches, cares for, ties up, sticks to, goes to, swarms on, flails at, cooks for, kisses, smooches, speaks to, quests for, raves about, sits on, waves to, shines on, mixes, watches, copies, marries, senses, closes, sings to, smiles at, asks for, hopes for, toys with, plays with, floats on, lives on, lives with, steps on, jives with, hops on, washes, sounds like, catches, dwells on, puts on, changes, walks to, walks with, passes, carries, chooses, works on, works for],
|
80
|
-
[amazes, cares about, notifies, objects to, condenses, beautifies, glorifies, liquefies, nullifies, occupies, purifies, satisfies, stupefies, wishes for, thinks about, writes about, challenges, agrees with, produces, replaces]
|
65
|
+
[amazes, cares about, notifies, objects to, condenses, beautifies, glorifies, liquefies, nullifies, occupies, purifies, satisfies, stupefies, wishes for, thinks about, writes about, challenges, agrees with, produces, replaces, researches, figures out]
|
81
66
|
]
|
82
67
|
:verb_plural: [
|
83
68
|
[have, ease, nudge, use, raise, slice, study, toss, touch, coax, push, reach, punch, kiss, smooch, mix, watch, sense, soothe, close, wash, catch, change, pass, choose],
|
84
|
-
[copy, amaze, fall on, dream of, jump over, look at, look for, finish, care for, approach, tie up, stick to, go to, swarm on, flail at, cook for, dance with, dance for, speak to, quest for, rave about, sit on, wave to, shine on, condense, marry, advise, sing to, smile at, ask for, hope for, wish for, toy with, play with, think about, float on, live on, live with, step on, jive with, hop on, sound like, challenge, dwell on, put on, walk to, walk with, carry, produce, replace, work on, work for],
|
85
|
-
[care about, notify, object to, beautify, glorify, liquefy, nullify, occupy, purify, satisfy, stupefy, vandalize, vaporize, minimize, maximize, encourage, equalize, pulverize, write about, agree with]
|
69
|
+
[copy, amaze, fall on, dream of, jump over, look at, look for, finish, care for, approach, tie up, stick to, go to, swarm on, flail at, cook for, dance with, dance for, speak to, quest for, rave about, sit on, wave to, shine on, condense, marry, advise, sing to, smile at, ask for, hope for, wish for, toy with, play with, think about, float on, live on, live with, step on, jive with, hop on, sound like, challenge, dwell on, put on, walk to, walk with, carry, produce, replace, work on, work for, research],
|
70
|
+
[care about, notify, object to, beautify, glorify, liquefy, nullify, occupy, purify, satisfy, stupefy, vandalize, vaporize, minimize, maximize, encourage, equalize, pulverize, write about, agree with, figure out]
|
86
71
|
]
|
87
72
|
|
88
73
|
:verb_self_common: [
|
89
|
-
[wake, jump, speed, climb, live, hope, fail, float, fall, slow, creep, sleep, groan, moan, coast, suck, walk, run, wait, think, land, scream, crawl, play, smile, glow, wave, dream, yell, work, feel, nap, quake, whine, trek, learn, weep, sob, speak, hide, pose, laugh, bathe, burn, grow, shrink, feast, warn, stray, peek, creak, flow, come, feed, cope, heal, race, read, dig, dwell, move, pray, gawk, breed, sag, spit, stand, stop, swerve, eat, lust, shine, end, bleed, drop, open, shake, start, fart, tear, turn, sail, sing, ask, sin, point, ail, flail, fold, die, smell, groove, shout, lie, dine, win, write, train, drive, know, jive, hop, shop, paint, drink, bend, spread, sulk, wail, tire, clean, bloom, sweep, spin, trek, leave, hear, sit, leave, serve, stay, break, draw, zoom],
|
90
|
-
[survive, ponder, wonder, travel, transform, falter, wallow, improve, believe, boogie, crumble, giggle, complain, forget, persist, explore, exist, arrive, await, agree, connect, engage, haggle, return, rotate, resist, dabble, murmur, mature, protest, gossip, growl, begin, approve, clamber, attack, perform, abide, achieve, succeed, explode, constrict, topple, dazzle, question, struggle, evolve, happen, appear, decide, explain, program, orbit],
|
74
|
+
[wake, jump, speed, climb, live, hope, fail, float, fall, slow, creep, sleep, groan, moan, coast, suck, walk, run, wait, think, land, scream, crawl, play, smile, glow, wave, dream, yell, work, feel, nap, quake, whine, trek, learn, weep, sob, speak, hide, pose, laugh, bathe, burn, grow, shrink, feast, warn, stray, peek, creak, flow, come, feed, cope, heal, race, read, dig, dwell, move, pray, gawk, breed, sag, spit, stand, stop, swerve, eat, lust, shine, end, bleed, drop, open, shake, start, fart, tear, turn, sail, sing, ask, sin, point, ail, flail, fold, die, smell, groove, shout, lie, dine, win, write, train, drive, know, jive, hop, shop, paint, drink, bend, spread, sulk, wail, tire, clean, bloom, sweep, spin, trek, leave, hear, sit, leave, serve, stay, break, draw, zoom, swirl, brew, stew],
|
75
|
+
[survive, ponder, wonder, travel, transform, falter, wallow, improve, believe, boogie, crumble, giggle, complain, forget, persist, explore, exist, arrive, await, agree, connect, engage, haggle, return, rotate, resist, dabble, murmur, mature, protest, gossip, growl, begin, approve, clamber, attack, perform, abide, achieve, succeed, explode, constrict, topple, dazzle, question, struggle, evolve, happen, appear, decide, explain, program, orbit, thunder],
|
91
76
|
[concentrate, speculate, hesitate, meditate, calculate, celebrate, co-exist, consider, continue, deviate, disagree, disbelieve, disconnect, elevate, imagine, meander, navigate, overact, postulate, propagate, radiate, recover, replicate, duplicate, surrender, terminate, understand, undulate, hibernate, self-destruct, oscillate, remember, develop]
|
92
77
|
]
|
93
78
|
:verb_self_singular: [
|
94
79
|
[goes, flies, cries, tries],
|
95
|
-
[sits down, lies down, wakes up, freezes, bounces, replies, responds, gazes, loses, rises, rushes, marches, pauses, crashes, watches, dances, rages, rushes, breaks up, thrashes, changes, reaches, gets up,
|
96
|
-
[simplifies, testifies, relaxes, approaches, emerges, raises up]
|
80
|
+
[sits down, lies down, wakes up, freezes, bounces, replies, responds, gazes, loses, rises, rushes, marches, pauses, crashes, watches, dances, rages, rushes, breaks up, thrashes, changes, reaches, gets up, gets down, storms out],
|
81
|
+
[simplifies, testifies, relaxes, approaches, emerges, raises up, researches]
|
97
82
|
]
|
98
83
|
:verb_self_plural: [
|
99
84
|
[go, fly, cry, try, freeze, gaze, lose, rise, rush, march, pause, crash, watch, dance, rage, rush, thrash, change, reach],
|
100
|
-
[sit down, lie down, wake up, approach, reply, respond, relax, collapse, break up, emerge, raise up, get up, get down],
|
85
|
+
[sit down, lie down, wake up, approach, reply, respond, relax, collapse, break up, emerge, raise up, get up, get down, research, storm out],
|
101
86
|
[simplify, stabilize, testify]
|
102
87
|
]
|
103
88
|
|
104
|
-
|
105
|
-
|
106
|
-
[
|
107
|
-
[
|
89
|
+
# adverbs that work well *after* verbs
|
90
|
+
:verb_adverb: [
|
91
|
+
[so, well, good, bad, fast, slow, soon, now, left, right, wrong, some, near, far, hard, soft],
|
92
|
+
[always, badly, blindly, boldly, bravely, brightly, deftly, kindly, loosely, madly, never, oddly, often, only, poorly, sadly, promptly, quickly, rarely, rudely, safely, seldom, slowly, sometimes, warmly, yearly],
|
93
|
+
[angrily, anxiously, awkwardly, boastfully, cheerfully, crazily, doubtfully, eagerly, evenly, exactly, finally, foolishly, frantically, frequently, gleefully, gracefully, happily, hastily, honestly, hourly, hungrily, jealously, lazily, perfectly, politely, rapidly, tenderly, totally, weekly, weakly, wildly, royally, precisely]
|
94
|
+
]
|
95
|
+
|
96
|
+
:adjective_common: [
|
97
|
+
[red, fresh, weird, burnt, white, flat, round, weak, old, new, young, swell, sweet, dazed, vague, warmed, cool, strong, blue, clear, soft, hard, black, big, small, tight, loose, long, short, wry, young, green, bold, good, bad, kind, mean, wet, dry, free, light, dark, dim, wise, grim, huge, worn, numb, wild, tall, short, hot, cold, sad, gray, green, gold, raw, rich, poor, bored, dull, calm, smart, dumb, grand, keen, bright, bent, foul, close, chrome, low, last, first, next, fun, high, late, quaint, top, lost, cute, real, strict, fast, slow, rough, damp, smooth, clean, great, quick, swift, slick, nice, fat, punk, right, wrong, curved, doomed, frayed, crazed, closed, stiff, boiled, ill, sick, [north, west, south, east]],
|
98
|
+
[orange, mental, tired, gloomy, murky, salty, balanced, frosted, confused, opened, tasty, frozen, boiling, slimy, failed, oblong, broken, silver, faulty, limestone, opaque, silly, spinning, busted, lazy, flying, awesome, folded, rhythmic, floating, smoking, twisted, wispy, uncooked, complex, bubbly, bankrupt, moving, crispy, laundered, rounded, ample, dirty, catered, constrained, cosmic, choking, bizarre, sanded, roasted, spastic, dapper, swanky, able, fabled, stable, leaning, correct, staggered, open, evil, edgy, pricey, costly, fancy, stranded, meager, modest, humble, slimy, simple, unkind, unwound, teenage, heavy, standard, hollow, eager, rotten, unwise, grounded, boring, crazy, major, minor, naive, valid, random, happy, endless, human, splendid, certain, somber, livid, lonely, jealous, dreary, lovely, cheerful, secure, renowned, spicy, drunken, bulky, breaded, better, shorter, smaller, larger, smarter, faster, longer, distant, wealthy, dismayed, vital, colored, abstract, vivid, ancient, bitter, sour, airy, timely, sunny, current, funky, skinny, bloody, girly, boyish, roomy, royal, marine, varied, fuzzy, helpful, crafty, silky, plastic, laser, upper, lower, cloudy, stronger, weaker, bigger, taller, greater, guilty, finished, stormy, stupid, moody, unclear, bumpy, [northern, western, southern, eastern]],
|
99
|
+
[redundant, ecstatic, respected, uncovered, populous, required, unstable, communist, communal, religious, circular, feminine, masculine, incorrect, embarrassed, misshapen, glorious, hovering, uncaring, expanded, insulted, discovered, commissioned, considered, opulent, casual, ultimate, imminent, exacting, creative, furious, destructive, digital, analog, essential, albino, nuclear, atomic, chocolate, overweight, invalid, possible, advertised, natural, terrific, amazing, confident, exacting, primary, lunatic, satisfied, impressive, noteworthy, suitable, musical, eternal, skydiving, expected, parallel, factual, immobile, ballistic, innocent, inverted, beautiful, difficult, kinetic, exciting],
|
100
|
+
[undulating, incredible, unforgiving, acceptable, elaborate, necessary, stimulated, simulated, measurable, recommended, mandatory, honorable, identical, overstated, altruistic, generated, extraneous, aluminum, obfuscated, appropriate, symbiotic, calculated, mysterious, unknowable, contemplative, incapable, overbearing, high quality, low quality, microbial, questionable, knowledgeable, elemental, hilarious, inferior, meticulous, underwater, modulated]
|
101
|
+
]
|
102
|
+
:adjective_singular: [
|
103
|
+
[one]
|
104
|
+
]
|
105
|
+
:adjective_plural: [
|
106
|
+
[two, three, four, [five, six, eight, nine, ten, twelve]],
|
107
|
+
[zero, many, seven, twenty, thirty, [thirteen, fourteen, fifteen, sixteen, eighteen, nineteen, forty, fifty]],
|
108
|
+
[one hundred, several, numerous]
|
109
|
+
]
|
110
|
+
# adverbs that work well *before* adjectives
|
111
|
+
:adjective_adverb: [
|
112
|
+
[so, now, way, not, well, too],
|
113
|
+
[always, badly, boldly, bravely, brightly, clearly, never, oddly, often, only, sadly, rarely, really, rudely, seldom, sometimes, warmly, also, very],
|
114
|
+
[angrily, anxiously, awkwardly, boastfully, cheerfully, crazily, evenly, exactly, finally, frequently, gleefully, gracefully, happily, honestly, perfectly, totally, wildly, royally, precisely]
|
108
115
|
]
|
@@ -67,6 +67,19 @@ module HaikuGadget
|
|
67
67
|
|
68
68
|
end
|
69
69
|
|
70
|
+
it 'should return word(s) specifically from the common set' do
|
71
|
+
|
72
|
+
line_template = LineTemplate.new(
|
73
|
+
WordTemplate.new(:adjective, 1, :common),
|
74
|
+
WordTemplate.new(:adjective, 1, :common),
|
75
|
+
WordTemplate.new(:adjective, 1, :common)
|
76
|
+
)
|
77
|
+
words = line_template.real_words
|
78
|
+
|
79
|
+
expect(words.compact.length).to eq 3
|
80
|
+
|
81
|
+
end
|
82
|
+
|
70
83
|
end
|
71
84
|
|
72
85
|
describe 'with basic line template' do
|
data/test_haiku.rb
CHANGED
@@ -2,12 +2,17 @@
|
|
2
2
|
|
3
3
|
require File.expand_path('lib/haiku_gadget.rb', File.dirname(__FILE__))
|
4
4
|
|
5
|
-
|
5
|
+
100.times do
|
6
6
|
|
7
|
-
|
7
|
+
puts HaikuGadget.haiku "\n"
|
8
|
+
puts "\n"
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
puts
|
10
|
+
end
|
11
|
+
|
12
|
+
# puts "\n"
|
13
|
+
|
14
|
+
# puts HaikuGadget.top_line
|
15
|
+
# puts HaikuGadget.middle_line
|
16
|
+
# puts HaikuGadget.bottom_line
|
12
17
|
|
13
18
|
|