def createCoreOptions(): parser = OptionParser( usage= "Usage: %prog [core options] [input/output/task options] [other options]" ) group = OptionGroup(parser, "Core options") group.add_option( "--other_app_dir", action="append", dest="other_dirs", metavar="dir", help= "additional directory to load a task from. Optional and repeatable.") group.add_option( "--settings_file", dest="settings_file", metavar="file", help= "a file of settings to use which overwrites existing settings. The file should be a Python config file in the style of the template in etc/MAT_settings.config.in. Optional." ) group.add_option( "--task", dest="task", type="string", metavar="task", action="callback", callback=_taskCallback, help= "name of the task to use. Obligatory if the system knows of more than one task. Known tasks are: " + ", ".join(PLUGIN_DIR.keys())) MAT.ExecutionContext.addOptions(group) parser.add_option_group(group) return parser
metavar="label,label,...", help= "Optional. If --task is not provided, the reporter requires additional, external information to determine which annotations are content annotations. Use this flag to provide a comma-separated sequence of annotation labels which should be treated as content annotations." ) group.add_option( "--content_annotations_all", action="store_true", help= "Optional. If neither --task nor --content_annotations are provided, this flag will cause all labels in the document to be treated as content annotations." ) group.add_option( "--verbose", action="store_true", help= "If present, the tool will provide detailed information on its progress.") parser.add_option_group(group) group = OptionGroup(parser, "Input options") group.add_option( "--input_dir", dest="input_dir", action="append", metavar="dir", help= "A directory, all of whose files will be reported on. Can be repeated. May be specified with --input_files." ) group.add_option( "--input_files", dest="input_files", action="append", metavar="re",
) group.add_option( "--similarity_profile", dest="similarity_profile", metavar="profile", help= "If provided, the name of a similarity profile in the provided task. Ignored if --task is not provided." ) group.add_option( "--score_profile", dest="score_profile", metavar="profile", help= "If provided, the name of a score profile in the provided task. Ignored if --task is not provided." ) parser.add_option_group(group) hypgroup = OptionGroup(parser, "Hypothesis options") parser.add_option_group(hypgroup) refgroup = OptionGroup(parser, "Reference options") parser.add_option_group(refgroup) scoregroup = OptionGroup(parser, "Score output options") parser.add_option_group(scoregroup) hypgroup.add_option( "--file", dest="file", metavar="file", help=