hfst-edit-metadata

Purpose

Set values of properties in transducer headers.

Usage

The help message:

Usage: hfst-edit-metadata [OPTIONS...] [INFILE]
Name a transducer

Name options:
  -a, --add=ANAME=VALUE       add or replace property ANAMEwith VALUE
  -p, --print[=NAME]          print the current PNAME
  -t, --truncate_length=LEN   truncate added properties' lengths to LEN
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

If OUTFILE or INFILE is missing or -, standard streams will be used.
Format of result depends on format of INFILE
If PNAME is omitted, all values are printed

Report bugs to <hfst-bugs@helsinki.fi> or directly to our bug tracker at:
<https://sourceforge.net/tracker/?atid=1061990&group_id=224521&func=browse>

Examples

The commands

hfst-edit-metadata --add=author=HFST --add=licence=GPL --add=name="Finnish morphology" transducer.hfst > tmp
mv tmp transducer.hfst
hfst-edit-metadata --print transducer.hfst

print something like

author: HFST
licence: GPL
name: Finnish morphology
type: TROPICAL_OPENFST
version: 3.3

See also

HfstName