NAME

FL3 - A shortcut module for Lingua::FreeLing3.

SYNOPSIS

use FL3 'en';

$tokens = tokenizer->tokenize($text);
$atomos = tokenizer('pt')->tokenize($texto);

$sentences = splitter->split($tokens);
$frases = splitter('pt')->split($atomos);

$sentences = morph->analyze($sentences);
$frases = morph('pt')->analyze($frases);

$sentences = hmm->analyze($sentences);
$frases = relax('pt')->tag($sentences);

$sentences = chart->parse($sentences);
$ptree = $sentences->[0]->parse_tree;)

DESCRIPTION

Implements a set of utility functions to access Lingua::FreeLing3 objects.

Everytime one of the accessors is used just with the language code/language data file (or using the default language), the cached processor is returned if it exists. If any other arguments are used, a new processor is created. This means that if you want to use the morphological analyzer more than once, with different arguments, you should first initialize it, using:

morph( en => (AffixFile => 'myAfixes.dat',
              DictionaryFile => 'myFile.src'));

And then, when analyzing sentences, use:

morph('en')->analyze($sentences);

This way, the processor initialized before will be used without reinitialziation.

set_language

Sets the current language for subsequent methods calls. Returns the old set language, if any.

release_language

Some resources take too much space on memory. Use this method to release the resources for a specific language. If you need them again, they will be recreated.

Only one argument is mandatory: the name of the language. Unlike the other method, this method requires that you supply the language name. It does not use the default language.

Extra arguments are the name of the modules to be released (same names as their accessor methods).

tokenizer

Accesses a tokenizer (Lingua::FreeLing3::Tokenizer).

splitter

Accesses a splitter (Lingua::FreeLing3::Splitter).

morph

Accesses a morphological analyzer (Lingua::FreeLing3::MorphAnalyzer)..

hmm

Accesses a HMM-based tagger (Lingua::FreeLing3::HMMTagger).

relax

Accesses a Relax-based tagger (Lingua::FreeLing3::RelaxTagger).

chart

Accesses a Chart-based parser (Lingua::FreeLing3::ChartParser).

txala

Accesses a Txala-based dependency parser (Lingua::FreeLing3::DepTxala).

nec

Accesses a Name Entity parser (Lingua::FreeLing3::NEC).

SEE ALSO

Lingua::FreeLing3(3)

AUTHOR

Alberto Simões, <ambs@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2012 by Alberto Simões

1 POD Error

The following errors were encountered while parsing the POD:

Around line 214:

Non-ASCII character seen before =encoding in 'Simões,'. Assuming UTF-8