Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

house: Inconsistent expected output with other recitation-related exercises #1200

Closed
mrcfps opened this issue Feb 27, 2018 · 2 comments
Closed

Comments

@mrcfps
Copy link
Contributor

mrcfps commented Feb 27, 2018

Currently there are four exercises related with reciting verses: beer-song, food-chain, house, and twelve-days.

Testing a single verse

In beer-song:

"expected": [
  "99 bottles of beer on the wall, 99 bottles of beer.",
  "Take one down and pass it around, 98 bottles of beer on the wall."
]

In food-chain:

"expected": [
  "I know an old lady who swallowed a spider.",
  "It wriggled and jiggled and tickled inside her.",
  "She swallowed the spider to catch the fly.",
  "I don't know why she swallowed the fly. Perhaps she'll die."
]

In twelve-days:

"expected": [
  "On the first day of Christmas my true love gave to me, a Partridge in a Pear Tree."
]

But in house, a single sentence is separated into multiple strings:

"expected": [
  "This is the dog",
  "that worried the cat",
  "that killed the rat",
  "that ate the malt",
  "that lay in the house that Jack built."
]

Testing multiple verses

In beer-song, verses are separated by an empty string:

"expected": [
  "2 bottles of beer on the wall, 2 bottles of beer.",
  "Take one down and pass it around, 1 bottle of beer on the wall.",
  "",
  "1 bottle of beer on the wall, 1 bottle of beer.",
  "Take it down and pass it around, no more bottles of beer on the wall.",
  "",
  "No more bottles of beer on the wall, no more bottles of beer.",
  "Go to the store and buy some more, 99 bottles of beer on the wall."
]

And it's the same case in food-chain:

"expected": [
  "I know an old lady who swallowed a fly.",
  "I don't know why she swallowed the fly. Perhaps she'll die.",
  "",
  "I know an old lady who swallowed a spider.",
  "It wriggled and jiggled and tickled inside her.",
  "She swallowed the spider to catch the fly.",
  "I don't know why she swallowed the fly. Perhaps she'll die.",
  "",
  "I know an old lady who swallowed a bird.",
  "How absurd to swallow a bird!",
  "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.",
  "She swallowed the spider to catch the fly.",
  "I don't know why she swallowed the fly. Perhaps she'll die."
]

So is house:

"expected": [
  "This is the cat",
  "that killed the rat",
  "that ate the malt",
  "that lay in the house that Jack built.",
  "",
  "This is the dog",
  "that worried the cat",
  "that killed the rat",
  "that ate the malt",
  "that lay in the house that Jack built.",
  "",
  "This is the cow with the crumpled horn",
  "that tossed the dog",
  "that worried the cat",
  "that killed the rat",
  "that ate the malt",
  "that lay in the house that Jack built."
]

But in twelve-days, there are no separating empty strings:

"expected": [
  "On the fourth day of Christmas my true love gave to me, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
  "On the fifth day of Christmas my true love gave to me, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree.",
  "On the sixth day of Christmas my true love gave to me, six Geese-a-Laying, five Gold Rings, four Calling Birds, three French Hens, two Turtle Doves, and a Partridge in a Pear Tree."
]

My suggestion

Since each verse in both house and twelve-days is a single long sentence (contrarily beer-song and food-chain have multiple sentences in their verses), I would suggest transforming house's output to the same format as twelve-day's, because IMO separating a single sentence into multiple pieces is not a natural choice.

@mrcfps mrcfps changed the title Inconsistent expected output of recitation-related exercises house: Inconsistent expected output with other recitation-related exercises Feb 27, 2018
@yawpitch
Copy link
Contributor

yawpitch commented Jul 9, 2018

This should really be re-opened; while I understand the opinion expressed by @mrcfps, the "natural choice" with poetry in English is to respect the stanza structure, which does not necessarily reflect the sentence structure. The original version of House is a nursery rhyme, not a song, and this has broken the relevance of its intended structure.

Consequently, in the Python version at least, it has also removed consequential spacing from the output of tests ... "This is the catthat killed the ratthat ate the maltthat lay in the house that Jack built" isn't just a run-on sentence, it's gibberish.

@rpottsoh
Copy link
Member

@yawpitch, please see #1201.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants