Permalink
Browse files

Re-enabling break scanning for more accurate haiku detection.

  • Loading branch information...
1 parent b41b9d9 commit 251a6e1f22913a4e2399572de7d956862c004d45 @jparise committed May 28, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 haikufinder/__init__.py
View
@@ -214,9 +214,9 @@ def seek(self, n):
if syllable_count > n:
raise Nope
line = ' '.join(self.words[si:self.index])
-# for f in single_line_filters:
-# if f.search(line):
-# raise Nope
+ for f in single_line_filters:
+ if f.search(line):
+ raise Nope
self.lines.append(line)
def seek_eol(self):
@@ -233,8 +233,8 @@ def find_haiku(self):
self.seek_eol()
if first_word_comma.search(self.lines[1]) or first_word_comma.search(self.lines[2]):
raise Nope
-# if break_filter.search('\n'.join(self.lines)):
-# raise Nope
+ if break_filter.search('\n'.join(self.lines)):
+ raise Nope
return self.lines

0 comments on commit 251a6e1

Please sign in to comment.