The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Lingua::Features::Structure - Structure object for Lingua::Features

Constructor

new(%features)

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

from_string($string)

Creates and returns a new Lingua::Features::Structure object from a string representation.

Accessors

$structure->get_type()

Returns the type of this feature as a hash of types indexed by id.

$structure->get_features()

Returns the features composing the structure.

$structure->set_features(%features)

Sets the features composing the structure.

$structure->get_feature($id)

Returns one of the features composing the structure.

$structure->set_feature($id, $value)

Sets one of the features composing the structure.

Other methods

$structure->to_string()

Dumps the structure in string format.

$structure->to_xml()

Dumps the structure in XML format.

$structure->is_subset($other_structure)

Return true if current structure is a subset of $other_structure.

$structure->is_compatible($other_structure)

Return true if either of current structure and $other_structure is a subset of the other.

$structure->has_same_type($other_structure)

Return true if current structure and $other_structure share the same type, based on cat and type features.

union($structure1, $structure2)

Return a new structure resulting of the union of $structure1 and $structure2.

intersection($structure1, $structure2)

Return a new structure resulting of the intersection of $structure1 and $structure2.

COPYRIGHT AND LICENSE

Copyright (C) 2004-2006, 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>