On Apr 10, 2006, at 7:08 AM, Tom Rauchenwald wrote:

> If I did something completely stupid it would be nice if someone  
> tells me :-)

Nothing stupid no.  Here are a few extremely minor suggestions.

         File.open(filename) do |io|
             io.each do |line|
		...
             end
         end

That pattern can be simplified to:

   File.foreach(filename) do |line| ... end

And...

             if @frequencies[tupel].include?(word)
                 @frequencies[tupel][word]+=1
             else
                 @frequencies[tupel][word]=1
             end

If you set the Hash to default to a value of 0, you could simplify  
the above to just:

   @frequencies[tupel][word]+=1

All in all, you're code is quite nice.

Thanks for the submission.

James Edward Gray II