You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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.
The text was updated successfully, but these errors were encountered:
mrcfps
changed the title
Inconsistent expected output of recitation-related exercises
house: Inconsistent expected output with other recitation-related exercises
Feb 27, 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.
Currently there are four exercises related with reciting verses: beer-song, food-chain, house, and twelve-days.
Testing a single verse
In beer-song:
In food-chain:
In twelve-days:
But in house, a single sentence is separated into multiple strings:
Testing multiple verses
In beer-song, verses are separated by an empty string:
And it's the same case in food-chain:
So is house:
But in twelve-days, there are no separating empty strings:
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.
The text was updated successfully, but these errors were encountered: