コード例 #1
0
ファイル: Rouge155.py プロジェクト: abhashkumar/semantic_summ
    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)
コード例 #2
0
ファイル: Rouge155.py プロジェクト: scylla/masters_thesis
    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)
コード例 #3
0
 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)
コード例 #4
0
 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)