hfst-reweight(1)

hfst-reweight1

=reweight transducer weights simply

Usage

hfst-reweight [OPTIONS ...] [INFILE]

Overview

Reweight transducer weights simply

Common options:

-h, --help

Print help message

-V, --version

Print version info

-v, --verbose

Print verbosely while processing

-q, --quiet

Only print fatal erros and requested output

-s, --silent

Alias of --quiet

Input/Output options:

-i, --input=INFILE

Read input transducer from INFILE

-o, --output=OUTFILE

Write output transducer to OUTFILE

Reweighting options:

-a, --addition=AVAL

add AVAL to matching weights

-b, --multiplier=BVAL

multiply matching weights by BVAL

-F, --function=FNAME

operate matching weights by FNAME

-l, --lower-bound=LVAL

match weights greater than LVAL

-u, --upper-bound=UVAL

match weights less than UVAL

-I, --input-symbol=ISYM

match arcs with input symbol ISYM

-O, --output-symbol=OSYM

match arcs with output symbol OSYM

-S, --symbol=SYM

match arcs with input or output symbol SYM or both

-e, --end-states-only

match end states only, no arcs

-A, --arcs-only

match arcs only, no end states

-T, --tsv-file=TFILE

read reweighting rules from TFILE

If OUTFILE or INFILE is missing or -, standard streams will be used. Format of result depends on format of INFILE If AVAL, BVAL or FNAME are omitted, they default to neutral elements of addition, multiplication or identity function. If LVAL or UVAL are omitted, they default to minimum and maximum values of the weight structure. If ISYM, OSYM or SYM are omitted, they default to a value that matches all arcs. Only one ISYM, OSYM and SYM can be given.

Float values are parsed with strtod(3) and integers strtoul(3). The functions allowed for FNAME are <cmath> float functions with parameter count of 1 and a matching return value: abs, acos, asin, ... sqrt, tan, tanh

The precedence of operands follows the formula BVAL * FNAME(w) + AVAL. The formula is applied iff: ((LVAL <= w) && (w <= UVAL)), where w is weight of arc, and (ISYM == i) && (OSYM == o) && ((SYM == i) || (SYM == o)) ^^ (end state && -e).

TFILE should contain lines with tab-separated pairs of SYM and AVAL or BVAL. AVAL values must be preceded by a + character, BVAL should be given as plain digits. Comment lines starting with # and empty lines are ignored.

Weights are by default modified for all arcs and end states, unless option --end-states-only or --arcs-only is used.

Releases

5 releases since Debian 9 (Stretch); the text changed 2 times.

  1. 9
  2. 10–11
  3. 12–13

Reporting bugs

Report bugs to <[email protected]> or directly to our bug tracker at: <https://github.com/hfst/hfst/issues>

hfst-reweight home page: <https://github.com/hfst/hfst/wiki/HfstReweight>
General help using HFST software: <https://github.com/hfst/hfst/wiki>

From hfst 3.16.2-1+b1 in Debian 13 (Trixie). Parsed by carta from the page's man source.