Lingua::Phonology::Features 0.32 review
DownloadLingua::Phonology::Features is a module to handle a set of hierarchical features. SYNOPSIS use Lingua::Phonology;
|
|
Lingua::Phonology::Features is a module to handle a set of hierarchical features.
SYNOPSIS
use Lingua::Phonology;
my $phono = new Lingua::Phonology;
my $features = $phono->features;
# Add features programmatically
$features->add_feature(
Node => { type => 'privative', children => ['Scalar', 'Binary', 'Privative'] },
Scalar => { type => 'scalar' },
Binary => { type => 'binary' },
Privative => { type => 'privative' }
);
# Drop features
$features->drop_feature('Privative');
# Load feature definitions from a file
$features->loadfile('phono.xml');
# Load default features
$features->loadfile;
Lingua::Phonology::Features allows you to create a hierarchy of features of various types, and includes methods for adding and deleting features and changing the relationships between them.
By "heirarchical features" we mean that some features dominate some other features, as in a tree. By having heirarchical features, it becomes possible to set multiple features at once by assigning to a node, and to indicate conceptually related features that are combined under the same node. This module, however, does not instantiate values of features, but only establishes the relationships between features.
Lingua::Phonology::Features recognizes multiple types of features. Features may be privative (which means that their legal values are either true or undef), binary (which means they may be true, false, or undef), or scalar (which means that their legal value may be anything). You can freely mix different kinds of features into the same set of features.
Finally, while this module provides a full set of methods to add and delete features programmatically, it also provides the option of reading feature definitions from a file. This is usually faster and more convenient. The method to do this is "loadfile". Lingua::Phonology::Features also comes with an extensive default feature set.
Requirements:
Perl
Lingua::Phonology::Features 0.32 search tags