User:Paul.w.bennett/CSMF

From FrathWiki
Jump to: navigation, search

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