Class SequenceModelExplorer

java.lang.Object
org.tribuo.sequence.SequenceModelExplorer
All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.command.CommandGroup

public class SequenceModelExplorer extends Object implements com.oracle.labs.mlrg.olcut.command.CommandGroup
A CLI for interacting with a SequenceModel.
  • Constructor Details

    • SequenceModelExplorer

      public SequenceModelExplorer()
      Builds a sequence model explorer shell.
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface com.oracle.labs.mlrg.olcut.command.CommandGroup
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface com.oracle.labs.mlrg.olcut.command.CommandGroup
    • fileCompleter

      public org.jline.reader.Completer[] fileCompleter()
      Completers for files.
      Returns:
      The completers for file commands.
    • startShell

      public void startShell()
      Start the command shell
    • loadModel

      @Command(usage="<filename> - Load a model from disk.", completers="fileCompleter") public String loadModel(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, File path)
      Loads a model.
      Parameters:
      ci - The shell instance.
      path - The path to load.
      Returns:
      A status string.
    • modelDescription

      @Command(usage="Shows the model description") public String modelDescription(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
      Shows the model description.
      Parameters:
      ci - The command interpreter.
      Returns:
      The model description.
    • featureInfo

      @Command(usage="Shows the information on a particular feature") public String featureInfo(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, String featureName)
      Shows information on a particular feature.
      Parameters:
      ci - The command interpreter.
      featureName - The feature name.
      Returns:
      The feature information.
    • outputInfo

      @Command(usage="Shows the output information.") public String outputInfo(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
      Shows the output information.
      Parameters:
      ci - The command interpreter.
      Returns:
      The output information.
    • topFeatures

      @Command(usage="<int> - Shows the top N features in the model") public String topFeatures(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, int numFeatures)
      Shows the top n features in this model.
      Parameters:
      ci - The command interpreter.
      numFeatures - The number of features to display.
      Returns:
      The top features.
    • numFeatures

      @Command(usage="Shows the number of features in the model") public String numFeatures(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci)
      Shows the number of features in this model.
      Parameters:
      ci - The command interpreter.
      Returns:
      The number of features.
    • minCount

      @Command(usage="<min count> - Shows the number of features that occurred more than min count times.") public String minCount(com.oracle.labs.mlrg.olcut.command.CommandInterpreter ci, int minCount)
      Shows the number of features which occurred more than minCount times in the training data.
      Parameters:
      ci - The command interpreter.
      minCount - The minimum occurrence count.
      Returns:
      The number of features which occurred more than minCount times.
    • main

      public static void main(String[] args)
      Runs the sequence model explorer.
      Parameters:
      args - CLI arguments.