#!/usr/bin/perl

@words = qw(a a a a a a absentmindedly actually and and and and as
asked aware away away back back became because been been before below
bent bet bike blue books bought cheap cold cold comfort
considerable could crying damp died door down earth easily
everyone familiar fear fear fell felt field fitted folded forward
frame game gathered  going grim had had had half half hastily
haunt he he he he he he he he hedge hedge he'd've he's him him him
him him him his his his horribly hurry I ice if in in increases
inside into into into into it it its itself jade-green jumbled just
keep lady landed laughing lemon like lilac locker man me midnight
moving much name nervously now of of of of of of off on on on
one only other out outside over pale picked pines pitched point
pop pulled  robes robes room running scarlet sea  she
slid slide smiling something speed staring staring stone 
swept tapped ter that the the the the the the the the the the the
the the them then then then they they thing three times to to
too  umbrella untidily until until up up van very wall
wanted was was was was watch wave waved way were what what
with with young);

for $w (@words){
	$seeking{$w} = 1;
}

while(<>){
	@w = split;
	$lscore = 0;
	$words = 0;
	for $w (@w){
		$w =~ s/\.//;
		$w = lc($w);
		$uw = uc($w);
		if($seeking{$w}){
			$lscore++;
			s/$w/$uw/;
		}
		$words++;
        }
	next if $words <= 1;
	$frac = $lscore/($words-1);
	print "$frac $lscore  $_";
}
