def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) parser.add_argument( "--documents", dest="documents", type=str, required=False, default=None, metavar="<str>", help="The input path for the documents json", ) parser.add_argument( "--aspects", dest="aspects", type=str, required=False, default=None, metavar="<str>", help="The input path for the aspects json", ) cmd_args = parser.parse_args() return cmd_args
def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) parser.add_argument( "--documents", dest="documents", type=str, required=False, default="", metavar="<str>", help="the document set", ) parser.add_argument( "--name", dest="name", type=str, required=False, default="", metavar="<str>", help="the name to save", ) cmd_args = parser.parse_args() return cmd_args
def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) cmd_args = parser.parse_args() return cmd_args
def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) parser.add_argument( "--col", dest="column", type=str, required=False, default="content", metavar="<str>", help="The name of the column with the article text", ) parser.add_argument( "--source-column", dest="source_column", type=str, required=False, default="publication", metavar="<str>", help="The name of the column with the article source", ) parser.add_argument( "--keywords", dest="keywords", type=str, required=False, default="", metavar="<str>", help="The set of words a document must contain", ) parser.add_argument( "--ignore-source", dest="ignore_source", type=str, required=False, default="", metavar="<str>", help="The set of sources to ignore", ) cmd_args = parser.parse_args() return cmd_args
def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) # model parameters parser.add_argument( "--dim", dest="embed_dim", type=int, metavar="<int>", required=False, default=200, help="Embeddings dimension (default=200)", ) parser.add_argument( "--win", dest="window", type=int, metavar="<int>", required=False, default=5, help="Window for word2vec (default=5)", ) parser.add_argument( "--min", dest="min_count", type=int, metavar="<int>", required=False, default=10, help="min_count for word2vec (default=10)", ) parser.add_argument( "--epochs", dest="epochs", type=int, metavar="<int>", required=False, default=2, help="Number of epochs (default=2)", ) cmd_args = parser.parse_args() return cmd_args
def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) parser.add_argument( "--bias-file", dest="bias_file", type=str, required=False, default="", metavar="<str>", help="the csv with the leanings", ) cmd_args = parser.parse_args() return cmd_args
def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) parser.add_argument( "--input-2", dest="input_2", type=str, required=False, default=None, metavar="<str>", help="The second input file", ) cmd_args = parser.parse_args() return cmd_args
def parse(): """Handle all command line argument parsing. Returns the parsed args object from the parser """ parser = argparse.ArgumentParser() parser = utility.add_common_parsing(parser) parser.add_argument( "--documents", dest="documents", type=str, required=False, default="", metavar="<str>", help="the document set", ) parser.add_argument( "--name", dest="model_name", type=str, required=False, default="", metavar="<str>", help="the name to save", ) parser.add_argument( "--type", dest="model_type", type=str, required=False, default="lr", metavar="<str>", help="the type of model to use", ) parser.add_argument( "--undersample", dest="undersample", action="store_true", help="Specify this flag to undersample data", ) parser.add_argument( "--oversample", dest="oversample", action="store_true", help="Specify this flag to oversample data", ) parser.add_argument( "--balanced", dest="balanced", action="store_true", help="Specify this flag to use scikit learn's balancing argument", ) parser.add_argument( "--lean", dest="lean", action="store_true", help="Specify this flag to predict lean instead of source", ) cmd_args = parser.parse_args() return cmd_args