aboutsummaryrefslogtreecommitdiff
path: root/gfsm/gfsm/src/programs/gfsmarcsort.gog
blob: ab827d676f756b58dd10d838c6da2e247111a71d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# -*- Mode: Shell-Script -*-
#
# Getopt::Gen specification
#-----------------------------------------------------------------------------
program "gfsmarcsort"
#program_version "0.01"

purpose	"Sort arcs of a finite state machine"
author  "Bryan Jurish <moocow@ling.uni-potsdam.de>"
on_reparse "warn"

#-----------------------------------------------------------------------------
# Details
#-----------------------------------------------------------------------------
details ""

#-----------------------------------------------------------------------------
# Files
#-----------------------------------------------------------------------------
#rcfile "/etc/gfsmrc"
#rcfile "~/.gfsmrc"

#-----------------------------------------------------------------------------
# Arguments
#-----------------------------------------------------------------------------
argument "BINFILE" "Stored binary gfsm file" \
    details="
If unspecified, standard input will be read
"

#-----------------------------------------------------------------------------
# Options
#-----------------------------------------------------------------------------
#group "Basic Options"

flag "lower"  l "Sort by (lower,upper,target) [default]."
flag -        i "Alias for -l"

flag "upper"  u "Sort by (upper,lower,target)."
flag -        o "Alias for '-u'"

flag "weight" w "Sort by weight (ascending)."
flag "cost"   C "Alias for '-w'"

string "mode" m "Sort by explicit mode string (overrides -l, -u, etc.)" \
  arg="MODE" \
  default="" \
  details="
Sort by a mode string over the characters \"luwstLUWST_\", as accepted
by gfsm_acmask_from_chars().  Each character in the string represents
a single elementary arc field comparison, and the comparison with the
highest priority should occur leftmost in the string.  Correspondence
between characters in MODE and arc comparisons is:

  CHAR : COMPARISON
     l : sort by lower labels in ascending order
     u : sort by upper labels in ascending order
     w : sort by arc weight in semiring-ascending order
     s : sort by source state in ascending order (useless here)
     t : sort by target state in ascending order

     L : sort by lower labels in descending order
     U : sort by upper labels in descending order
     W : sort by arc weight in semiring-descending order
     S : sort by source state in descending order (useless here)
     T : sort by target state in descending order

     _ : no comparison at the corresponding priority level
     x : user-specified comparison (useless here)

"

int "compress" z "Specify compression level of output file." \
    arg="LEVEL" \
    default="-1" \
    details="
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.
"

string "output" F "Specifiy output file (default=stdout)." \
    arg="FILE" \
    default="-"

#-----------------------------------------------------------------------------
# Addenda
#-----------------------------------------------------------------------------
#addenda ""

#-----------------------------------------------------------------------------
# Bugs
#-----------------------------------------------------------------------------
bugs "

None known.

"

#-----------------------------------------------------------------------------
# Footer
#-----------------------------------------------------------------------------
#acknowledge `cat acknowledge.pod`

seealso "
L<gfsmutils>
"