Lingua::XFST::Privates - Direct access to XFST interface from Perl
This document describes Lingua::XFST version 0.1
use Lingua::XFST::Privates; my $context Lingua::XFST::Privates::initialize_cfsm(); Lingua::XFST::Privates::reclaim_cfsm($context);
Here be dragons! The following assumes familiarity with the low-level interfaces generated by SWIG. See the SWIG documentation for details, chapter 30 in general and sections 30.4 and 30.9 in particular.
These bindings are generated with SWIG, using the following command line: swig -perl5 -const xfsm.i. This means that SWIG generates proxy classes and struture members are available as hash entries. Constants are wrapped with constant subs, so that the UPPER #define is available as Lingua::XFST::Privates::UPPER (not $Lingua::XFST::Privates::UPPER). All the functions of the C interface are available as subs with the same name in the Lingua::XFST::Privates namespace.
swig -perl5 -const xfsm.i
#define
Lingua::XFST::Privates::UPPER
$Lingua::XFST::Privates::UPPER
Lingua::XFST::Privates
If the wrapper is loaded with use Lingua::XFST::Privates no initialisation or destruction is performed. If use Lingua::XFST is used Lingua::XFST::Privates::initialize_cfsm() is called at BEGIN time and the returned context is stored in $Lingua::XFST::context, and at END time it will be destroyed with Lingua::XFST::reclaim_cfsm().
use Lingua::XFST::Privates
use Lingua::XFST
Lingua::XFST::Privates::initialize_cfsm()
BEGIN
$Lingua::XFST::context
END
Lingua::XFST::reclaim_cfsm()
No known bugs yet.
Lingua::XFST, the SWIG documentation, the XFST documentation.
Arne Skjærholt <arnsholt@gmail.com>
<arnsholt@gmail.com>
Copyright (c) 2011, Arne Skjærholt <arnsholt@gmail.com>. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
To install Lingua::XFST, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Lingua::XFST
CPAN shell
perl -MCPAN -e shell install Lingua::XFST
For more information on module installation, please visit the detailed CPAN module installation guide.