#!/usr/bin/env python

from __future__ import print_function, unicode_literals, division

import argparse

from pyrouge import Rouge155
from pyrouge.utils.argparsers import main_parser, ss_parser

def get_args():
	parser = argparse.ArgumentParser(parents=[main_parser, ss_parser])
	return parser.parse_args()

def main():
	args = get_args()
	rouge = Rouge155(args.rouge_home, args.rouge_args)
	rouge.system_filename_pattern = args.system_filename_pattern
	rouge.model_filename_pattern = args.model_filename_pattern
	rouge.system_dir = args.system_dir
	rouge.model_dir = args.model_dir
	output = rouge.evaluate(args.split_sents, args.system_id)
	print(output)

if __name__ == "__main__":
	main()
