The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Lingua::Features::Library - Features library object for Lingua::Features

Constructor

new($types, $features)

Creates and returns a new Lingua::Features::Library object.

$types is an hash reference corresponding to the types of this library. Each type is given as a set of pairs of strings corresponding to the id and name of each values in its range, indexed by type name:

foo => { id1 => 'name1', id2 => 'name2' }

This structure will get instanciated as a Lingua::Features::Type object.

$features is an hash reference corresponding to the features this library. Each feature is given as a pair of strings corresponding to the name of the feature and its type:

foo => 'foo_type',

This structure will get instanciated as a Lingua::Features::Feature object.

Accessors

$library->feature($id)

Returns the feature with id $id.

$library->features()

Returns all the features.

$library->type($id)

Returns the type with id $id.

$library->types()

Returns all the types.

Other methods

$library->to_xml()

Dumps the library in XML format.

COPYRIGHT AND LICENSE

Copyright (C) 2004, INRIA.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Guillaume Rousse <grousse@cpan.org>