Beispiel #1
0
 def run(self):
     import readWikipedia
     pattern = ''
     first = True
     for line in open(self.input, 'rU'):
         line = line.strip()
         if first:
             if len(line) > 0:
                 pattern = line
             first = False
         else:
             if len(line) > 0:
                 pattern = pattern + '|' + line
     if len(self.section_name.strip()) > 0:
         pattern = pattern + ':' + self.section_name.strip()
     print pattern
     readWikipedia.ReadWikipedia(self.wiki_directory, pattern,
                                 self.categories, self.output,
                                 'temp/pickfromwikipediatitles',
                                 self.break_sentences)
Beispiel #2
0
 def run(self):
     import readWikipedia
     readWikipedia.ReadWikipedia(self.wiki_directory, self.pattern,
                                 self.categories, self.out_file,
                                 self.titles_file, self.break_sentences)