Beispiel #1
0
 def mapper_init(self):
     #sys.stderr.write('work=%s plain=%s\n'%(self.work_filename,self.plain_text))
     work = None
     if self.work_filename and os.path.exists(
             os.path.join(os.getcwd(), self.work_filename)):
         with open(os.path.join(os.getcwd(), self.work_filename),
                   'r') as work_file:
             work = work_file.read()
         self.quote_matcher = QuoteMatcher(work=work,
                                           plain_text=self.plain_text)