NAME

gfsmarith - Perform an elementary arithmetic operation on automaton weights


SYNOPSIS

gfsmarith [OPTIONS] FSMFILE

 Arguments:
    FSMFILE  Stored binary gfsm file
 Options
    -h       --help            Print help and exit.
    -V       --version         Print version and exit.
    -zLEVEL  --compress=LEVEL  Specify compression level of output file.
    -FFILE   --output=FILE     Specifiy output file (default=stdout).
 Operator Selection
    -E       --exp             Real exponentiation
    -L       --log             Real logarithm
    -mFLOAT  --multiply=FLOAT  Real multiplication by WEIGHT
    -aFLOAT  --add=FLOAT       Real addition of WEIGHT
    -p       --positive        Set real negative weights to zero
             --times=FLOAT     Semiring multiplication by WEIGHT
             --plus=FLOAT      Semiring addition of WEIGHT
             --sr-positive     Set semiring-negative weights to semiring-zero
 Weight Selection
    -A       --no-arcs         Exclude arc weights (default: include)
    -f       --no-finals       Exclude final weights (default: include)
    -Z       --zero            Include semiring-zero weights (default: exclude)
 State & Label Selection
    -i       --initial         Select only initial state and its arcs/finality
    -sID     --state=ID        Select only state ID and its arcs/finality (default=all)
    -lLO     --lower=LO        Select only arcs with lower-label LO (default=any)
    -uHI     --upper=HI        Select only arcs with upper-label HI (defualt=any)


DESCRIPTION

Perform an elementary arithmetic operation on automaton weights


ARGUMENTS

FSMFILE

Stored binary gfsm file

If unspecified, standard input will be read


OPTIONS

--help , -h

Print help and exit.

Default: '0'

--version , -V

Print version and exit.

Default: '0'

--compress=LEVEL , -zLEVEL

Specify compression level of output file.

Default: '-1'

Specify zlib compression level of output file. -1 (default) indicates the default compression level, 0 (zero) indicates no zlib compression at all, and 9 indicates the best possible compression.

--output=FILE , -FFILE

Specifiy output file (default=stdout).

Default: '-'

Operator Selection

--exp , -E

Real exponentiation

Default: '0'

--log , -L

Real logarithm

Default: '0'

--multiply=FLOAT , -mFLOAT

Real multiplication by WEIGHT

Default: '0'

--add=FLOAT , -aFLOAT

Real addition of WEIGHT

Default: '0'

--positive , -p

Set real negative weights to zero

Default: '0'

--times=FLOAT

Semiring multiplication by WEIGHT

Default: '0'

--plus=FLOAT

Semiring addition of WEIGHT

Default: '0'

--sr-positive

Set semiring-negative weights to semiring-zero

Default: '0'

Weight Selection

--no-arcs , -A

Exclude arc weights (default: include)

Default: '0'

--no-finals , -f

Exclude final weights (default: include)

Default: '0'

--zero , -Z

Include semiring-zero weights (default: exclude)

Default: '0'

State & Label Selection

--initial , -i

Select only initial state and its arcs/finality

Default: '0'

--state=ID , -sID

Select only state ID and its arcs/finality (default=all)

Default: '-1'

--lower=LO , -lLO

Select only arcs with lower-label LO (default=any)

Default: '-1'

--upper=HI , -uHI

Select only arcs with upper-label HI (defualt=any)

Default: '-1'


ADDENDA

About this Document

Documentation file auto-generated by optgen.perl version 0.07 using Getopt::Gen version 0.13. Translation was initiated as:

   optgen.perl -l --no-handle-rcfile --nocfile --nohfile --notimestamp -F gfsmarith gfsmarith.gog


BUGS AND LIMITATIONS

Note that the --plus and --times operations are sensitive to the semiring associated with the stored FSM file, while the --add and --multiply operations have the usual real-number interpretations, regardless of the automaton semiring.


ACKNOWLEDGEMENTS

Perl by Larry Wall.

Getopt::Gen by Bryan Jurish.


AUTHOR

Bryan Jurish <moocow.bovine@gmail.com>


SEE ALSO

the gfsmutils manpage