def process_command_line():

    parser = argparse.ArgumentParser(description=usage)  # add description
    # positional arguments
    parser.add_argument(
        'train_file', metavar='train_file', type=str, help='train file')
    parser.add_argument(
        'valid_file', metavar='valid_file', type=str, help='valid file')
    parser.add_argument(
        'test_file', metavar='test_file', type=str, help='test file')
    parser.add_argument(
        'ngram_size', metavar='ngram_size', type=int, help='ngram size')
    parser.add_argument('sentence_vector_length',
                        metavar='sentence_vector_length', type=int, help='sentence vector length')
    parser.add_argument(
        'vocab_size', metavar='vocab_size', type=int, help='vocab size')
    # plus model
    parser.add_argument(
        'num_section', metavar='num_section', type=int, help='global vector section number')
    parser.add_argument(
        'vocab_file', metavar='vocab_file', type=str, help='vocab file')

    # optional arguments
    parser.add_argument('--model_file', dest='model_file', type=str,
                        default='', help='load model from a file (default=\'\')')
    parser.add_argument('--emb_dim', dest='emb_dim', type=int,
                        default=128, help='embedding dimension (default=128)')
    parser.add_argument('--hidden_layers', dest='hidden_layers', type=str,
                        default='512', help='hidden layers, e.g. 512-512 (default=512)')
    parser.add_argument('--learning_rate', dest='learning_rate',
                        type=float, default=0.1, help='learning rate (default=0.1)')
    parser.add_argument('--chunk', dest='chunk', type=int, default=2000,
                        help='each time consider batch_size*chunk ngrams (default=2000)')
    parser.add_argument('--valid_freq', dest='valid_freq',
                        type=int, default=1000, help='valid freq (default=1000)')
    parser.add_argument('--option', dest='opt', type=int, default=0,
                        help='option: 0 -- predict last word, 1 -- predict middle word (default=0)')
    parser.add_argument('--act_func', dest='act_func', type=str, default='relu',
                        help='non-linear function: \'tanh\' or \'relu\' (default=\'relu\')')
    parser.add_argument('--finetune', dest='finetune', type=int, default=1,
                        help='after training for this number of epoches, start halving learning rate(default: 1)')
    parser.add_argument('--n_epochs', dest='n_epochs', type=int, default=5,
                        help='number of epochs, i.e. how many times to go throught the training data (default: 5)')

    # joint model
    parser.add_argument('--src_window', dest='src_window', type=int,
                        default=5, help='src window for joint model (default=5)')
    parser.add_argument('--src_lang', dest='src_lang',
                        type=str, default='', help='src lang (default=\'\')')
    parser.add_argument('--tgt_lang', dest='tgt_lang',
                        type=str, default='', help='tgt_lang (default=\'\')')

    # load pretrain model
    parser.add_argument('--load_model', dest='load_model_file', type=str, default=None, help='Load model parameters from a pre-trained model')
    parser.add_argument('--fix_emb', dest='fix_emb', action='store_true', default=False, help='Use pretrain model and fix the embedding matrix during the training process')

    # global non-linearity
    parser.add_argument('--global_nonlinear', dest='global_nonlinear', type=int, default=None, help="Add a non-linear layer after the global mean sum")

    # remove stopwords
    parser.add_argument('--rm_stopwords', dest='stopword_cutoff', type=int, default=-1, help="Remove stopwords from the global sentence vector")

    # adaptive section length splitting
    parser.add_argument('--ada_split', dest='ada_split', action='store_true', default=False, help="Use adaptive section length splitting")

    args = parser.parse_args()
    return args
Return a 1-tuple: (args list).
dataset/ETHPy150Open yuhaozhang/nnjm-global/code/train_nnjm_gplus.py/process_command_line