The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

OpenFST -- Perl bindings for the OpenFST library.

SYNOPSIS

This module provides a Perl interface to the OpenFST finite state transducer library. If you don't know what it is, you probably don't need it.

DESCRIPTION

The interface is very incomplete, since I have only implemented the parts I need right now. At the lowest level, the function and method names are the same as the C++ interface, except that some destructive methods have a leading underscore.

Algorithm::OpenFST provides a convenient higher-level interface to OpenFST's basic operations. Methods in this interface have lower_case names, while those in the raw library interface use StudlyCaps.

$fsa = acceptor $file, %opts

Create a finite-state acceptor from file $file with options %opts.

$fst = transducer $file, %opts

Create a finite-state transducer from file $file with options %opts.

$fst = from_list $init, $final, @edges

Create a transducer with initial state $init, final state $final, and edges @edges, where each edge is of the form [FROM, TO, IN, OUT, WEIGHT].

$fst = compose @fsts

Compose transducers @fsts into a single transducer $fst.

$fst = concat @fsts

Concatenate transducers @fsts into a single transducer $fst.

$fst = union @fsts

Union transducers @fsts into a single transducer $fst.

$fst->in

$fst->out

$fst->ensure_state($n)

Ensure that states up to $n exist in $fst.

$fst->add_state($n)

Add state $n (and previous states, if necessary).

$fst->add_arc($from, $to [, $in [, $out [, $wt]]])

Add an arc from $from to $to with input and output $in and $out, with weight $wt.

$ofst = $fst-best_paths($n [, $unique])>

Compute the best $n paths through $fst. Compute unique paths if $unique is true (UNIMPLEMENTED). If $fst does not use the tropical semiring, it is directly converted to and from the tropical semiring.

$ofst = $fst-prune($w)

Prune $fst so paths worse than $w from the best path are removed.

SEE ALSO

OpenFST -- http://www.openfst.org/

AUTHOR

Sean O'Rourke <seano@cpan.org>

Bug reports welcome, patches even more welcome.

COPYRIGHT

Copyright (C) 2007, Sean O'Rourke. All rights reserved, some wrongs reversed. This module is distributed under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 165:

Unterminated C<...> sequence