How to use the program - adamb924/mortal-engine GitHub Wiki
Command Line Utility
If you're creating a morphological model of a language, you're going to use the command line utility, met
(met stands for “Mortal Engine Tester”).
Here is the simplest scenario:
met farsi-tests.xml output.txt
This will process the file farsi-tests.xml
and produce the output output.txt
.
farsi-tests.xml
is a test file. This file contains whatever tests you have written, and is also where you specify which morphology file the program should read.
output.txt
is a plain text file that will show the result of the test.
For how to work this out practically, see the document about workflow.
(If there are any problems with the input, then the errors will be found in a file called log
. You can change the name of this file with the options below.)
Example
Other command line options
met farsi-tests.xml output.txt --verbose --model --log me-log.txt --inspect third-singular-possessive
--verbose
By default, the output file will only show the results of test if they fail. If you want to see the successes as well, use the --verbose
option.
--model
The option will write a string representation to the output file. This is helpful if you want to, e.g., make sure that all of your stems are being loaded, or if you want to debug how you're creating allomorphs algorithmically.
--inspect
The option will write a string representation of the node with specified the id
attribute (here, third-singular-possessive
) to the output file. This is like a --model
dump, but for a single node rather than for the entire model.
--check
This option will perform various checks on the model, which I have no documented yet.
--log
Use this option to change the default file for the error log. In the example above, it's been changed to me-log.txt
.