2.9 ml commands

20210420 A MLHub package can expose any number of commands. The commands command will list the commands supported by the package.

It is expected that for the same functionality different packages will use the same command name. Package developers may like to conform to the names suggested here:

$ ml adult       pkg <file.jpg>  # Does image contain questionable material.
$ ml analyze     pkg <file.jpg>  # Analyze an image.
$ ml arules      pkg <file.csv>  # Association rule analysis.
$ ml brands      pkg
$ ml build       pkg             # Build with user supplied data/parameters.
$ ml category    pkg
$ ml celebrities pkg
$ ml color       pkg <file.jpg>  # Colorize a (black and white) photo.
$ ml describe    pkg
$ ml diagnose    pkg <file.jpg>  # Diagnose the image, perhaps for disease.
$ ml faces       pkg
$ ml geocode     pkg
$ ml identify    pkg <file.png>  # Identify onjects in a photo.
$ ml itemsets    pkg <file.csv>  # Frequent itemsets for basket analysis.
$ ml landmarks   pkg
$ ml language    pkg
$ ml limits      pkg             # Report on any limits to the package.
$ ml links       pkg
$ ml normalise   pkg <file.csv>  # Normalise the numeric data, per column.
$ ml objects     pkg
$ ml ocr         pkg <file.jpg>  # Optical character recognition.
$ ml phrases     pkg
$ ml predict     pkg <file.csv>  # Apply a model to new data to predict/classify/...
$ ml sentiment   pkg <sentences> # Sentiment of a sentence.
$ ml supported   pkg             # What the package supports. E.g., languages.
$ ml synthesize  pkg <file.wav>  # Synthesize speech from text.
$ ml tags        pkg
$ ml thumbnail   pkg <file.png>  # Create an effective thumbnail for the image.
$ ml train       pkg <file.csv>  # Train a model from user supplied data/parameters.
$ ml transcribe  pkg             # Transcribe audio from the microphone.
$ ml translate   pkg <text>      # Translate between languages.
$ ml type        pkg

Most commands also support command line options which always begin with a single dash for a single letter command line option or a double dash for more explicit commands. Command line options tend to be common across different packages and include:

$ ml command pkg [options] [argument]
     -a             --alpha-matting      Perform alpha matting image processing.
     -a             --annotate           Annotate the supplied image to new file. 
     -b             --bing               Generate Bing Maps URL.
     -c             --confidence=<real>  Minimum confidence threshold.
     -g             --google             Generate Google Maps URL.
     -h             --header             Output a header line for the CSV.
                    --help               Show usage message.
     -i <file.txt>  --input=<file.txt>   Input data.
                    --id=<column>        A column that represents the identifier.
     -j             --jpeg               Output a jpg file.
     -l <lang>      --lang=<lang>        Target language.
     -m <int>       --max=<int>          Maximum number of matches.
     -m <model>     --model=<model>      Select a specific pre-built model.
     -m <mov.mp4>   --movie=<mov.mp4>    Load/save a movie file.
     -o <file.wav>  --output=<file.wav>  Save audio (or other type) to file.
     -o <model.csv> --output=<model.csv> Filename of the CSV file to save model, or to STDOUT.
                    --osm                Generate Open Street Map URL.
     -s             --support=<real>     Minimum support threshold.
     -t <lang>      --to=<lang>          The code for target language, e.g., fr.
     -u             --url                Generate Open Street Map URL.
     -v             --verbose            More information is output.
     -v             --view               View images or movie.
     -v             --voice=<voice>      Selected voice.
     -V             --version            MLHub or package version.
     -y             --yes                Answer yes to any questions.

Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0