From: Paul Smith on
On Sun, Nov 15, 2009 at 7:43 PM, wkm <wiktor(a)zanoccio.com> wrote:
> My solution is enclosed.
>
> It uses the Lingua::EN package from http://www.pressure.to/ruby/ to count syllables. According to it there are 4729 Senryu's in the US Constitution (with amendments). :)
>
> As an aside, do people actually do these quizzes any more? There seems to have been no discussion about this one at all....

I would have loved to have done this quiz but:

1) I had no idea where to start with a 'syllable-counting' algorithm
2) I had so much to do that when I thought about looking for some,
you'd already posted a solution.

>
>>---- Original Message ----
>>From: Daniel Moore <yahivin(a)gmail.com>
>>To: ruby-talk(a)ruby-lang.org (ruby-talk ML)
>>Sent: Fri, Nov 13, 2009, 13:16 PM
>>Subject: [QUIZ] Found Senryu (#224)
>>
>>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>
>>The three rules of Ruby Quiz:
>>
>>1.  Please do not post any solutions or spoiler discussion for this
>>quiz until 48 hours have elapsed from the time this message was
>>sent.
>>
>>2.  Support Ruby Quiz by submitting ideas and responses
>>as often as you can.
>>
>>3.  Enjoy!
>>
>>Suggestion:  A [QUIZ] in the subject of emails about the problem
>>helps everyone on Ruby Talk follow the discussion.  Please reply to
>>the original quiz message, if you can.
>>
>>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>>
>>RSS Feed: http://rubyquiz.strd6.com/quizzes.rss
>>
>>Suggestions?: http://rubyquiz.strd6.com/suggestions
>>
>>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>>
>>## Found Senryu (#224)
>>
>>Ya'atay Rubyists,
>>
>>This week's quiz comes from Martin DeMello:
>>
>>Scan a text for runs
>>of seventeen syllables
>>formed from complete words
>>
>>Have Fun!
>>
>>--
>>-Daniel
>>http://rubyquiz.strd6.com
>



--
Paul Smith
http://www.nomadicfun.co.uk

paul(a)pollyandpaul.co.uk

From: wkm on
>I would have loved to have done this quiz but:
>
>1) I had no idea where to start with a 'syllable-counting' algorithm

Yeah, that stumped me too. I felt like it was cheating a bit to use the Lingua::EN package. But interestingly, they use a pronunciation dictionary from CMU to do the counting, so we could just skip the Lingua step and implement it directly.

>2) I had so much to do that when I thought about looking for some,
>you'd already posted a solution.

:)


From: Martin DeMello on
On Sat, Nov 14, 2009 at 12:45 AM, Daniel Moore <yahivin(a)gmail.com> wrote:
>
> Scan a text for runs
> of seventeen syllables
> formed from complete words

Sorry, this was underspecified (I was hoping that the example would
suffice, and I needn't break the purity of the quiz post :)). The
seventeen syllables should, for full correctness, also be able to be
broken into 5/7/5 in traditional "internet haiku" fashion.

martin