-
-
04 Mar 2018 23:07:45 UTC
- Distribution: Treex-PML
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (2180 / 2 / 0)
- Kwalitee
Bus factor: 2- 45.42% Coverage
- License: unknown
- Activity
24 month- Tools
- Download (259.74KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- File::ShareDir
- File::Which
- IO::Zlib
- LWP::UserAgent
- Test::More
- UNIVERSAL::DOES
- URI
- XML::CompactTree
- XML::LibXML
- XML::SAX
- XML::Writer
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Treex::PML::Backend::FS - IO backend for reading/writing FS files.
SYNOPSIS
use Treex::PML; Treex::PML::AddBackends(qw(FS))
my $document = Treex::PML::Factory->createDocumentFromFile('input.fs'); ... $document->save();
DESCRIPTION
This module implements a Treex::PML input/output backend which accepts reads/writes documents in the FS format.
REFERENCE
- Treex::PML::Backend::FS::$emulatePML
-
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
andb/v/y
result in the following structure:{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 } } }>In the PML schema emulation mode, it is forbidden to have both
a
anda/b
attributes. In such a case the parser reverts to non-emulation mode. - Treex::PML::Backend::FS::ParseFSTree ($fsformat,$line,$ordhash)
-
Parse a given string (line) in FS format and return the root of the resulting FS tree as a node object.
SEE ALSO
Description of FS format: http://ufal.mff.cuni.cz/pdt/Corpora/PDT_1.0/Doc/fs.html
COPYRIGHT AND LICENSE
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.
Module Install Instructions
To install Treex::PML, copy and paste the appropriate command in to your terminal.
cpanm Treex::PML
perl -MCPAN -e shell install Treex::PML
For more information on module installation, please visit the detailed CPAN module installation guide.