def run(self): aligner = LevenshteinAligner(weights=self.weights) style = self.args.style nonid = self.args.nonid for line in self.args.infile: try: (word1, word2) = line.strip().decode(self.args.encoding).split('\t') except ValueError: print >> sys.stderr, "*** Ignoring line: %s" % line if not (nonid and word1 == word2): aligner.print_alignments(word1, word2, style)