| Lingua-MAF documentation | view source | Contained in the Lingua-MAF distribution. |
Lingua::MAF - Multi-Annotation Framework format writer
Version 0.1
This module allows to easily produces MAF-format documents. MAF (Morpho-Syntactic Annotation Framework) is a standard proposal developed by ISO TC37SC4 commitee, see http://www.tc37sc4.org for further details.
use Lingua::MAF;
my $maf = Lingua::MAF->new(
author => 'me',
language => 'english',
format => {
reduced => 1,
compact => 1,
}
);
$maf->add_token(
id => 't1',
content => 'content1',
pleft => 0,
pright => 6
);
$maf->add_word_form(
source => 0,
target => 1,
tokens => [ 't1' ]
form => 'form1',
entry => 'entry1',
tag => 'tag1'
);
$maf->add_word_form(
source => 1,
target => 2,
tokens => [ 't1' ]
form => 'form2',
entry => 'entry2',
tag => 'tag2'
);
$maf->flush();
Creates and returns a new Lingua::MAF object.
%options is an hash with the following keys:
The author of the document
The language of the document
The format of this document, as an hashref with the following keys:
add the full tagset at the beginning of the document
use reduced fsm format
use compact tag format
use standoff format
use embedded token format
Adds a token to the document. %token is a hash with the following keys:
Adds a word form to the document. %word_form is a hash with the following keys:
Directly paste an fsm twig extracted from another MAF document.
Merge current word forms and related tokens into a finite state automata, flushed to STDOUT.
Flush current document to STDOUT.
Copyright (C) 2005, INRIA.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Guillaume Rousse <grousse@cpan.org>
Eric de la Clergerie, <Eric.De_La_Clergerie@inria.fr>
| Lingua-MAF documentation | view source | Contained in the Lingua-MAF distribution. |