Lingua::FeatureMatrix

Lingua::FeatureMatrix is a Perl extension for configuring groups of (e.g.) phonemes into feature groups.
Download

Lingua::FeatureMatrix Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jeremy Kahn
  • Publisher web site:
  • http://search.cpan.org/~kahn/Speech-Recognizer-ScLite-0.01/ScLite.pm

Lingua::FeatureMatrix Tags


Lingua::FeatureMatrix Description

Lingua::FeatureMatrix is a Perl extension for configuring groups of (e.g.) phonemes into feature groups. Lingua::FeatureMatrix is a Perl extension for configuring groups of (e.g.) phonemes into feature groups.SYNOPSIS use Lingua::FeatureMatrix; # this example uses the module provided in the examples directory of # the distro; you'll want to create your own 'Eme' subclass or # modify 'Phone.pm' for yourself: use lib 'examples'; use Phone; # construct a new feature-matrix from a dat file (here using dat # file same as example below) my $matrix = Lingua::FeatureMatrix->new(eme => Phone, file => 'examples/phonematrix.dat'); if ($matrix->matchesFeatureClass('EE', 'VOW')) { # EE is a "vow", bless this properly push @Pope::ISA, 'Catholic'; } if (not $matrix->matchesFeatureClass('AA', 'AFF')) { # will be executed $deadman->walking(); } if ($matrix->matchesFeatureClass('S', 'VOW')) { # won't happen map { $_->fly() } @pigs; } # silliness aside, you can also dump a filled-out matrix, with all # the implications spelled out, after loading it: print $matrix->dumpToText(), "n"; # you can also ask for a list of the emes that match a given object: print "the vowels are:n", join ' ', $matrix->listFeatureClassMembers('VOW'); print "the affricates are:n", join ' ', $matrix->listFeatureClassMembers('AFF');Lingua::FeatureMatrix is a class for managing user-defined feature-sets. It provides an implementation of datafile parsing that is generic and useful for anyone defining feature sets of symbols.If you haven't read the "Motivation" you might want to skip down to it.Featuresets are a common way of describing phonetics problems, e.g. sound change behaviors, but may be useful to people solving other problems as well. (The included Letter class may, for example, be useful in writing ligature rules -- if you find this useful for some other application, please contact the author.)Users must indicate what type of Eme they are working with. In fact, users will probably want to define their own. To do this, define a subclass of Lingua::FeatureMatrix::Eme and indicate that one as the eme parameter to the new() method call.Requirements:· Perl


Lingua::FeatureMatrix Related Software