User:Paul.w.bennett/CSMF: Difference between revisions

From FrathWiki
Jump to navigationJump to search
(New page: =Name= csmf - Compleat Sound-change Modelling Framework =Synopsis= csmf -c [ ''configpath'' ] csmf ''rulespath'' [ -v [ v [ v ] ] [ ''stream'' ] ] [ -o ''savepath'' ] [ -s ''sourcecorp...)
 
Line 11: Line 11:
=Options=
=Options=


'''-c, --configure''' Set various configuration settings
''rulesfile'' Filename containing the ruleset to compile to perl. If not found, csmf searches $CSMFPATH (if present), which should be a colon-delimited list of directories to search. Windows implementations will search a semicolon-delimited %CSMFPATH%, if present. Specifying an input  file of "'''-'''" reads the rules from stdin.


'''-v, --verbose''' Log rules as they are processed, to stream ID ''stream'' (the default is stream 1, i.e. STDOUT). This increases run time a small amount.
'''-q, --quiet''' Do not output anything (except critical errors to stderr).


'''-vv, --noisy''' Log details of each step of processing each rule, to stream ID ''stream''. This increases run time linearly.
'''-v, --verbose''' Output rules as they are compiled.  


'''-vvv, --tmi''' Dump the state tables as well as the -vv details, to stream ID ''stream''. This increases run time geometrically.
'''-vv, --noisy''' Output changes to (or creation of) symbols and states for each rule.


It is possible to specify multiple logging switches, and redirect the output of each one to a different stream, in which case each stream will contain only the information added by that switch. Logging switches persist into the generated script.
'''-vvv, --tmi''' Output full state and symbol tables that have changed for each rule.


'''-o''' Saves the generated script after creating and running it. This is useful if you need to use the same changes on several corpora. Specifying a filename of "'''-'''" writes the generated script to stdout. If you do this while using any of the logging switches, you probably want to redirect them to a different stream.
'''--verbosity ''n'' '''Set output verbosity to 0 (quiet), 1 (normal), 2 (verbose), 3 (noisy), 4 (tmi).


CSMF will be a script generator, written in Perl, that takes a file in the [[User:Paul.w.bennett/CSMF/File_Format|.csmf]] format as input and creates a Perl script that enacts those changes on its input. Optionally, that script may be immediately invoked on any data piped to csmf.
'''-p, --persistent-verbosity''' Make ''-q'', ''-v'', ''-vv'', or ''-vvv'' setting persist into the generated script (mm "used" for "compiled"). The options will always be understood (but not forced) in the generated script if ''-o'' is used.
 
'''--beef-yoga''' Export data as ''csmf.flex'' and ''csmf.bison'' for use with the respective programs. This is '''''HIGHLY''''' Experimental! Do not use, except for fun.
 
'''-o --save-script-file''' Saves the generated Perl script after creating and running it. This is useful if you need to use the same changes on several corpora.
 
Specifying an output file of "'''-'''" writes the generated script to stdout. If you do this while using any of the logging switches, logging will occur to /dev/fd3 instead of stdout.  
 
If you do not specify a script name, the default will be ''rulesfile'' with the file extension (if any) stripped from it the extension '''.pl''' appended.


=Documentation=
=Documentation=

Revision as of 13:39, 2 March 2007

Name

csmf - Compleat Sound-change Modelling Framework

Synopsis

csmf -c [ configpath ]

csmf rulespath [ -v [ v [ v ] ] [ stream ] ] [ -o savepath ] [ -s sourcecorpus ] [ -t targetcorpus ]

Options

rulesfile Filename containing the ruleset to compile to perl. If not found, csmf searches $CSMFPATH (if present), which should be a colon-delimited list of directories to search. Windows implementations will search a semicolon-delimited %CSMFPATH%, if present. Specifying an input file of "-" reads the rules from stdin.

-q, --quiet Do not output anything (except critical errors to stderr).

-v, --verbose Output rules as they are compiled.

-vv, --noisy Output changes to (or creation of) symbols and states for each rule.

-vvv, --tmi Output full state and symbol tables that have changed for each rule.

--verbosity n Set output verbosity to 0 (quiet), 1 (normal), 2 (verbose), 3 (noisy), 4 (tmi).

-p, --persistent-verbosity Make -q, -v, -vv, or -vvv setting persist into the generated script (mm "used" for "compiled"). The options will always be understood (but not forced) in the generated script if -o is used.

--beef-yoga Export data as csmf.flex and csmf.bison for use with the respective programs. This is HIGHLY Experimental! Do not use, except for fun.

-o --save-script-file Saves the generated Perl script after creating and running it. This is useful if you need to use the same changes on several corpora.

Specifying an output file of "-" writes the generated script to stdout. If you do this while using any of the logging switches, logging will occur to /dev/fd3 instead of stdout.

If you do not specify a script name, the default will be rulesfile with the file extension (if any) stripped from it the extension .pl appended.

Documentation