docstr: Run as a command
docstr_tok: ["Run","as","a","command"]
code: def run_cmd(self, argvs):
      """
      Run as a command
      """
      self.parser = argparse.ArgumentParser(
          description="Run the lac module.",
          prog="hub run lac",
          usage="%(prog)s",
          add_help=True,
      )
  
      self.arg_input_group = self.parser.add_argument_group(
          title="Input options", description="Input data. Required"
      )
      self.arg_config_group = self.parser.add_argument_group(
          title="Config options",
          description="Run configuration for controlling module behavior, not required.",
      )
  
      self.add_module_config_arg()
      self.add_module_input_arg()
  
      args = self.parser.parse_args(argvs)
  
      try:
          input_data = self.check_input_data(args)
      except DataFormatError and RuntimeError:
          self.parser.print_help()
          return None
  
      if args.user_dict:
          self.set_user_dict(args.user_dict)
  
      results = self.lexical_analysis(
          texts=input_data,
          use_gpu=args.use_gpu,
          batch_size=args.batch_size,
          return_tag=args.return_tag,
      )
  
      return results
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import argparse
  import ast
  import io
  import math
  import os
  import numpy
  import six
  from paddle.inference import Config
  from paddle.inference import create_predictor
  from .custom import Customization
  from .processor import load_kv_dict
  from .processor import parse_result
  from .processor import word_to_ids
  from paddlehub.module.module import moduleinfo
  from paddlehub.module.module import runnable
  from paddlehub.module.module import serving
  from paddlehub.utils.parser import txt_parser
  from paddlehub.utils.utils import sys_stdin_encoding
label_desc: Use image node_id 10 for calling the LAC obj's underlying member method code with example usage: obj.run_cmd(argvs) and returns: results, None