--- bin/mallet
+++ bin/mallet	2019-07-23 16:22:30.000000000 -0400
@@ -1,13 +1,11 @@
 #!/bin/bash
 
+malletdir=@MALLETDIR@
 
-malletdir=`dirname $0`
-malletdir=`dirname $malletdir`
-
-cp=$malletdir/class:$malletdir/lib/mallet-deps.jar:$CLASSPATH
+cp=$malletdir/mallet.jar:$malletdir/mallet-deps.jar:$CLASSPATH
 #echo $cp
 
-MEMORY=1g
+MEMORY=${MALLET_MEMORY:-1g}
 
 CMD=$1
 shift
@@ -25,12 +23,14 @@
   classify-dir       classify data from a single file with a saved classifier
   classify-file      classify the contents of a directory with a saved classifier
   classify-svmlight  classify data from a single file in SVMLight format
+  tag                train, test, or run a generic CRF-based tagger
   train-topics       train a topic model from Mallet data files
   infer-topics       use a trained topic model to infer topics for new documents
   evaluate-topics    estimate the probability of new documents under a trained model
   prune              remove features based on frequency or information gain
   split              divide data into testing, training, and validation portions
   bulk-load          for big input files, efficiently prune vocabulary and import docs
+  run                run the main method of the specified class
 
 Include --help with any option for more information
 EOF
@@ -47,6 +47,7 @@
 	classify-dir) CLASS=cc.mallet.classify.tui.Text2Classify;;
 	classify-file) CLASS=cc.mallet.classify.tui.Csv2Classify;;
 	classify-svmlight) CLASS=cc.mallet.classify.tui.SvmLight2Classify;;
+        tag) CLASS=cc.mallet.fst.SimpleTagger;;
 	train-topics) CLASS=cc.mallet.topics.tui.TopicTrainer;;
 	infer-topics) CLASS=cc.mallet.topics.tui.InferTopics;;
 	evaluate-topics) CLASS=cc.mallet.topics.tui.EvaluateTopics;;