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...)
 
 
(5 intermediate revisions by the same user not shown)
Line 2: Line 2:


csmf - Compleat Sound-change Modelling Framework
csmf - Compleat Sound-change Modelling Framework
=Description=
This program will be a script generator, written in Perl, but development is currently in pre-planning. It takes a file in the [[User:Paul.w.bennett/CSMF/File_Format|.csmf]] format as input, compiles the rules to a Perl script and runs that script on a specified corpus to produce an output corpus. Optionally, the generated script may be saved to disk for later re-use or editing.


=Synopsis=
=Synopsis=


csmf -c [ ''configpath'' ]
csmf ''rulesfile'' [ -q | [ -v [ v [ v ] ] ] ] [ -o ''savedscript'' ] [ -s ''sourcecorpus'' ] [ -t ''targetcorpus'' ]
 
=Options=
 
''rulesfile'' Filename containing the ruleset to compile to perl.


csmf ''rulespath'' [ -v [ v [ v ] ] [ ''stream'' ] ] [ -o ''savepath'' ] [ -s ''sourcecorpus'' ] [ -t ''targetcorpus'' ]
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.


=Options=
Specifying an input  file of "'''-'''" reads the rules from stdin, but see the '''-s''' switch.
 
'''-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).


'''-c, --configure''' Set various configuration settings
'''-p, --persistent-verbosity''' Make ''-q'', ''-v'', ''-vv'', or ''-vvv'' setting persist into the generated script (mm "used" for "compiled").


'''-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.
The options will always be understood (but not forced) in the generated script if ''-o'' is used.


'''-vv, --noisy''' Log details of each step of processing each rule, to stream ID ''stream''. This increases run time linearly.
'''--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.


'''-vvv, --tmi''' Dump the state tables as well as the -vv details, to stream ID ''stream''. This increases run time geometrically.
'''-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.  


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.
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.  


'''-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.
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.


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.
'''-x --dont-run-now''' Only generate the script, do not run it. If run without '''-o''', this will effectively just debug the rule set.


=Documentation=
=Documentation=

Latest revision as of 14:17, 2 March 2007

Name

csmf - Compleat Sound-change Modelling Framework

Description

This program will be a script generator, written in Perl, but development is currently in pre-planning. It takes a file in the .csmf format as input, compiles the rules to a Perl script and runs that script on a specified corpus to produce an output corpus. Optionally, the generated script may be saved to disk for later re-use or editing.

Synopsis

csmf rulesfile [ -q | [ -v [ v [ v ] ] ] ] [ -o savedscript ] [ -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, but see the -s switch.

-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.

-x --dont-run-now Only generate the script, do not run it. If run without -o, this will effectively just debug the rule set.

Documentation