def _lab_parser(prog="lab"): parser = _base_parser( prog=prog, description= """ASReview LAB - Active learning for Systematic Reviews.""" # noqa ) parser.add_argument("--clean_project", default=None, type=str, help="Safe cleanup of temporary files in project.") parser.add_argument( "--clean_all_projects", action='store_true', help="Safe cleanup of temporary files in all projects.") parser.add_argument("--ip", default=HOST_NAME, type=str, help="The IP address the server will listen on.") parser.add_argument("--port", default=PORT_NUMBER, type=int, help="The port the server will listen on.") return parser
def _simulate_parser(prog="simulate", description=DESCRIPTION_SIMULATE): parser = _base_parser(prog=prog, description=description) # Active learning parameters # File path to the data. parser.add_argument( "dataset", type=str, nargs="*", help="File path to the dataset or one of the built-in datasets.") # Initial data (prior knowledge) parser.add_argument("--n_prior_included", default=DEFAULT_N_PRIOR_INCLUDED, type=int, help="Sample n prior included papers. " "Only used when --prior_included is not given. " f"Default {DEFAULT_N_PRIOR_INCLUDED}") parser.add_argument("--n_prior_excluded", default=DEFAULT_N_PRIOR_EXCLUDED, type=int, help="Sample n prior excluded papers. " "Only used when --prior_excluded is not given. " f"Default {DEFAULT_N_PRIOR_EXCLUDED}") return parser
def _lab_parser(prog="lab"): parser = _base_parser( prog=prog, description= """ASReview LAB - Active learning for Systematic Reviews.""" # noqa ) parser.add_argument("--clean-project", dest="clean_project", default=None, type=str, help="Safe cleanup of temporary files in project.") parser.add_argument( "--clean-all-projects", dest="clean_all_projects", default=None, action='store_true', help="Safe cleanup of temporary files in all projects.") parser.add_argument("--ip", default=HOST_NAME, type=str, help="The IP address the server will listen on.") parser.add_argument("--port", default=PORT_NUMBER, type=int, help="The port the server will listen on.") parser.add_argument( "--no-browser", dest="no_browser", action='store_true', help="Do not open ASReview LAB in a browser after startup.") parser.add_argument("--port-retries", dest="port_retries", default=50, type=int, help="The number of additional ports to try if the" "specified port is not available.") parser.add_argument("--certfile", default="", type=str, help="The full path to an SSL/TLS certificate file.") parser.add_argument( "--keyfile", default="", type=str, help="The full path to a private key file for usage with SSL/TLS.") return parser
def _lab_parser(prog="lab", description=DESCRIPTION_LAB): parser = _base_parser(prog=prog, description=description) # Active learning parameters parser.add_argument("--ip", default=HOST_NAME, type=str, help="The IP address the server will listen on.") parser.add_argument("--port", default=PORT_NUMBER, type=int, help="The port the server will listen on.") return parser
def _lab_parser(prog="lab"): parser = _base_parser( prog=prog, description="""ASReview LAB - Active learning for Systematic Reviews.""" # noqa ) parser.add_argument( "--ip", default=HOST_NAME, type=str, help="The IP address the server will listen on.") parser.add_argument( "--port", default=PORT_NUMBER, type=int, help="The port the server will listen on.") return parser
def _simulate_parser(prog="simulate", description=DESCRIPTION_SIMULATE): parser = _base_parser(prog=prog, description=description) # Active learning parameters # File path to the data. parser.add_argument( "dataset", type=str, nargs="*", help="File path to the dataset or one of the built-in datasets.") # Initial data (prior knowledge) parser.add_argument("--n_prior_included", default=DEFAULT_N_PRIOR_INCLUDED, type=int, help="Sample n prior included papers. " "Only used when --prior_included is not given. " f"Default {DEFAULT_N_PRIOR_INCLUDED}") parser.add_argument("--n_prior_excluded", default=DEFAULT_N_PRIOR_EXCLUDED, type=int, help="Sample n prior excluded papers. " "Only used when --prior_excluded is not given. " f"Default {DEFAULT_N_PRIOR_EXCLUDED}") parser.add_argument("--prior_idx", default=[], nargs="*", type=int, help="Prior indices by id.") parser.add_argument( '--init_seed', default=None, type=int, help="Seed for setting the prior indices if the --prior_idx option is " "not used. If the option --prior_idx is used with one or more " "index, this option is ignored.") parser.add_argument("--verbose", "-v", default=0, type=int, help="Verbosity") return parser
def _simulate_parser(prog="simulate", description=DESCRIPTION_SIMULATE): parser = _base_parser(prog=prog, description=description) # Active learning parameters # File path to the data. parser.add_argument( "dataset", type=str, nargs="*", help="File path to the dataset or one of the benchmark datasets." ) # Initial data (prior knowledge) parser.add_argument( "--n_prior_included", default=DEFAULT_N_PRIOR_INCLUDED, type=int, help="Sample n prior included papers. " "Only used when --prior_idx is not given. " f"Default {DEFAULT_N_PRIOR_INCLUDED}") parser.add_argument( "--n_prior_excluded", default=DEFAULT_N_PRIOR_EXCLUDED, type=int, help="Sample n prior excluded papers. " "Only used when --prior_idx is not given. " f"Default {DEFAULT_N_PRIOR_EXCLUDED}") parser.add_argument( "--prior_idx", default=[], nargs="*", type=int, help="Prior indices by rownumber (0 is first rownumber)." ) parser.add_argument( "--prior_record_id", default=[], nargs="*", type=int, help="Prior indices by record_id." ) parser.add_argument( "--included_dataset", default=[], nargs="*", type=str, help="A dataset with papers that should be included" "Can be used multiple times." ) parser.add_argument( "--excluded_dataset", default=[], nargs="*", type=str, help="A dataset with papers that should be excluded" "Can be used multiple times." ) parser.add_argument( "--prior_dataset", default=[], nargs="*", type=str, help="A dataset with papers from prior studies." ) # logging and verbosity parser.add_argument( "--state_file", "-s", "--log_file", "-l", default=None, type=str, help="Location to store the state of the simulation." ) parser.add_argument( "-m", "--model", type=str, default=DEFAULT_MODEL, help=f"The prediction model for Active Learning. " f"Default: '{DEFAULT_MODEL}'.") parser.add_argument( "-q", "--query_strategy", type=str, default=DEFAULT_QUERY_STRATEGY, help=f"The query strategy for Active Learning. " f"Default: '{DEFAULT_QUERY_STRATEGY}'.") parser.add_argument( "-b", "--balance_strategy", type=str, default=DEFAULT_BALANCE_STRATEGY, help="Data rebalancing strategy mainly for RNN methods. Helps against" " imbalanced dataset with few inclusions and many exclusions. " f"Default: '{DEFAULT_BALANCE_STRATEGY}'") parser.add_argument( "-e", "--feature_extraction", type=str, default=DEFAULT_FEATURE_EXTRACTION, help="Feature extraction method. Some combinations of feature" " extraction method and prediction model are impossible/ill" " advised." f"Default: '{DEFAULT_FEATURE_EXTRACTION}'" ) parser.add_argument( '--init_seed', default=None, type=int, help="Seed for setting the prior indices if the --prior_idx option is " "not used. If the option --prior_idx is used with one or more " "index, this option is ignored." ) parser.add_argument( "--n_instances", default=DEFAULT_N_INSTANCES, type=int, help="Number of papers queried each query." f"Default {DEFAULT_N_INSTANCES}.") parser.add_argument( "--n_queries", type=int, default=None, help="The number of queries. By default, the program " "stops after all documents are reviewed or is " "interrupted by the user." ) parser.add_argument( "-n", "--n_papers", type=int, default=None, help="The number of papers to be reviewed. By default, " "the program stops after all documents are reviewed or is " "interrupted by the user." ) parser.add_argument( "--verbose", "-v", default=0, type=int, help="Verbosity" ) return parser