| Lingua-FeatureMatrix documentation | Contained in the Lingua-FeatureMatrix distribution. |
Phone -- an example 'Eme' class. See Lingua::FeatureMatrix.
Distributed with Lingua::FeatureMatrix as a sample class derived
from Lingua::FeatureMatrix::Eme.
(It's a Phone Eme, get it?)
The most likely change you will probably want to make is to alter the
featureset supported by this file. To do so at minimal edit distance,
change the file-scoped array @featureList. Make sure it is still
inside the BEGIN block so that the Class::MethodMaker calls will
still pick up the right values.
Lingua::FeatureMatrix, which can be used to create tables of feature behavior.
Lingua::FeatureMatrix::Eme, of which this is a subclass.
Graph. (a different Lingua::FeatureMatrix::Eme subclass).
This file began life as an example file by Jeremy Kahn kahn@cpan.org.
This began life as a sample class distributed with
Lingua::FeatureMatrix, distributed under the same terms as Perl
itself.
You are free to copy this class and do absolutely anything with it. It would be nice if you credited the original author, but it's not required.
What you have made of it since then is not the responsibility of the Management.
Note that its parent class (Lingua::FeatureMatrix::Eme) is licensed
under the same terms as Perl itself.
| Lingua-FeatureMatrix documentation | Contained in the Lingua-FeatureMatrix distribution. |
################################################################## # example subclass of Lingua::FeatureMatrix::Eme package Phone; use strict; use warnings; my (@featureList); use base 'Lingua::FeatureMatrix::Eme'; BEGIN { # this is in a BEGIN block so that the use Class::MethodMaker in # Phone can install booleans appropriately. @featureList = ( qw( vow cons voice son ), # general qw( fric stop liq nas ), # cons features, usually qw( lab dent vel alv pal ), # position qw( high low front back tense ), # vow features, usually ); } ################################################################## use Class::MethodMaker get_set => [ @featureList ]; ################################################################## sub getFeatureNames { return @featureList; } ################################################################## 1;