parser.add_argument('-s','--score-development',nargs='*',required=True,help='The score file in 4 or 5 column format to train the fusion parameters.')
parser.add_argument('-t','--score-evaluation',nargs='*',required=True,help='The score file in 4 or 5 column format to calibrate.')
parser.add_argument('-f','--score-fused-development-file',required=True,help='The calibrated development score file in 4 or 5 column format to calibrate.')
parser.add_argument('-g','--score-fused-evaluation-file',required=True,help='The calibrated evaluation score file in 4 or 5 column format to calibrate.')
parser.add_argument('-p','--parser',default='4column',choices=('4column','5column'),help='The type of the score file.')
args=parser.parse_args(command_line_options)
returnargs
defmain(command_line_options=None):
"""Score Fusion using logistic regresssion"""
args=parse_command_line(command_line_options)
# read data
n_systems=len(args.score_development)
foriinrange(n_systems):
ifnotos.path.isfile(args.score_development[i]):raiseIOError("The given score file does not exist")
# pythonic way: create inline dictionary "{...}", index with desired value "[...]", execute function "(...)"