Lingua::Rhyme::FindScheme - find rhyme schemes in text.


Lingua-Rhyme-FindScheme documentation  | view source Contained in the Lingua-Rhyme-FindScheme distribution.

Index


NAME

Top

Lingua::Rhyme::FindScheme - find rhyme schemes in text.

SYNOPSIS

Top

	use Lingua::Rhyme::FindScheme;

	my @shakespeare_sonnet_ii =  (
		"When forty winters shall beseige thy brow,",
		"And dig deep trenches in thy beauty's field,",
		"Thy youth's proud livery, so gazed on now,",
		"Will be a tatter'd weed, of small worth held:",
		"Then being ask'd where all thy beauty lies,",
		"Where all the treasure of thy lusty days,",
		"To say, within thine own deep-sunken eyes,",
		"Were an all-eating shame and thriftless praise.",
		"How much more praise deserved thy beauty's use,",
		"If thou couldst answer 'This fair child of mine",
		"Shall sum my count and make my old excuse,'",
		"Proving his beauty by succession thine!",
		"  This were to be new made when thou art old,",
		"  And see thy blood warm when thou feel'st it cold."
	);

	my %scheme = %{Lingua::Rhyme::FindScheme::list_couplets (@shakespeare_sonnet_ii)};
	foreach (sort {$a <=> $b} keys %scheme){
		warn "Scheme $_ = $scheme{$_}\n";
	}

	my $i=0;
	foreach my $scheme ( Lingua::Rhyme::FindScheme::endings(@shakespeare_sonnet_ii) ){
		warn "Line ",$i+1," ... $scheme ... $shakespeare_sonnet_ii[$i]\n";
		++$i;
	}

	__END__




PREREQUISITES

Top

	Lingua::Rhyme




DESCRIPTION

Top

This is the first version of a module which will grow with my needs.

All requests/suggestions much appreciated.

FUNCTIONS

Top

&list_couplets

Accepts an array of text, and returns a reference to a hash where keys and values are numbers of couplets. NB: the line number index begins at zero.

&endings (@text)

Top

Accepts an array of text, and scans it for a scheme of rhymes at line ends, returning an array of the scheme.

SEE ALSO

Top

Lingua::Rhyme; perl(1).

AUTHOR

Top

Lee Goddard <lgoddard@cpan.org>

COPYRIGHT

Top


Lingua-Rhyme-FindScheme documentation  | view source Contained in the Lingua-Rhyme-FindScheme distribution.