Treex::PML::Backend::FS - IO backend for reading/writing FS files.
use Treex::PML; Treex::PML::AddBackends(qw(FS))
my $document = Treex::PML::Factory->createDocumentFromFile('input.fs'); ... $document->save();
This module implements a Treex::PML input/output backend which accepts reads/writes documents in the FS format.
This variable controls whether a simple PML schema should be created for FS files (default is 1 - yes). Attribute whose name contains one or more slashes is represented as a (possibly nested) structure where each slash represents one level of nesting. Attributes sharing a common name-part followed by a slash are represented as members of the same structure. For example, attributes a, b/u/x, b/v/x and b/v/y result in the following structure:
a
b/u/x
b/v/x
b/v/y
{a = value_of_a, b => { u => { x => value_of_a/u/x }, v => { x => value_of_a/v/x, y => value_of_a/v/y } } }>
{a =
In the PML schema emulation mode, it is forbidden to have both a and a/b attributes. In such a case the parser reverts to non-emulation mode.
a/b
Parse a given string (line) in FS format and return the root of the resulting FS tree as a node object.
Description of FS format: http://ufal.mff.cuni.cz/pdt/Corpora/PDT_1.0/Doc/fs.html
Copyright (C) 2006-2010 by Petr Pajas
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.
To install Treex::PML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Treex::PML
CPAN shell
perl -MCPAN -e shell install Treex::PML
For more information on module installation, please visit the detailed CPAN module installation guide.