def convert_summaries_to_rouge_format(input_dir, output_dir): """ Convert all files in input_dir into a format ROUGE understands and saves the files to output_dir. The input files are assumed to be plain text with one sentence per line. input_dir: Path of directory containing the input files. output_dir: Path of directory in which the converted files will be saved. """ DirectoryProcessor.process( input_dir, output_dir, Rouge155.convert_text_to_rouge_format)
def convert_summaries_to_rouge_format(input_dir, output_dir): """ Convert all files in input_dir into a format ROUGE understands and saves the files to output_dir. The input files are assumed to be plain text with one sentence per line. input_dir: Path of directory containing the input files. output_dir: Path of directory in which the converted files will be saved. """ DirectoryProcessor.process(input_dir, output_dir, Rouge155.convert_text_to_rouge_format)
def split_files(input_dir, output_dir, lang="en", punkt_data_path=None): ss = PunktSentenceSplitter(lang, punkt_data_path) DirectoryProcessor.process(inputdir, outputdir, ss.split)